diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-21 14:12:29 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-21 14:12:29 +0200 |
commit | 869d403b3d25209bbf6212ead4cb8168819c7d07 (patch) | |
tree | cd8f820c901d11aacf30a05ae060e7a1518e31dd /src/main/java/at/hannibal2/skyhanni/config | |
parent | 75a4a1d4f430d74bd65d7b9beddf767586fbdf17 (diff) | |
download | skyhanni-869d403b3d25209bbf6212ead4cb8168819c7d07.tar.gz skyhanni-869d403b3d25209bbf6212ead4cb8168819c7d07.tar.bz2 skyhanni-869d403b3d25209bbf6212ead4cb8168819c7d07.zip |
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/commands/SimpleCommand.kt | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/SimpleCommand.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/SimpleCommand.kt index 59c6044c3..764f1243d 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/SimpleCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/SimpleCommand.kt @@ -29,17 +29,11 @@ class SimpleCommand : CommandBase { fun tabComplete(sender: ICommandSender?, args: Array<String>?, pos: BlockPos?): List<String> } - override fun canCommandSenderUseCommand(sender: ICommandSender): Boolean { - return true - } + override fun canCommandSenderUseCommand(sender: ICommandSender) = true - override fun getCommandName(): String { - return commandName - } + override fun getCommandName() = commandName - override fun getCommandUsage(sender: ICommandSender): String { - return "/$commandName" - } + override fun getCommandUsage(sender: ICommandSender) = "/$commandName" override fun processCommand(sender: ICommandSender, args: Array<String>) { try { @@ -49,7 +43,6 @@ class SimpleCommand : CommandBase { } } - override fun addTabCompletionOptions(sender: ICommandSender, args: Array<String>, pos: BlockPos): List<String>? { - return if (tabRunnable != null) tabRunnable!!.tabComplete(sender, args, pos) else null - } + override fun addTabCompletionOptions(sender: ICommandSender, args: Array<String>, pos: BlockPos) = + if (tabRunnable != null) tabRunnable!!.tabComplete(sender, args, pos) else null }
\ No newline at end of file |