We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 736b05f commit d4101aaCopy full SHA for d4101aa
src/main/kotlin/gg/skytils/skytilsmod/features/impl/handlers/NamespacedCommands.kt
@@ -84,15 +84,17 @@ object NamespacedCommands {
84
val owner = owners.firstOrNull()
85
86
val prefix = owner?.modId ?: owner?.name ?: "unknown"
87
-
+
88
val helper = "${prefix}:${command.commandName}"
89
cch.commandMap[helper] = command
90
91
aliasMap[command] = helper
92
}
93
94
fun getCommandModOwner(command: Class<*>) : List<ModContainer> {
95
- val packageName = command.`package`.name ?: return emptyList()
+ val idx = command.name.lastIndexOf(".")
96
+ if (idx == -1) return emptyList()
97
+ val packageName = command.name.substring(0, idx)
98
return Loader.instance().modList.filter { packageName in it.ownedPackages }
99
100
0 commit comments