diff options
Diffstat (limited to 'src/main/kotlin/io/dico/parcels2/command/ParcelCommandBuilder.kt')
-rw-r--r-- | src/main/kotlin/io/dico/parcels2/command/ParcelCommandBuilder.kt | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main/kotlin/io/dico/parcels2/command/ParcelCommandBuilder.kt b/src/main/kotlin/io/dico/parcels2/command/ParcelCommandBuilder.kt index e06357f..964e282 100644 --- a/src/main/kotlin/io/dico/parcels2/command/ParcelCommandBuilder.kt +++ b/src/main/kotlin/io/dico/parcels2/command/ParcelCommandBuilder.kt @@ -3,7 +3,7 @@ package io.dico.parcels2.command import io.dico.dicore.command.CommandBuilder import io.dico.dicore.command.ICommandDispatcher import io.dico.parcels2.ParcelsPlugin -import io.dico.parcels2.debugging +import io.dico.parcels2.logger @Suppress("UsePropertyAccessSyntax") fun getParcelCommands(plugin: ParcelsPlugin): ICommandDispatcher { @@ -11,16 +11,25 @@ fun getParcelCommands(plugin: ParcelsPlugin): ICommandDispatcher { return CommandBuilder() .addParameterType(false, ParcelParameterType(plugin.worlds)) .addParameterType(true, ParcelHomeParameterType(plugin.worlds)) + .group("parcel", "plot", "plots", "p") .registerCommands(ParcelCommands(plugin)) + .registerCommands(ParcelAddCommands(plugin)) + + .group("option") + .apply { ParcelOptionCommands.setGroupDescription(this) } + .registerCommands(ParcelOptionCommands(plugin)) + .parent() + .putDebugCommands(plugin) + .parent() .getDispatcher() //@formatter:on } private fun CommandBuilder.putDebugCommands(plugin: ParcelsPlugin): CommandBuilder { - if (!debugging) return this + if (!logger.isDebugEnabled) return this //@formatter:off return group("debug", "d") .registerCommands(DebugCommands(plugin)) |