t
This commit is contained in:
parent
c2376ffb5c
commit
804a665363
@ -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;
|
||||
}
|
||||
|
@ -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));
|
||||
|
@ -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<ItemStack> 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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user