Skip to content

Commit

Permalink
Fix commands initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
0ffz committed Dec 15, 2021
1 parent 717cc6e commit f7ea0f4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import org.bukkit.command.Command
import org.bukkit.command.CommandSender
import org.bukkit.command.TabCompleter

object DeeperCommandExecutor : IdofrontCommandExecutor(), TabCompleter {
class DeeperCommandExecutor : IdofrontCommandExecutor(), TabCompleter {
override val commands: CommandHolder = commands(deeperWorld) {
("deeperworld" / "dw") {
"tp"(desc = "Enables or disables automatic teleports between sections for a player") {
Expand Down Expand Up @@ -180,11 +180,6 @@ object DeeperCommandExecutor : IdofrontCommandExecutor(), TabCompleter {
}
}
}
"linfo"{
playerAction {
sender.error("Please use /dw linfo or /deeperworld layerinfo instead")
}
}
}

override fun onTabComplete(
Expand All @@ -203,6 +198,7 @@ object DeeperCommandExecutor : IdofrontCommandExecutor(), TabCompleter {
2 -> {
when (args[0]) {
"tp" -> listOf("on", "off")
"time" -> listOf("set", "add")
else -> listOf()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class DeeperWorldPlugin : JavaPlugin() {
)

//register command executor
DeeperCommandExecutor
DeeperCommandExecutor()

// Initialize falling damage task
if (DeeperConfig.data.fall.maxSafeDist >= 0f && DeeperConfig.data.fall.fallDistanceDamageScaler >= 0.0) {
Expand Down

0 comments on commit f7ea0f4

Please sign in to comment.