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 d81419bcd..b9ee81ca9 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 @@ -175,16 +175,20 @@ public class CastleManager extends MiniPlugin */ private void updateHologram() { - if (_hologram == null) - return; + if (_hologram != null) + { + _hologram.stop(); + } if (_king != null && _king.getKing().isOnline()) { - _hologram.setText("Mineplex Castle", "Current King: " + F.name(_king.getKing().getName()) + "!"); + _hologram = new Hologram(_hologramManager, _hologramLocation, "Mineplex Castle", "Current King: " + F.name(_king.getKing().getName()) + "!"); + _hologram.start(); } else { - _hologram.setText("Mineplex Castle", "Current King: " + F.name("No one") + "!"); + _hologram = new Hologram(_hologramManager, _hologramLocation, "Mineplex Castle", "Current King: " + F.name("No one") + "!"); + _hologram.start(); } } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/king/ParticleKing.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/king/ParticleKing.java index ea6fc2e0d..8598ef2da 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/king/ParticleKing.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/king/ParticleKing.java @@ -200,6 +200,9 @@ public class ParticleKing extends ParticleGadget { if (_kings.size() == 0) return null; + else if (_kings.size() == 1) + return _kings.get(0); + King lobbyKing = null; int peasants = 0; for (King king : _kings) @@ -222,11 +225,11 @@ public class ParticleKing extends ParticleGadget { if (!king.equals(oldKing)) { - Bukkit.getPluginManager().callEvent(new UpdateKingEvent(oldKing, king)); + Bukkit.getPluginManager().callEvent(new UpdateKingEvent(king, oldKing)); } } else { - Bukkit.getPluginManager().callEvent(new UpdateKingEvent(oldKing, king)); + Bukkit.getPluginManager().callEvent(new UpdateKingEvent(king, oldKing)); } } }