From fa30ba1e16e8ef9861699f3332a5142b4effc039 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Fri, 25 Sep 2015 14:07:12 +1200 Subject: [PATCH] Fix a small issue with Future Disguises --- .../mineplex/core/disguise/DisguiseManager.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/disguise/DisguiseManager.java b/Plugins/Mineplex.Core/src/mineplex/core/disguise/DisguiseManager.java index 62e4abf3f..59eab8c1b 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/disguise/DisguiseManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/disguise/DisguiseManager.java @@ -628,6 +628,22 @@ public class DisguiseManager extends MiniPlugin implements IPacketHandler { entry.getKey().setEntity(entity); + boolean cancel = entry.getValue().length == 0; + + for (Player player : entry.getValue()) + { + if (player == owner) + { + cancel = true; + break; + } + } + + if (cancel) + { + packetInfo.setCancelled(true); + } + disguise(entry.getKey(), false, entry.getValue()); } }