Skip to content

Commit 6660fa4

Browse files
committed
Remove "owneruuid" key for skull meta. This never worked well. Server implementation needs to be fixed.
1 parent 2b107bd commit 6660fa4

File tree

1 file changed

+6
-25
lines changed

1 file changed

+6
-25
lines changed

src/main/java/com/laytonsmith/core/ObjectGenerator.java

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import com.laytonsmith.abstraction.MCLocation;
2626
import com.laytonsmith.abstraction.MCMapMeta;
2727
import com.laytonsmith.abstraction.MCMetadataValue;
28-
import com.laytonsmith.abstraction.MCOfflinePlayer;
2928
import com.laytonsmith.abstraction.MCPattern;
3029
import com.laytonsmith.abstraction.MCPlugin;
3130
import com.laytonsmith.abstraction.MCPotionData;
@@ -488,21 +487,10 @@ public Construct itemMeta(MCItemStack is, Target t) {
488487
ma.set("author", author, t);
489488
ma.set("pages", pages, t);
490489
} 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);
500492
} 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);
506494
}
507495
} else if(meta instanceof MCEnchantmentStorageMeta) {
508496
Construct stored;
@@ -825,16 +813,9 @@ public MCItemMeta itemMeta(Construct c, MCMaterial mat, Target t) throws ConfigR
825813
}
826814
}
827815
} 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());
838819
}
839820
} else if(meta instanceof MCEnchantmentStorageMeta) {
840821
if(ma.containsKey("stored")) {

0 commit comments

Comments
 (0)