From e7c270847b9995154f482f66e6b912097076653d Mon Sep 17 00:00:00 2001 From: LCastr0 Date: Thu, 27 Apr 2017 20:32:46 -0300 Subject: [PATCH] Fixed message, and no longer updates without needing --- .../core/gadget/gadgets/particle/king/CastleManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 729cd203a..4495e003e 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 @@ -198,7 +198,7 @@ public class CastleManager extends MiniPlugin { King oldKing = peasant.getKing(); oldKing.removePeasant(peasant); - UtilPlayer.message(oldKing.getKing(), F.main("Kingdom", "" + F.name(clicker.getName()) + ", a member of your kingdom, was kidnapped by the evil monarch " + F.name(clicker.getName()) + "!")); + UtilPlayer.message(oldKing.getKing(), F.main("Kingdom", "" + F.name(clicked.getName()) + ", a member of your kingdom, was kidnapped by the evil monarch " + F.name(clicker.getName()) + "!")); } peasant.setCooldown(); @@ -432,6 +432,9 @@ public class CastleManager extends MiniPlugin if (_king != null && lobbyKing != null) { + if (_king.amountOfPeasants() == lobbyKing.amountOfPeasants()) + return; + if (!_king.equals(lobbyKing)) { updateKing(_king, lobbyKing);