SteamWar/SpigotCore
Archiviert
13
0

Even more Cache

Dieser Commit ist enthalten in:
Chaoscaot 2021-04-29 12:02:12 +02:00
Ursprung 24f605daf2
Commit 6c2d9d067f

Datei anzeigen

@ -21,7 +21,6 @@ package de.steamwar.inventory;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.SkullMeta; import org.bukkit.inventory.meta.SkullMeta;
@ -271,12 +270,7 @@ class SWItem_14 {
ItemStack head = new ItemStack(Material.PLAYER_HEAD, 1); ItemStack head = new ItemStack(Material.PLAYER_HEAD, 1);
SkullMeta headmeta = (SkullMeta) head.getItemMeta(); SkullMeta headmeta = (SkullMeta) head.getItemMeta();
assert headmeta != null; assert headmeta != null;
Player p = Bukkit.getPlayerExact(player); headmeta.setOwningPlayer(Bukkit.getOfflinePlayer(player));
if (p != null) {
headmeta.setOwningPlayer(p);
} else {
headmeta.setOwner(player);
}
headmeta.setDisplayName(player); headmeta.setDisplayName(player);
head.setItemMeta(headmeta); head.setItemMeta(headmeta);
return head; return head;