* Added permissions to commands in plugin.yml
* Removed item wand functionality - see 3549431fbc
for reasoning
* Changed a lot of player loading logic
* Added config option DisableSaving - see Jikoo#6
* Fixed closing SilentChest not dropping item on cursor
* Added SilentChest support for shulker boxes
39 lines
1.0 KiB
Java
39 lines
1.0 KiB
Java
package com.lishid.openinv;
|
|
|
|
import org.bukkit.permissions.Permissible;
|
|
|
|
public enum Permissions {
|
|
|
|
OPENINV("OpenInv.openinv"),
|
|
OVERRIDE("OpenInv.override"),
|
|
EXEMPT("OpenInv.exempt"),
|
|
CROSSWORLD("OpenInv.crossworld"),
|
|
SILENT("OpenInv.silent"),
|
|
ANYCHEST("OpenInv.anychest"),
|
|
ENDERCHEST("OpenInv.openender"),
|
|
ENDERCHEST_ALL("OpenInv.openenderall"),
|
|
SEARCH("OpenInv.search"),
|
|
EDITINV("OpenInv.editinv"),
|
|
EDITENDER("OpenInv.editender"),
|
|
OPENSELF("OpenInv.openself");
|
|
|
|
private final String permission;
|
|
|
|
private Permissions(String permission) {
|
|
this.permission = permission;
|
|
}
|
|
|
|
public boolean hasPermission(Permissible permissible) {
|
|
String[] parts = permission.split("\\.");
|
|
String perm = "";
|
|
for (int i = 0; i < parts.length; i++) {
|
|
if (permissible.hasPermission(perm + "*")) {
|
|
return true;
|
|
}
|
|
perm += parts[i] + ".";
|
|
}
|
|
return permissible.hasPermission(permission);
|
|
}
|
|
|
|
}
|