Fix allerged null pointer exception

This commit is contained in:
libraryaddict 2016-10-05 22:36:40 +13:00
parent 89829bf5c5
commit b28c6c1336
3 changed files with 16 additions and 3 deletions

View File

@ -93,7 +93,11 @@ public class MiscDisguise extends TargetedDisguise
disguise.setHideHeldItemFromSelf(isHidingHeldItemFromSelf()); disguise.setHideHeldItemFromSelf(isHidingHeldItemFromSelf());
disguise.setVelocitySent(isVelocitySent()); disguise.setVelocitySent(isVelocitySent());
disguise.setModifyBoundingBox(isModifyBoundingBox()); disguise.setModifyBoundingBox(isModifyBoundingBox());
if (getWatcher() != null)
{
disguise.setWatcher(getWatcher().clone(disguise)); disguise.setWatcher(getWatcher().clone(disguise));
}
return disguise; return disguise;
} }

View File

@ -54,7 +54,12 @@ public class MobDisguise extends TargetedDisguise
disguise.setHideHeldItemFromSelf(isHidingHeldItemFromSelf()); disguise.setHideHeldItemFromSelf(isHidingHeldItemFromSelf());
disguise.setVelocitySent(isVelocitySent()); disguise.setVelocitySent(isVelocitySent());
disguise.setModifyBoundingBox(isModifyBoundingBox()); disguise.setModifyBoundingBox(isModifyBoundingBox());
if (getWatcher() != null)
{
disguise.setWatcher(getWatcher().clone(disguise)); disguise.setWatcher(getWatcher().clone(disguise));
}
return disguise; return disguise;
} }

View File

@ -106,7 +106,11 @@ public class PlayerDisguise extends TargetedDisguise
disguise.setHideHeldItemFromSelf(isHidingHeldItemFromSelf()); disguise.setHideHeldItemFromSelf(isHidingHeldItemFromSelf());
disguise.setVelocitySent(isVelocitySent()); disguise.setVelocitySent(isVelocitySent());
disguise.setModifyBoundingBox(isModifyBoundingBox()); disguise.setModifyBoundingBox(isModifyBoundingBox());
if (getWatcher() != null)
{
disguise.setWatcher(getWatcher().clone(disguise)); disguise.setWatcher(getWatcher().clone(disguise));
}
disguise.createDisguise(DisguiseType.PLAYER); disguise.createDisguise(DisguiseType.PLAYER);