Skip to content

Commit e8699d5

Browse files
committed
Merge remote-tracking branch 'origin/develop' into develop
2 parents 72c9f18 + 9792fd2 commit e8699d5

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

npc-paper/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ modrinth {
4848
"1.21.5",
4949
)
5050
loaders.add("paper")
51+
loaders.add("purpur")
5152
changelog.set("https://docs.simplecloud.app/changelog")
5253
syncBodyFrom.set(rootProject.file("README.md").readText())
53-
}
54+
}

npc-paper/src/main/kotlin/app/simplecloud/npc/plugin/paper/PaperPlugin.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class PaperPlugin : JavaPlugin() {
2323

2424
InterfacesListeners.install(this)
2525

26-
val namespace = loadNamespace()
26+
val namespace = loadNamespace() ?: return
2727
CommandHandler(namespace, this).parseCommands()
2828
}
2929

@@ -33,11 +33,12 @@ class PaperPlugin : JavaPlugin() {
3333
this.namespace!!.hologramManager.destroyAllHolograms()
3434
}
3535

36-
private fun loadNamespace(): NpcNamespace {
36+
private fun loadNamespace(): NpcNamespace? {
3737
val namespace = NamespaceService.findPossibleNamespace()
3838
if (namespace == null) {
3939
logger.warning("No supported NPC software was found on the server. Find the supported plugins at https://docs.simplecloud.app/plugin/npcs#usage-of-other-npc-plugins")
40-
throw NullPointerException("failed to find npc namespace")
40+
server.pluginManager.disablePlugin(this)
41+
return null
4142
}
4243

4344
logger.info("Load matching npc namespace: ${namespace.javaClass.simpleName}")

0 commit comments

Comments
 (0)