mirror of
https://github.com/songoda/UltimateModeration.git
synced 2024-11-13 22:05:17 +01:00
Fixed an issue with creating templates in 1.12 resolves SD-2369
This commit is contained in:
parent
e13cea4327
commit
f82ea9e223
@ -55,16 +55,18 @@ public class GUIPunish extends AbstractGUI {
|
||||
@Override
|
||||
protected void constructGUI() {
|
||||
inventory.clear();
|
||||
ItemStack head = new ItemStack(plugin.isServerVersionAtLeast(ServerVersion.V1_13) ? Material.PLAYER_HEAD : Material.valueOf("SKULL_ITEM"), 1, (byte) 3);
|
||||
SkullMeta meta = ((SkullMeta) head.getItemMeta());
|
||||
if (plugin.isServerVersionAtLeast(ServerVersion.V1_13))
|
||||
meta.setOwningPlayer(toModerate);
|
||||
else
|
||||
meta.setOwner(toModerate.getName());
|
||||
head.setItemMeta(meta);
|
||||
|
||||
if (toModerate != null)
|
||||
if (toModerate != null) {
|
||||
ItemStack head = new ItemStack(plugin.isServerVersionAtLeast(ServerVersion.V1_13) ? Material.PLAYER_HEAD : Material.valueOf("SKULL_ITEM"), 1, (byte) 3);
|
||||
SkullMeta meta = ((SkullMeta) head.getItemMeta());
|
||||
if (plugin.isServerVersionAtLeast(ServerVersion.V1_13))
|
||||
meta.setOwningPlayer(toModerate);
|
||||
else
|
||||
meta.setOwner(toModerate.getName());
|
||||
head.setItemMeta(meta);
|
||||
|
||||
createButton(13, head, "&7&l" + toModerate.getName());
|
||||
}
|
||||
|
||||
createButton(22, Material.EMERALD_BLOCK, plugin.getLocale().getMessage("gui.punish.submit"));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user