diff options
author | bowser0000 <bowser0000@gmail.com> | 2021-06-29 15:16:41 -0400 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2021-06-29 15:16:41 -0400 |
commit | 1b1cb67e9ed9023b62095313297d510e73a44d53 (patch) | |
tree | e964a928511784477a937286f3c7358a0eb2bc49 | |
parent | 6e2a26294383a67691d837dbbdd00adffbe70a80 (diff) | |
download | SkyblockMod-1b1cb67e9ed9023b62095313297d510e73a44d53.tar.gz SkyblockMod-1b1cb67e9ed9023b62095313297d510e73a44d53.tar.bz2 SkyblockMod-1b1cb67e9ed9023b62095313297d510e73a44d53.zip |
Add enderman slayer to commands
-rw-r--r-- | src/main/java/me/Danker/commands/PlayerCommand.java | 10 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/SlayerCommand.java | 8 |
2 files changed, 15 insertions, 3 deletions
diff --git a/src/main/java/me/Danker/commands/PlayerCommand.java b/src/main/java/me/Danker/commands/PlayerCommand.java index ef0ed4c..6236168 100644 --- a/src/main/java/me/Danker/commands/PlayerCommand.java +++ b/src/main/java/me/Danker/commands/PlayerCommand.java @@ -193,6 +193,11 @@ public class PlayerCommand extends CommandBase { if (slayersObject.get("wolf").getAsJsonObject().has("xp")) { wolfXP = slayersObject.get("wolf").getAsJsonObject().get("xp").getAsInt(); } + // Enderman + int endermanXP = 0; + if (slayersObject.get("enderman").getAsJsonObject().has("xp")) { + endermanXP = slayersObject.get("enderman").getAsJsonObject().get("xp").getAsInt(); + } // Bank System.out.println("Fetching bank + purse coins..."); @@ -233,10 +238,11 @@ public class PlayerCommand extends CommandBase { DankersSkyblockMod.TYPE_COLOUR + " Taming: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + tamingLevel + "\n" + EnumChatFormatting.AQUA + " Average Skill Level: " + DankersSkyblockMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + skillAvg + "\n" + EnumChatFormatting.AQUA + " True Average Skill Level: " + DankersSkyblockMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + trueAvg + "\n\n" + - EnumChatFormatting.AQUA + " " + username + "'s Total Slayer XP: " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + nf.format(zombieXP + spiderXP + wolfXP) + "\n" + + EnumChatFormatting.AQUA + " " + username + "'s Total Slayer XP: " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + nf.format(zombieXP + spiderXP + wolfXP + endermanXP) + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Zombie XP: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(zombieXP) + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Spider XP: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(spiderXP) + "\n" + - DankersSkyblockMod.TYPE_COLOUR + " Wolf XP: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(wolfXP) + "\n\n" + + DankersSkyblockMod.TYPE_COLOUR + " Wolf XP: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(wolfXP) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Enderman XP: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(endermanXP) + "\n\n" + EnumChatFormatting.AQUA + " " + username + "'s Coins:\n" + DankersSkyblockMod.TYPE_COLOUR + " Bank: " + (bankCoins == 0 ? EnumChatFormatting.RED + "Bank API disabled." : EnumChatFormatting.GOLD + nf.format(bankCoins)) + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Purse: " + EnumChatFormatting.GOLD + nf.format(purseCoins) + "\n" + diff --git a/src/main/java/me/Danker/commands/SlayerCommand.java b/src/main/java/me/Danker/commands/SlayerCommand.java index 91a1a61..45d3548 100644 --- a/src/main/java/me/Danker/commands/SlayerCommand.java +++ b/src/main/java/me/Danker/commands/SlayerCommand.java @@ -107,13 +107,19 @@ public class SlayerCommand extends CommandBase { if (slayersObject.get("wolf").getAsJsonObject().has("xp")) { wolfXP = slayersObject.get("wolf").getAsJsonObject().get("xp").getAsInt(); } + // Enderman + int endermanXP = 0; + if (slayersObject.get("enderman").getAsJsonObject().has("xp")) { + endermanXP = slayersObject.get("enderman").getAsJsonObject().get("xp").getAsInt(); + } NumberFormat nf = NumberFormat.getIntegerInstance(Locale.US); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + - EnumChatFormatting.AQUA + " " + username + "'s Total XP: " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + nf.format(zombieXP + spiderXP + wolfXP) + "\n" + + EnumChatFormatting.AQUA + " " + username + "'s Total XP: " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + nf.format(zombieXP + spiderXP + wolfXP + endermanXP) + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Zombie XP: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(zombieXP) + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Spider XP: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(spiderXP) + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Wolf XP: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(wolfXP) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Enderman XP: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(endermanXP) + "\n" + DankersSkyblockMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------")); }).start(); |