Cleans up permissions a lot and adds missing permissions to plugin.yml

Removes the checking of both parent and child by adding the child permissions to plugin.yml
Cleans comments in the PermissionHelper class
Renames hasPermDeep to hasPermissionImplicit as I finally understand how it's supposed to work
Adds missing unmock() to prevent test errors
Adds a ton of permissions which were mentioned in the code, but did not exist in the plugin.yml
This commit is contained in:
2021-10-28 18:29:33 +02:00
parent 3fc0e6963a
commit 544384f69b
10 changed files with 231 additions and 142 deletions

View File

@ -292,8 +292,7 @@ public final class EconomyConfig {
return 0;
}
//Player gets free gate use
if (PermissionHelper.hasPermission(player, "stargate.free") ||
PermissionHelper.hasPermission(player, "stargate.free.use")) {
if (PermissionHelper.hasPermission(player, "stargate.free.use")) {
return 0;
}
@ -353,8 +352,7 @@ public final class EconomyConfig {
* @return <p></p>
*/
private boolean isFree(Player player, String permissionNode) {
return !useEconomy() || PermissionHelper.hasPermission(player, "stargate.free") ||
PermissionHelper.hasPermission(player, "stargate.free." + permissionNode);
return !useEconomy() || PermissionHelper.hasPermission(player, "stargate.free." + permissionNode);
}
/**