aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/commands/ArmourCommand.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/me/Danker/commands/ArmourCommand.java')
-rw-r--r--src/main/java/me/Danker/commands/ArmourCommand.java39
1 files changed, 19 insertions, 20 deletions
diff --git a/src/main/java/me/Danker/commands/ArmourCommand.java b/src/main/java/me/Danker/commands/ArmourCommand.java
index a10d75f..579a413 100644
--- a/src/main/java/me/Danker/commands/ArmourCommand.java
+++ b/src/main/java/me/Danker/commands/ArmourCommand.java
@@ -1,15 +1,7 @@
package me.Danker.commands;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Base64;
-import java.util.Collections;
-import java.util.List;
-
import com.google.gson.JsonObject;
-
-import me.Danker.TheMod;
+import me.Danker.DankersSkyblockMod;
import me.Danker.handlers.APIHandler;
import me.Danker.handlers.ConfigHandler;
import me.Danker.utils.Utils;
@@ -24,6 +16,13 @@ import net.minecraft.util.BlockPos;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Base64;
+import java.util.Collections;
+import java.util.List;
+
public class ArmourCommand extends CommandBase {
@Override
@@ -72,10 +71,10 @@ public class ArmourCommand extends CommandBase {
if (arg1.length == 0) {
username = player.getName();
uuid = player.getUniqueID().toString().replaceAll("[\\-]", "");
- player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking armour of " + TheMod.SECONDARY_COLOUR + username));
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking armour of " + DankersSkyblockMod.SECONDARY_COLOUR + username));
} else {
username = arg1[0];
- player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking armour of " + TheMod.SECONDARY_COLOUR + username));
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking armour of " + DankersSkyblockMod.SECONDARY_COLOUR + username));
uuid = APIHandler.getUUID(username);
}
@@ -88,7 +87,7 @@ public class ArmourCommand extends CommandBase {
JsonObject profileResponse = APIHandler.getResponse(profileURL);
if (!profileResponse.get("success").getAsBoolean()) {
String reason = profileResponse.get("cause").getAsString();
- player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Failed with reason: " + reason));
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason));
return;
}
@@ -131,16 +130,16 @@ public class ArmourCommand extends CommandBase {
}
armourStream.close();
- player.addChatMessage(new ChatComponentText(TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" +
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" +
EnumChatFormatting.AQUA + " " + username + "'s Armour:\n" +
- TheMod.TYPE_COLOUR + " Helmet: " + helmet + "\n" +
- TheMod.TYPE_COLOUR + " Chestplate: " + chest + "\n" +
- TheMod.TYPE_COLOUR + " Leggings: " + legs + "\n" +
- TheMod.TYPE_COLOUR + " Boots: " + boots + "\n" +
- TheMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------"));
+ DankersSkyblockMod.TYPE_COLOUR + " Helmet: " + helmet + "\n" +
+ DankersSkyblockMod.TYPE_COLOUR + " Chestplate: " + chest + "\n" +
+ DankersSkyblockMod.TYPE_COLOUR + " Leggings: " + legs + "\n" +
+ DankersSkyblockMod.TYPE_COLOUR + " Boots: " + boots + "\n" +
+ DankersSkyblockMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------"));
} catch (IOException ex) {
- player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "An error has occurred while reading inventory data. See logs for more info."));
- System.err.println(ex);
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "An error has occurred while reading inventory data. See logs for more info."));
+ ex.printStackTrace();
}
}).start();
}