Permalink
Browse files

Fix exception when skull owneruuid is null

  • Loading branch information...
PseudoKnight committed Dec 19, 2017
1 parent fa61ee7 commit 1295f1038257e17660c1daf33049764f7719c1d2
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/main/java/com/laytonsmith/core/ObjectGenerator.java
@@ -70,7 +70,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
/**
* This file is responsible for converting CH objects into server objects, and
@@ -745,8 +744,10 @@ public MCItemMeta itemMeta(Construct c, MCMaterial mat, Target t) throws ConfigR
}
} else if (meta instanceof MCSkullMeta) {
if (ma.containsKey("owneruuid")) {
UUID id = Static.GetUUID(ma.get("owneruuid", t), t);
((MCSkullMeta) meta).setOwningPlayer(Static.getServer().getOfflinePlayer(id));
Construct id = ma.get("owneruuid", t);
if(!(id instanceof CNull)) {
((MCSkullMeta) meta).setOwningPlayer(Static.getServer().getOfflinePlayer(Static.GetUUID(id, t)));
}
} else if(ma.containsKey("owner")) {
Construct owner = ma.get("owner", t);
if (!(owner instanceof CNull)) {

0 comments on commit 1295f10

Please sign in to comment.