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 c93477763..c76c856ad 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,6 +149,22 @@ 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(); @@ -411,6 +427,8 @@ public class CastleManager extends MiniPlugin removePeasant(player); _kings.put(player, new King(player)); + + updateLobbyKing(); } /** @@ -462,6 +480,7 @@ public class CastleManager extends MiniPlugin removeKing(player); _peasants.put(player, new Peasant(player)); + updateLobbyKing(); } /**