Little Skull Patch
Dieser Commit ist enthalten in:
Ursprung
f0c4786800
Commit
d830eb6f47
@ -19,7 +19,9 @@
|
||||
|
||||
package de.steamwar.inventory;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.SkullMeta;
|
||||
|
||||
@ -269,7 +271,12 @@ class SWItem_14 {
|
||||
ItemStack head = new ItemStack(Material.PLAYER_HEAD, 1);
|
||||
SkullMeta headmeta = (SkullMeta) head.getItemMeta();
|
||||
assert headmeta != null;
|
||||
Player p = Bukkit.getPlayer(player);
|
||||
if (p != null) {
|
||||
headmeta.setOwningPlayer(p);
|
||||
} else {
|
||||
headmeta.setOwner(player);
|
||||
}
|
||||
headmeta.setDisplayName(player);
|
||||
head.setItemMeta(headmeta);
|
||||
return head;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren