|
25 | 25 | import com.laytonsmith.abstraction.MCLocation; |
26 | 26 | import com.laytonsmith.abstraction.MCMapMeta; |
27 | 27 | import com.laytonsmith.abstraction.MCMetadataValue; |
28 | | -import com.laytonsmith.abstraction.MCOfflinePlayer; |
29 | 28 | import com.laytonsmith.abstraction.MCPattern; |
30 | 29 | import com.laytonsmith.abstraction.MCPlugin; |
31 | 30 | import com.laytonsmith.abstraction.MCPotionData; |
@@ -488,21 +487,10 @@ public Construct itemMeta(MCItemStack is, Target t) { |
488 | 487 | ma.set("author", author, t); |
489 | 488 | ma.set("pages", pages, t); |
490 | 489 | } else if(meta instanceof MCSkullMeta) { |
491 | | - if(Static.getServer().getMinecraftVersion().gte(MCVersion.MC1_12_X)) { |
492 | | - if(((MCSkullMeta) meta).hasOwner()) { |
493 | | - MCOfflinePlayer player = ((MCSkullMeta) meta).getOwningPlayer(); |
494 | | - ma.set("owner", new CString(player.getName(), t), t); |
495 | | - ma.set("owneruuid", new CString(player.getUniqueID().toString(), t), t); |
496 | | - } else { |
497 | | - ma.set("owner", CNull.NULL, t); |
498 | | - ma.set("owneruuid", CNull.NULL, t); |
499 | | - } |
| 490 | + if(((MCSkullMeta) meta).hasOwner()) { |
| 491 | + ma.set("owner", new CString(((MCSkullMeta) meta).getOwner(), t), t); |
500 | 492 | } else { |
501 | | - if(((MCSkullMeta) meta).hasOwner()) { |
502 | | - ma.set("owner", new CString(((MCSkullMeta) meta).getOwner(), t), t); |
503 | | - } else { |
504 | | - ma.set("owner", CNull.NULL, t); |
505 | | - } |
| 493 | + ma.set("owner", CNull.NULL, t); |
506 | 494 | } |
507 | 495 | } else if(meta instanceof MCEnchantmentStorageMeta) { |
508 | 496 | Construct stored; |
@@ -825,16 +813,9 @@ public MCItemMeta itemMeta(Construct c, MCMaterial mat, Target t) throws ConfigR |
825 | 813 | } |
826 | 814 | } |
827 | 815 | } else if(meta instanceof MCSkullMeta) { |
828 | | - if(ma.containsKey("owneruuid")) { |
829 | | - Construct id = ma.get("owneruuid", t); |
830 | | - if(!(id instanceof CNull)) { |
831 | | - ((MCSkullMeta) meta).setOwningPlayer(Static.getServer().getOfflinePlayer(Static.GetUUID(id, t))); |
832 | | - } |
833 | | - } else if(ma.containsKey("owner")) { |
834 | | - Construct owner = ma.get("owner", t); |
835 | | - if(!(owner instanceof CNull)) { |
836 | | - ((MCSkullMeta) meta).setOwner(owner.val()); |
837 | | - } |
| 816 | + Construct owner = ma.get("owner", t); |
| 817 | + if(!(owner instanceof CNull)) { |
| 818 | + ((MCSkullMeta) meta).setOwner(owner.val()); |
838 | 819 | } |
839 | 820 | } else if(meta instanceof MCEnchantmentStorageMeta) { |
840 | 821 | if(ma.containsKey("stored")) { |
|
0 commit comments