This commit is contained in:
Trixkz 2021-11-24 23:57:19 -05:00
parent c2376ffb5c
commit 804a665363
3 changed files with 8 additions and 10 deletions

View File

@ -236,31 +236,31 @@ public class Game {
public void tick(int amount, Game game) { public void tick(int amount, Game game) {
if (this.secondsToMinutes(amount) == 5D) { 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; this.diamondGeneratorTier = GeneratorTier.TWO;
} }
if (this.secondsToMinutes(amount) == 8D) { 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; this.emeraldGeneratorTier = GeneratorTier.TWO;
} }
if (this.secondsToMinutes(amount) == 10D) { 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; this.diamondGeneratorTier = GeneratorTier.THREE;
} }
if (this.secondsToMinutes(amount) == 12D) { 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; this.emeraldGeneratorTier = GeneratorTier.THREE;
} }
if (this.secondsToMinutes(amount) == 15D) { 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; this.diamondGeneratorTier = GeneratorTier.FOUR;
} }

View File

@ -81,7 +81,7 @@ public class MovementListener implements Listener {
} }
if (opposingTeam.getPlayerTeam().getTeamUpgrades().getLevelForUpgrade(Upgrade.TRAP) != 0) { 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); opposingTeam.getPlayerTeam().getTeamUpgrades().getUpgrades().remove(Upgrade.TRAP);
player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW_DIGGING, 100, 5)); player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW_DIGGING, 100, 5));

View File

@ -45,19 +45,17 @@ public class TeamUpgrades {
gameTeam.playingPlayers().forEach(teamPlayer -> { gameTeam.playingPlayers().forEach(teamPlayer -> {
teamPlayer.sendMessage(CC.translate("&6" + player.getName() + " upgraded " + upgrade.getFormattedName() + " to &cTier " + upgrade.getNumberToRomanNumeral(level))); teamPlayer.sendMessage(CC.translate("&6" + player.getName() + " upgraded " + upgrade.getFormattedName() + " to &cTier " + upgrade.getNumberToRomanNumeral(level)));
// System.out.println("11111111111111111111111 - " + player.getName());
this.giveTeamArmor(player); this.giveTeamArmor(player);
int upgradeLevel = 0; int upgradeLevel = 0;
switch (upgrade) { switch (upgrade) {
case SHARPENED_SWORDS: case SHARPENED_SWORDS:
// System.out.println("2222222222222222");
for (ListIterator<ItemStack> listIterator = player.getInventory().iterator(); listIterator.hasNext();) { for (ListIterator<ItemStack> listIterator = player.getInventory().iterator(); listIterator.hasNext();) {
ItemStack itemStack = listIterator.next(); ItemStack itemStack = listIterator.next();
// System.out.println("33333333333333333");
if (itemStack != null && itemStack.getType().name().toLowerCase().contains("sword")) { if (itemStack != null && itemStack.getType().name().toLowerCase().contains("sword")) {
// System.out.println("444444444444444444444");
itemStack.addEnchantment(Enchantment.DAMAGE_ALL, 1); itemStack.addEnchantment(Enchantment.DAMAGE_ALL, 1);
} }
} }