Fix a small issue with Future Disguises

This commit is contained in:
libraryaddict 2015-09-25 14:07:12 +12:00
parent e8725b38ab
commit fa30ba1e16
1 changed files with 16 additions and 0 deletions

View File

@ -628,6 +628,22 @@ public class DisguiseManager extends MiniPlugin implements IPacketHandler
{ {
entry.getKey().setEntity(entity); 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()); disguise(entry.getKey(), false, entry.getValue());
} }
} }