From 804a6653635028011b479bba730d0e7a8fe2d891 Mon Sep 17 00:00:00 2001 From: Trixkz Date: Wed, 24 Nov 2021 23:57:19 -0500 Subject: [PATCH] t --- src/main/java/rip/tilly/bedwars/game/Game.java | 10 +++++----- .../tilly/bedwars/listeners/game/MovementListener.java | 2 +- .../bedwars/playerdata/currentgame/TeamUpgrades.java | 6 ++---- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/main/java/rip/tilly/bedwars/game/Game.java b/src/main/java/rip/tilly/bedwars/game/Game.java index 028013e..ea6c40f 100644 --- a/src/main/java/rip/tilly/bedwars/game/Game.java +++ b/src/main/java/rip/tilly/bedwars/game/Game.java @@ -236,31 +236,31 @@ public class Game { public void tick(int amount, Game game) { if (this.secondsToMinutes(amount) == 5D) { - game.broadcast("&bDiamond &egenerators have been upgraded to &bTier II"); + game.broadcast("&bDiamond &egenerators have been upgraded to &cTier II"); this.diamondGeneratorTier = GeneratorTier.TWO; } if (this.secondsToMinutes(amount) == 8D) { - game.broadcast("&aEmerald &egenerators have been upgraded to &bTier II"); + game.broadcast("&aEmerald &egenerators have been upgraded to &cTier II"); this.emeraldGeneratorTier = GeneratorTier.TWO; } if (this.secondsToMinutes(amount) == 10D) { - game.broadcast("&bDiamond &egenerators have been upgraded to &bTier III"); + game.broadcast("&bDiamond &egenerators have been upgraded to &cTier III"); this.diamondGeneratorTier = GeneratorTier.THREE; } if (this.secondsToMinutes(amount) == 12D) { - game.broadcast("&aEmerald &egenerators have been upgraded to &bTier III"); + game.broadcast("&aEmerald &egenerators have been upgraded to &cTier III"); this.emeraldGeneratorTier = GeneratorTier.THREE; } if (this.secondsToMinutes(amount) == 15D) { - game.broadcast("&bDiamond &egenerators have been upgraded to &bTier IV"); + game.broadcast("&bDiamond &egenerators have been upgraded to &cTier IV"); this.diamondGeneratorTier = GeneratorTier.FOUR; } diff --git a/src/main/java/rip/tilly/bedwars/listeners/game/MovementListener.java b/src/main/java/rip/tilly/bedwars/listeners/game/MovementListener.java index 3492d0a..3e31caa 100644 --- a/src/main/java/rip/tilly/bedwars/listeners/game/MovementListener.java +++ b/src/main/java/rip/tilly/bedwars/listeners/game/MovementListener.java @@ -81,7 +81,7 @@ public class MovementListener implements Listener { } if (opposingTeam.getPlayerTeam().getTeamUpgrades().getLevelForUpgrade(Upgrade.TRAP) != 0) { - if (player.getLocation().distance((playerData.getTeamId() == 0 ? game.getCopiedArena().getA().toBukkitLocation() : game.getCopiedArena().getB().toBukkitLocation())) < 15) { + if (player.getLocation().distance(playerData.getTeamId() == 0 ? game.getCopiedArena().getA().toBukkitLocation() : game.getCopiedArena().getB().toBukkitLocation()) < 15) { opposingTeam.getPlayerTeam().getTeamUpgrades().getUpgrades().remove(Upgrade.TRAP); player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW_DIGGING, 100, 5)); diff --git a/src/main/java/rip/tilly/bedwars/playerdata/currentgame/TeamUpgrades.java b/src/main/java/rip/tilly/bedwars/playerdata/currentgame/TeamUpgrades.java index e90cdc7..5bb75ba 100644 --- a/src/main/java/rip/tilly/bedwars/playerdata/currentgame/TeamUpgrades.java +++ b/src/main/java/rip/tilly/bedwars/playerdata/currentgame/TeamUpgrades.java @@ -45,19 +45,17 @@ public class TeamUpgrades { gameTeam.playingPlayers().forEach(teamPlayer -> { teamPlayer.sendMessage(CC.translate("&6" + player.getName() + " upgraded " + upgrade.getFormattedName() + " to &cTier " + upgrade.getNumberToRomanNumeral(level))); - // System.out.println("11111111111111111111111 - " + player.getName()); + this.giveTeamArmor(player); int upgradeLevel = 0; switch (upgrade) { case SHARPENED_SWORDS: - // System.out.println("2222222222222222"); for (ListIterator listIterator = player.getInventory().iterator(); listIterator.hasNext();) { ItemStack itemStack = listIterator.next(); - // System.out.println("33333333333333333"); + if (itemStack != null && itemStack.getType().name().toLowerCase().contains("sword")) { - // System.out.println("444444444444444444444"); itemStack.addEnchantment(Enchantment.DAMAGE_ALL, 1); } }