diff --git a/src/me/mrCookieSlime/Slimefun/Setup/Messages.java b/src/me/mrCookieSlime/Slimefun/Setup/Messages.java index 718f24b9f..12026bc43 100644 --- a/src/me/mrCookieSlime/Slimefun/Setup/Messages.java +++ b/src/me/mrCookieSlime/Slimefun/Setup/Messages.java @@ -30,6 +30,7 @@ public final class Messages { local.setDefault("messages.fortune-cookie", "&7Help me, I am trapped in a Fortune Cookie Factory!", "&7You will die tomorrow... by a Creeper", "&7At some Point in your Life something bad will happen!!!", "&7Next week you will notice that this is not the real World, you are in a kind of \"Matrix\" or lets call it Computer game. Yes you are in a Computer Game", "&7This Cookie will taste good in a few seconds", "&7You will die soon and the last word you will hear is gonna be \"EXTERMINATE!!!\"", "&7Whatever you do, do not hug a Creeper... I tried it. It feels good, but it's not worth it."); local.setDefault("messages.only-players", "&4This Command is only for Players"); local.setDefault("messages.no-permission", "&4You do not have the required Permission to do this"); + local.setDefault("messages.item-permission", "&rYou do not have Permission", "&rto access this Item"); local.setDefault("messages.usage", "&4Usage: &c%usage%"); local.setDefault("messages.not-online", "&4%player% &cis not online!"); local.setDefault("messages.not-valid-item", "&4%item% &cis not a valid Item!"); diff --git a/src/me/mrCookieSlime/Slimefun/SlimefunGuide.java b/src/me/mrCookieSlime/Slimefun/SlimefunGuide.java index e39501c34..440fb8caa 100644 --- a/src/me/mrCookieSlime/Slimefun/SlimefunGuide.java +++ b/src/me/mrCookieSlime/Slimefun/SlimefunGuide.java @@ -716,7 +716,11 @@ public final class SlimefunGuide { index++; } else { - menu.addItem(index, new CustomItem(Material.BARRIER, StringUtils.formatItemName(sfitem.getItem(), false), "", "&rYou do not have Permission", "&rto access this Item")); + if (Messages.local.getTranslation("messages.item-permission").get(1).isEmpty()) { + menu.addItem(index, new CustomItem(Material.BARRIER, StringUtils.formatItemName(sfitem.getItem(), false), "", Messages.local.getTranslation("messages.item-permission").get(0))); + } else { + menu.addItem(index, new CustomItem(Material.BARRIER, StringUtils.formatItemName(sfitem.getItem(), false), "", Messages.local.getTranslation("messages.item-permission").get(0), Messages.local.getTranslation("messages.item-permission").get(1))); + } menu.addMenuClickHandler(index, (pl, slot, item, action) -> false); index++; }