Yamakaja / commanditems

Assign commands to items
https://www.spigotmc.org/resources/command-items.42556/
MIT License
9 stars 15 forks source link

add function to disable item if they have a perm #5

Closed CaszGamerMD closed 4 years ago

CaszGamerMD commented 5 years ago

items that grant permissions, should have an easy function to prevent repeat use.

CaszGamerMD commented 5 years ago

never used gradle, and its not letting me build,

please add: if (!itemDefinition.getAlreadyUsed().equals("") && event.getPlayer().hasPermission(itemDefinition.getAlreadyUsed())){ event.getPlayer().sendMessage(ChatColor.RED + "You have used this item!"); return; } after line 118 "if (!event.getPlayer().hasPermission("cmdi.item." + command))" of CommandItemManager.java

also add: @JsonProperty private String alreadyUsed;

public String getAlreadyUsed() { return alreadyUsed; }

to ItemDefinition please <3

Yamakaja commented 4 years ago

Modern permissions plugins allow you to give players and groups "negated permissions", i.e. take away permissions that they would usually inherit.