mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Added item-permission
This commit is contained in:
parent
4d52b034f1
commit
a8151ec58b
@ -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!");
|
||||
|
@ -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++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user