aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandToggleDebug.java
blob: 6a17fba6d36c14dc3a41d4a0dec08f1685962875 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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;
    }
}