aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/commands
diff options
context:
space:
mode:
authorThatGravyBoat <thatgravyboat@gmail.com>2021-07-11 18:57:24 -0230
committerThatGravyBoat <thatgravyboat@gmail.com>2021-07-11 18:57:24 -0230
commit3a1917c8a0af4157cc1e6d5f3986e89377f245d8 (patch)
tree0a25fdc3ad1fc48da3f0d06c501f772ac9cfc353 /src/main/java/com/thatgravyboat/skyblockhud/commands
parent5a98a98dfc0009599b90280ae3a1f166de21e6e8 (diff)
downloadSkyblockHud-Death-Defied-3a1917c8a0af4157cc1e6d5f3986e89377f245d8.tar.gz
SkyblockHud-Death-Defied-3a1917c8a0af4157cc1e6d5f3986e89377f245d8.tar.bz2
SkyblockHud-Death-Defied-3a1917c8a0af4157cc1e6d5f3986e89377f245d8.zip
Added Mining Overlay including drill bar and heat bar
Added mana cost display Update Location Stuff Added new mining events stopped scoreboard logging spam removed missing location logging as hypixel dumb and sends the wrong thing once and a while causing it to log useless stuff. Added DEV Commands
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/commands')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java b/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java
index 9f0a22d..ee2eb2b 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java
@@ -1,6 +1,7 @@
package com.thatgravyboat.skyblockhud.commands;
import com.google.common.collect.ImmutableSet;
+import com.thatgravyboat.skyblockhud.DevModeConstants;
import com.thatgravyboat.skyblockhud.SkyblockHud;
import com.thatgravyboat.skyblockhud.api.LeaderboardGetter;
import com.thatgravyboat.skyblockhud.config.SBHConfigEditor;
@@ -8,8 +9,6 @@ import com.thatgravyboat.skyblockhud.core.GuiScreenElementWrapper;
import com.thatgravyboat.skyblockhud.handlers.MapHandler;
import com.thatgravyboat.skyblockhud.location.LocationHandler;
import com.thatgravyboat.skyblockhud.playerstats.ActionBarParsing;
-import java.awt.*;
-import java.awt.datatransfer.StringSelection;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.boss.BossStatus;
import net.minecraft.util.ChatComponentText;
@@ -17,6 +16,9 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.client.ClientCommandHandler;
import org.apache.commons.lang3.StringUtils;
+import java.awt.*;
+import java.awt.datatransfer.StringSelection;
+
public class Commands {
private static boolean devMode = false;
@@ -31,7 +33,7 @@ public class Commands {
}
};
- private static final SimpleSubCommand devCommand = new SimpleSubCommand("sbhdev", ImmutableSet.of("copyBossBar", "copyScoreboard", "copyActionBar")) {
+ private static final SimpleSubCommand devCommand = new SimpleSubCommand("sbhdev", ImmutableSet.of("copyBossBar", "copyScoreboard", "copyActionBar", "mobDeathLogging")) {
@Override
void processSubCommand(ICommandSender sender, String subCommand, String[] args) {
StringSelection clipboard = null;
@@ -47,17 +49,20 @@ public class Commands {
case "copyActionBar":
clipboard = new StringSelection(ActionBarParsing.lastLowActionBar);
break;
+ case "mobDeathLogging":
+ DevModeConstants.mobDeathLogging = !DevModeConstants.mobDeathLogging;
+ sendSBHMessage(sender,"Mob Death Logging " + (DevModeConstants.mobDeathLogging?"Enabled!":"Disabled!"));
}
if (clipboard != null) {
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(clipboard, clipboard);
- sender.addChatMessage(new ChatComponentText("[" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + "SkyBlockHud" + EnumChatFormatting.RESET + "] : " + EnumChatFormatting.GRAY + "Info copied to clipboard!"));
+ sendSBHMessage(sender,"Info copied to clipboard!");
}
}
@Override
void processNoSubCommand(ICommandSender sender) {
devMode = !devMode;
- sender.addChatMessage(new ChatComponentText("Dev Mode " + (devMode ? "Enabled" : "Disabled") + "!"));
+ sender.addChatMessage(new ChatComponentText("Dev Mode " + (devMode ? "Enabled!" : "Disabled!")));
}
};
@@ -81,4 +86,9 @@ public class Commands {
ClientCommandHandler.instance.registerCommand(mapCommand);
ClientCommandHandler.instance.registerCommand(devCommand);
}
+
+
+ private static void sendSBHMessage(ICommandSender sender, String message){
+ sender.addChatMessage(new ChatComponentText("[" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + "SkyBlockHud" + EnumChatFormatting.RESET + "] : " + EnumChatFormatting.GRAY + message));
+ }
}