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 /src/main/java/me/Danker/commands/SlayerCommand.java | |
parent | 6e2a26294383a67691d837dbbdd00adffbe70a80 (diff) | |
download | SkyblockMod-1b1cb67e9ed9023b62095313297d510e73a44d53.tar.gz SkyblockMod-1b1cb67e9ed9023b62095313297d510e73a44d53.tar.bz2 SkyblockMod-1b1cb67e9ed9023b62095313297d510e73a44d53.zip |
Add enderman slayer to commands
Diffstat (limited to 'src/main/java/me/Danker/commands/SlayerCommand.java')
-rw-r--r-- | src/main/java/me/Danker/commands/SlayerCommand.java | 8 |
1 files changed, 7 insertions, 1 deletions
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(); |