mirror of
https://github.com/CarmJos/MineConfiguration.git
synced 2026-06-04 21:58:16 +08:00
fix(head): 修复头颅皮肤无法正确应用的问题
This commit is contained in:
+8
-8
@@ -172,10 +172,10 @@ public abstract class ItemModifier<S extends ItemModifier<S, R>, R> {
|
||||
*/
|
||||
@Deprecated
|
||||
public S setSkullOwner(String owner) {
|
||||
return handleItem((item, player) -> {
|
||||
if (!(item.getItemMeta() instanceof SkullMeta)) return;
|
||||
SkullMeta meta = (SkullMeta) item.getItemMeta();
|
||||
meta.setOwner(owner);
|
||||
return handleMeta((meta, player) -> {
|
||||
if (!(meta instanceof SkullMeta)) return;
|
||||
SkullMeta skullMeta = (SkullMeta) meta;
|
||||
skullMeta.setOwner(owner);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -184,10 +184,10 @@ public abstract class ItemModifier<S extends ItemModifier<S, R>, R> {
|
||||
}
|
||||
|
||||
public S setSkullOwner(OfflinePlayer owner) {
|
||||
return handleItem((item, player) -> {
|
||||
if (!(item.getItemMeta() instanceof SkullMeta)) return;
|
||||
SkullMeta meta = (SkullMeta) item.getItemMeta();
|
||||
meta.setOwningPlayer(owner);
|
||||
return handleMeta((meta, player) -> {
|
||||
if (!(meta instanceof SkullMeta)) return;
|
||||
SkullMeta skullMeta = (SkullMeta) meta;
|
||||
skullMeta.setOwningPlayer(owner);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user