From 1eee7bcec705efbf8fbc2dcf0707fd1d121064a7 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Wed, 28 Sep 2022 16:39:00 +0200 Subject: Rename .java to .kt --- .../skyhanni/config/commands/Commands.java | 122 --------------------- .../hannibal2/skyhanni/config/commands/Commands.kt | 122 +++++++++++++++++++++ 2 files changed, 122 insertions(+), 122 deletions(-) delete mode 100644 src/main/java/at/hannibal2/skyhanni/config/commands/Commands.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.java b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.java deleted file mode 100644 index 275a6eaaf..000000000 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.java +++ /dev/null @@ -1,122 +0,0 @@ -package at.hannibal2.skyhanni.config.commands; - -import at.hannibal2.skyhanni.SkyHanniMod; -import at.hannibal2.skyhanni.config.ConfigEditor; -import at.hannibal2.skyhanni.config.core.GuiScreenElementWrapper; -import at.hannibal2.skyhanni.features.MarkedPlayerManager; -import at.hannibal2.skyhanni.test.LorenzTest; -import at.hannibal2.skyhanni.test.command.CopyItemCommand; -import at.hannibal2.skyhanni.test.command.CopyNearbyEntitiesCommand; -import net.minecraft.command.ICommandSender; -import net.minecraftforge.client.ClientCommandHandler; -import org.apache.commons.lang3.StringUtils; - -public class Commands { - - private static final SimpleCommand.ProcessCommandRunnable mainMenu = new SimpleCommand.ProcessCommandRunnable() { - public void processCommand(ICommandSender sender, String[] args) { - if (args.length > 0) { - SkyHanniMod.screenToOpen = new GuiScreenElementWrapper(new ConfigEditor(SkyHanniMod.feature, StringUtils.join(args, " "))); - } else { - SkyHanniMod.screenToOpen = new GuiScreenElementWrapper(new ConfigEditor(SkyHanniMod.feature)); - } - } - }; - - public static void init() { - ClientCommandHandler.instance.registerCommand(new SimpleCommand("sh", mainMenu)); - ClientCommandHandler.instance.registerCommand(new SimpleCommand("skyhanni", mainMenu)); - - ClientCommandHandler.instance.registerCommand( - new SimpleCommand( - "shreloadlocalrepo", - new SimpleCommand.ProcessCommandRunnable() { - public void processCommand(ICommandSender sender, String[] args) { - SkyHanniMod.repo.reloadLocalRepo(); - } - } - ) - ); - - ClientCommandHandler.instance.registerCommand( - new SimpleCommand( - "shupdaterepo", - new SimpleCommand.ProcessCommandRunnable() { - public void processCommand(ICommandSender sender, String[] args) { - SkyHanniMod.repo.updateRepo(); - } - } - ) - ); - ClientCommandHandler.instance.registerCommand( - new SimpleCommand( - "testhanni", - new SimpleCommand.ProcessCommandRunnable() { - public void processCommand(ICommandSender sender, String[] args) { - LorenzTest.Companion.testCommand(args); - } - } - ) - ); - ClientCommandHandler.instance.registerCommand( - new SimpleCommand( - "copyentities", - new SimpleCommand.ProcessCommandRunnable() { - public void processCommand(ICommandSender sender, String[] args) { - CopyNearbyEntitiesCommand.INSTANCE.command(args); - } - } - ) - ); - ClientCommandHandler.instance.registerCommand( - new SimpleCommand( - "copyitem", - new SimpleCommand.ProcessCommandRunnable() { - public void processCommand(ICommandSender sender, String[] args) { - CopyItemCommand.INSTANCE.command(args); - } - } - ) - ); - ClientCommandHandler.instance.registerCommand( - new SimpleCommand( - "shconfigsave", - new SimpleCommand.ProcessCommandRunnable() { - public void processCommand(ICommandSender sender, String[] args) { - SkyHanniMod.configManager.saveConfig(); - } - } - ) - ); - ClientCommandHandler.instance.registerCommand( - new SimpleCommand( - "shmarkplayer", - new SimpleCommand.ProcessCommandRunnable() { - public void processCommand(ICommandSender sender, String[] args) { - MarkedPlayerManager.Companion.command(args); - } - } - ) - ); - ClientCommandHandler.instance.registerCommand( - new SimpleCommand( - "togglepacketlog", - new SimpleCommand.ProcessCommandRunnable() { - public void processCommand(ICommandSender sender, String[] args) { - LorenzTest.Companion.togglePacketLog(); - } - } - ) - ); - ClientCommandHandler.instance.registerCommand( - new SimpleCommand( - "shreloadlisteners", - new SimpleCommand.ProcessCommandRunnable() { - public void processCommand(ICommandSender sender, String[] args) { - LorenzTest.Companion.reloadListeners(); - } - } - ) - ); - } -} diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt new file mode 100644 index 000000000..275a6eaaf --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -0,0 +1,122 @@ +package at.hannibal2.skyhanni.config.commands; + +import at.hannibal2.skyhanni.SkyHanniMod; +import at.hannibal2.skyhanni.config.ConfigEditor; +import at.hannibal2.skyhanni.config.core.GuiScreenElementWrapper; +import at.hannibal2.skyhanni.features.MarkedPlayerManager; +import at.hannibal2.skyhanni.test.LorenzTest; +import at.hannibal2.skyhanni.test.command.CopyItemCommand; +import at.hannibal2.skyhanni.test.command.CopyNearbyEntitiesCommand; +import net.minecraft.command.ICommandSender; +import net.minecraftforge.client.ClientCommandHandler; +import org.apache.commons.lang3.StringUtils; + +public class Commands { + + private static final SimpleCommand.ProcessCommandRunnable mainMenu = new SimpleCommand.ProcessCommandRunnable() { + public void processCommand(ICommandSender sender, String[] args) { + if (args.length > 0) { + SkyHanniMod.screenToOpen = new GuiScreenElementWrapper(new ConfigEditor(SkyHanniMod.feature, StringUtils.join(args, " "))); + } else { + SkyHanniMod.screenToOpen = new GuiScreenElementWrapper(new ConfigEditor(SkyHanniMod.feature)); + } + } + }; + + public static void init() { + ClientCommandHandler.instance.registerCommand(new SimpleCommand("sh", mainMenu)); + ClientCommandHandler.instance.registerCommand(new SimpleCommand("skyhanni", mainMenu)); + + ClientCommandHandler.instance.registerCommand( + new SimpleCommand( + "shreloadlocalrepo", + new SimpleCommand.ProcessCommandRunnable() { + public void processCommand(ICommandSender sender, String[] args) { + SkyHanniMod.repo.reloadLocalRepo(); + } + } + ) + ); + + ClientCommandHandler.instance.registerCommand( + new SimpleCommand( + "shupdaterepo", + new SimpleCommand.ProcessCommandRunnable() { + public void processCommand(ICommandSender sender, String[] args) { + SkyHanniMod.repo.updateRepo(); + } + } + ) + ); + ClientCommandHandler.instance.registerCommand( + new SimpleCommand( + "testhanni", + new SimpleCommand.ProcessCommandRunnable() { + public void processCommand(ICommandSender sender, String[] args) { + LorenzTest.Companion.testCommand(args); + } + } + ) + ); + ClientCommandHandler.instance.registerCommand( + new SimpleCommand( + "copyentities", + new SimpleCommand.ProcessCommandRunnable() { + public void processCommand(ICommandSender sender, String[] args) { + CopyNearbyEntitiesCommand.INSTANCE.command(args); + } + } + ) + ); + ClientCommandHandler.instance.registerCommand( + new SimpleCommand( + "copyitem", + new SimpleCommand.ProcessCommandRunnable() { + public void processCommand(ICommandSender sender, String[] args) { + CopyItemCommand.INSTANCE.command(args); + } + } + ) + ); + ClientCommandHandler.instance.registerCommand( + new SimpleCommand( + "shconfigsave", + new SimpleCommand.ProcessCommandRunnable() { + public void processCommand(ICommandSender sender, String[] args) { + SkyHanniMod.configManager.saveConfig(); + } + } + ) + ); + ClientCommandHandler.instance.registerCommand( + new SimpleCommand( + "shmarkplayer", + new SimpleCommand.ProcessCommandRunnable() { + public void processCommand(ICommandSender sender, String[] args) { + MarkedPlayerManager.Companion.command(args); + } + } + ) + ); + ClientCommandHandler.instance.registerCommand( + new SimpleCommand( + "togglepacketlog", + new SimpleCommand.ProcessCommandRunnable() { + public void processCommand(ICommandSender sender, String[] args) { + LorenzTest.Companion.togglePacketLog(); + } + } + ) + ); + ClientCommandHandler.instance.registerCommand( + new SimpleCommand( + "shreloadlisteners", + new SimpleCommand.ProcessCommandRunnable() { + public void processCommand(ICommandSender sender, String[] args) { + LorenzTest.Companion.reloadListeners(); + } + } + ) + ); + } +} -- cgit