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