From 19803a00ab50658b33b79ac4f2909932c9e4161b Mon Sep 17 00:00:00 2001 From: Morten Date: Sun, 22 Nov 2015 19:06:24 +0100 Subject: [PATCH] Added the Wither Assault fixes to it's own Branch --- .../nautilus/game/arcade/game/games/wither/WitherGame.java | 7 +++---- .../nautilus/game/arcade/kit/perks/PerkBlockRestorer.java | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/wither/WitherGame.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/wither/WitherGame.java index ef4cab48f..957931bc5 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/wither/WitherGame.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/wither/WitherGame.java @@ -273,8 +273,7 @@ public class WitherGame extends TeamGame implements IBlockRestorer return; } - _maxY = GetTeamList().get(1).GetSpawn().getBlockY() - 4; - if(event.getBlock().getLocation().getBlockY() < _maxY) + if(event.getBlock().getLocation().getBlockY() < _maxY - 4) { event.getPlayer().sendMessage(F.main("BlockChecker", "You may not build under this height!")); event.setCancelled(true); @@ -298,7 +297,6 @@ public class WitherGame extends TeamGame implements IBlockRestorer } Location blockLocation = event.getBlock().getLocation(); - _maxY = GetTeamList().get(1).GetSpawn().getBlockY() - 3; if(blockLocation.add(0,1,0).getBlock().getType() == Material.AIR) { for(Player humans: _runners.GetPlayers(true)) @@ -317,7 +315,7 @@ public class WitherGame extends TeamGame implements IBlockRestorer } } - if(blockLocation.getBlockY() < _maxY) + if(blockLocation.getBlockY() < _maxY - 3) { event.getPlayer().sendMessage(F.main("BlockChecker", "You may not build under this height!")); event.setCancelled(true); @@ -435,6 +433,7 @@ public class WitherGame extends TeamGame implements IBlockRestorer if (event.GetState() != GameState.Live) return; + _maxY = GetTeamList().get(1).GetSpawn().getBlockY(); UtilTextMiddle.display(C.cGreen + "Humans Hiding", "15 Seconds until Assault", 10, 80, 10); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBlockRestorer.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBlockRestorer.java index 769df0117..16e17e38d 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBlockRestorer.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBlockRestorer.java @@ -60,7 +60,7 @@ public class PerkBlockRestorer extends Perk implements IThrown org.bukkit.entity.Item ent = player.getWorld().dropItem(player.getEyeLocation(), ItemStackFactory.Instance.CreateStack(Material.COMMAND)); UtilAction.velocity(ent, player.getLocation().getDirection(), 1.2, false, 0, 0.2, 10, false); - Manager.GetProjectile().AddThrow(ent, player, this, -1, false, false, true, false, 0.5f); + Manager.GetProjectile().AddThrow(ent, player, this, -1, false, false, true, true, 0.5f); } @Override