From 2a4d8f550661a510ec4abbeabdc7b6fcb03322a5 Mon Sep 17 00:00:00 2001 From: syeyoung <42869671+cyoung06@users.noreply.github.com> Date: Sat, 28 Nov 2020 00:20:43 +0900 Subject: DEBUG Command --- .../dungeonsguide/commands/CommandToggleDebug.java | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/commands/CommandToggleDebug.java (limited to 'src/main/java/kr/syeyoung/dungeonsguide/commands') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandToggleDebug.java b/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandToggleDebug.java new file mode 100644 index 00000000..6a17fba6 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandToggleDebug.java @@ -0,0 +1,29 @@ +package kr.syeyoung.dungeonsguide.commands; + +import kr.syeyoung.dungeonsguide.DungeonsGuide; +import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoomInfoRegistry; +import net.minecraft.command.CommandBase; +import net.minecraft.command.ICommandSender; +import net.minecraft.util.ChatComponentText; + +public class CommandToggleDebug extends CommandBase { + @Override + public String getCommandName() { + return "debugtoggle"; + } + + @Override + public String getCommandUsage(ICommandSender sender) { + return "debugtoggle"; + } + + @Override + public void processCommand(ICommandSender sender, String[] args) { + DungeonsGuide.DEBUG = !DungeonsGuide.DEBUG; + sender.addChatMessage(new ChatComponentText("Toggled Debug mode to "+DungeonsGuide.DEBUG)); + } + @Override + public int getRequiredPermissionLevel() { + return 0; + } +} -- cgit