From 40361acc9b19d028d3ea34f4d966f241a762c8af Mon Sep 17 00:00:00 2001 From: Ben Date: Sun, 3 Apr 2016 17:51:56 +0100 Subject: [PATCH] fixed cannon becoming off-center --- .../src/mineplex/game/clans/Clans.java | 2 -- .../mineplex/game/clans/clans/siege/weapon/Cannon.java | 8 ++++---- .../game/clans/clans/siege/weapon/SiegeWeapon.java | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java index e06342310..c8665c8be 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java @@ -120,8 +120,6 @@ public class Clans extends JavaPlugin new IncognitoManager(this, _clientManager, packetHandler); - new PacketsInteractionFix(this, packetHandler); - StatsManager statsManager = new StatsManager(this, _clientManager); AchievementManager achievementManager = new AchievementManager(statsManager, _clientManager, _donationManager); Chat chat = new Chat(this, _clientManager, preferenceManager, achievementManager, serverStatusManager.getCurrentServerName()); diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/Cannon.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/Cannon.java index a7e8bf586..20b0108c9 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/Cannon.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/Cannon.java @@ -130,7 +130,7 @@ public class Cannon extends SiegeWeapon public Cannon(Location location, ClanInfo clan, SiegeManager siegeManager, boolean syncWithDb) { - super(2, location, 1400, "Cannon", clan, clan.Clans, siegeManager); + super(2, location.clone().add(0.5, 0, 0.5), 1400, "Cannon", clan, clan.Clans, siegeManager); _syncWithDb = syncWithDb; @@ -297,7 +297,7 @@ public class Cannon extends SiegeWeapon private void loadEntities() { - Slime filler = _location.getWorld().spawn(_location.clone().add(.5, 0, .5), Slime.class); + Slime filler = _location.getWorld().spawn(_location.clone(), Slime.class); UtilEnt.silence(filler, true); UtilEnt.Vegetate(filler); @@ -307,7 +307,7 @@ public class Cannon extends SiegeWeapon addEntity(filler, "Filler_1"); - Slime playerMount = _location.getWorld().spawn(_location.clone().add(.5, 0, .5), Slime.class); + Slime playerMount = _location.getWorld().spawn(_location.clone(), Slime.class); UtilEnt.silence(playerMount, true); UtilEnt.Vegetate(playerMount); @@ -318,7 +318,7 @@ public class Cannon extends SiegeWeapon getEntity("Filler_1").setPassenger(playerMount); addEntity(playerMount, "PLAYERMOUNT"); - ArmorStand weapon = _location.getWorld().spawn(_location.clone().add(.5, 0, .5), ArmorStand.class); + ArmorStand weapon = _location.getWorld().spawn(_location.clone(), ArmorStand.class); UtilEnt.setFakeHead(weapon, true); weapon.teleport(_location); diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/SiegeWeapon.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/SiegeWeapon.java index 353c86dc9..472363459 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/SiegeWeapon.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/SiegeWeapon.java @@ -856,7 +856,7 @@ public abstract class SiegeWeapon implements Listener public Location getLocation() { - return _location; + return _location.clone(); } public double getSize()