Stop trying to send a self disguise if the player isn't valid.

This commit is contained in:
libraryaddict 2013-11-23 15:21:30 +13:00
parent 17c2d95e1d
commit 447f267811

View File

@ -121,6 +121,9 @@ public class DisguiseUtilities {
*/
public static void sendSelfDisguise(final Player player) {
try {
if (!player.isValid()) {
return;
}
Object world = ReflectionManager.getWorld(player.getWorld());
Object tracker = world.getClass().getField("tracker").get(world);
Object trackedEntities = tracker.getClass().getField("trackedEntities").get(tracker);