From 869d403b3d25209bbf6212ead4cb8168819c7d07 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 21 Oct 2023 14:12:29 +0200 Subject: code cleanup --- .../hannibal2/skyhanni/config/commands/SimpleCommand.kt | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'src/main/java') 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?, pos: BlockPos?): List } - 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) { try { @@ -49,7 +43,6 @@ class SimpleCommand : CommandBase { } } - override fun addTabCompletionOptions(sender: ICommandSender, args: Array, pos: BlockPos): List? { - return if (tabRunnable != null) tabRunnable!!.tabComplete(sender, args, pos) else null - } + override fun addTabCompletionOptions(sender: ICommandSender, args: Array, pos: BlockPos) = + if (tabRunnable != null) tabRunnable!!.tabComplete(sender, args, pos) else null } \ No newline at end of file -- cgit