aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/commands/DisplayCommand.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/me/Danker/commands/DisplayCommand.java')
-rw-r--r--src/main/java/me/Danker/commands/DisplayCommand.java79
1 files changed, 39 insertions, 40 deletions
diff --git a/src/main/java/me/Danker/commands/DisplayCommand.java b/src/main/java/me/Danker/commands/DisplayCommand.java
index d20491b..74f142a 100644
--- a/src/main/java/me/Danker/commands/DisplayCommand.java
+++ b/src/main/java/me/Danker/commands/DisplayCommand.java
@@ -1,6 +1,7 @@
package me.Danker.commands;
import me.Danker.DankersSkyblockMod;
+import me.Danker.features.loot.LootDisplay;
import me.Danker.handlers.ConfigHandler;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
@@ -12,8 +13,6 @@ import net.minecraft.util.ChatComponentText;
import java.util.List;
public class DisplayCommand extends CommandBase {
- public static String display;
- public static boolean auto;
@Override
public String getCommandName() {
@@ -60,23 +59,23 @@ public class DisplayCommand extends CommandBase {
switch (arg1[0].toLowerCase()) {
case "wolf":
if (showSession) {
- display = "wolf_session";
+ LootDisplay.display = "wolf_session";
} else {
- display = "wolf";
+ LootDisplay.display = "wolf";
}
break;
case "spider":
if (showSession) {
- display = "spider_session";
+ LootDisplay.display = "spider_session";
} else {
- display = "spider";
+ LootDisplay.display = "spider";
}
break;
case "zombie":
if (showSession) {
- display = "zombie_session";
+ LootDisplay.display = "zombie_session";
} else {
- display = "zombie";
+ LootDisplay.display = "zombie";
}
break;
case "fishing":
@@ -84,45 +83,45 @@ public class DisplayCommand extends CommandBase {
switch (arg1[1].toLowerCase()) {
case "winter":
if (showSession) {
- display = "fishing_winter_session";
+ LootDisplay.display = "fishing_winter_session";
} else {
- display = "fishing_winter";
+ LootDisplay.display = "fishing_winter";
}
break;
case "festival":
if (showSession) {
- display = "fishing_festival_session";
+ LootDisplay.display = "fishing_festival_session";
} else {
- display = "fishing_festival";
+ LootDisplay.display = "fishing_festival";
}
break;
case "spooky":
if (showSession) {
- display = "fishing_spooky_session";
+ LootDisplay.display = "fishing_spooky_session";
} else {
- display = "fishing_spooky";
+ LootDisplay.display = "fishing_spooky";
}
break;
default:
if (showSession) {
- display = "fishing_session";
+ LootDisplay.display = "fishing_session";
} else {
- display = "fishing";
+ LootDisplay.display = "fishing";
}
}
} else {
if (showSession) {
- display = "fishing_session";
+ LootDisplay.display = "fishing_session";
} else {
- display = "fishing";
+ LootDisplay.display = "fishing";
}
}
break;
case "mythological":
if (showSession) {
- display = "mythological_session";
+ LootDisplay.display = "mythological_session";
} else {
- display = "mythological";
+ LootDisplay.display = "mythological";
}
break;
case "catacombs":
@@ -135,57 +134,57 @@ public class DisplayCommand extends CommandBase {
case "f1":
case "floor1":
if (showSession) {
- display = "catacombs_floor_one_session";
+ LootDisplay.display = "catacombs_floor_one_session";
} else {
- display = "catacombs_floor_one";
+ LootDisplay.display = "catacombs_floor_one";
}
break;
case "f2":
case "floor2":
if (showSession) {
- display = "catacombs_floor_two_session";
+ LootDisplay.display = "catacombs_floor_two_session";
} else {
- display = "catacombs_floor_two";
+ LootDisplay.display = "catacombs_floor_two";
}
break;
case "f3":
case "floor3":
if (showSession) {
- display = "catacombs_floor_three_session";
+ LootDisplay.display = "catacombs_floor_three_session";
} else {
- display = "catacombs_floor_three";
+ LootDisplay.display = "catacombs_floor_three";
}
break;
case "f4":
case "floor4":
if (showSession) {
- display = "catacombs_floor_four_session";
+ LootDisplay.display = "catacombs_floor_four_session";
} else {
- display = "catacombs_floor_four";
+ LootDisplay.display = "catacombs_floor_four";
}
break;
case "f5":
case "floor5":
if (showSession) {
- display = "catacombs_floor_five_session";
+ LootDisplay.display = "catacombs_floor_five_session";
} else {
- display = "catacombs_floor_five";
+ LootDisplay.display = "catacombs_floor_five";
}
break;
case "f6":
case "floor6":
if (showSession) {
- display = "catacombs_floor_six_session";
+ LootDisplay.display = "catacombs_floor_six_session";
} else {
- display = "catacombs_floor_six";
+ LootDisplay.display = "catacombs_floor_six";
}
break;
case "f7":
case "floor7":
if (showSession) {
- display = "catacombs_floor_seven_session";
+ LootDisplay.display = "catacombs_floor_seven_session";
} else {
- display = "catacombs_floor_seven";
+ LootDisplay.display = "catacombs_floor_seven";
}
break;
default:
@@ -194,22 +193,22 @@ public class DisplayCommand extends CommandBase {
}
break;
case "auto":
- auto = true;
+ LootDisplay.auto = true;
player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Display set to " + DankersSkyblockMod.SECONDARY_COLOUR + "auto" + DankersSkyblockMod.MAIN_COLOUR + "."));
ConfigHandler.writeBooleanConfig("misc", "autoDisplay", true);
return;
case "off":
- display = "off";
+ LootDisplay.display = "off";
break;
default:
player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
return;
}
-
- auto = false;
- player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Display set to " + DankersSkyblockMod.SECONDARY_COLOUR + display + DankersSkyblockMod.MAIN_COLOUR + "."));
+
+ LootDisplay.auto = false;
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Display set to " + DankersSkyblockMod.SECONDARY_COLOUR + LootDisplay.display + DankersSkyblockMod.MAIN_COLOUR + "."));
ConfigHandler.writeBooleanConfig("misc", "autoDisplay", false);
- ConfigHandler.writeStringConfig("misc", "display", display);
+ ConfigHandler.writeStringConfig("misc", "display", LootDisplay.display);
}
}