aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/commands/ArmourCommand.java
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-12-01 20:03:14 -0500
committerbowser0000 <bowser0000@gmail.com>2020-12-01 20:03:14 -0500
commitdb9ad0bcd3f31ee7ad29dcba99469872c5143dbe (patch)
tree851cfa8a7de9a96e756326c2997a1daa1e4f2aba /src/main/java/me/Danker/commands/ArmourCommand.java
parent425281727a291f36039b80acba12e3fd2304de1a (diff)
downloadSkyblockMod-db9ad0bcd3f31ee7ad29dcba99469872c5143dbe.tar.gz
SkyblockMod-db9ad0bcd3f31ee7ad29dcba99469872c5143dbe.tar.bz2
SkyblockMod-db9ad0bcd3f31ee7ad29dcba99469872c5143dbe.zip
Fix warnings Eclipse didn't tell me about
Also rename TheMod.java to DankersSkyblockMod.java
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();
}