From 49fd8d394185e16cdb4b89f8deb1e64a71cd29e5 Mon Sep 17 00:00:00 2001 From: LCastr0 Date: Sun, 30 Apr 2017 12:52:00 -0300 Subject: [PATCH] Fixed item and king not resetting after disabling --- .../gadgets/particle/king/CastleManager.java | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/king/CastleManager.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/king/CastleManager.java index c76c856ad..d4a662f45 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/king/CastleManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/king/CastleManager.java @@ -149,22 +149,6 @@ public class CastleManager extends MiniPlugin Player player = event.getPlayer(); - if (_item != null && event.getFrom().distanceSquared(event.getTo()) >= 2) - { - if (_item.getPassenger() != null) - { - if (_item.getPassenger().equals(player)) - { - event.setCancelled(true); - Location loc = _throneLocations[0].clone().add(0.5, 0.75, 0.5); - loc.setYaw(90); - loc.setPitch(0); - _item.teleport(loc); - _item.setPassenger(player); - } - } - } - if (_king != null) { Player king = _king.getKing(); @@ -282,13 +266,13 @@ public class CastleManager extends MiniPlugin if (!isThrone) return; - Location loc = _throneLocations[0].clone().add(0.5, 0.75, 0.5); + Location loc = _throneLocations[0].clone().add(0.5, 1, 0.5); loc.setYaw(90); loc.setPitch(0); Item item = loc.getWorld().dropItem(loc, new ItemStack(Material.WOOL, 1, (byte) 14)); item.setPickupDelay(Integer.MAX_VALUE); - item.teleport(loc); item.setVelocity(new Vector(0, 0, 0)); + item.teleport(loc); item.setPassenger(player); _item = item; }