Null check signature

This commit is contained in:
fullwall 2016-08-24 22:15:13 +08:00
parent 95261e4548
commit 2dab3d338d
2 changed files with 1 additions and 2 deletions

View File

@ -1512,7 +1512,6 @@ public class NPCCommands {
}
Messaging.sendTr(sender, Messages.SKIN_SET, npc.getName(), skinName);
if (npc.isSpawned()) {
SkinnableEntity skinnable = npc.getEntity() instanceof SkinnableEntity ? (SkinnableEntity) npc.getEntity()
: null;
if (skinnable != null) {

View File

@ -327,7 +327,7 @@ public class Skin {
// packet errors that disconnect the client.
Property current = Iterables.getFirst(profile.getProperties().get("textures"), null);
if (current != null && current.getValue().equals(skinProperty.getValue())
&& current.getSignature().equals(skinProperty.getSignature())) {
&& (current.getSignature() != null && current.getSignature().equals(skinProperty.getSignature()))) {
return;
}