diff options
4 files changed, 10 insertions, 15 deletions
diff --git a/EssentialsAntiBuild/src/net/ess3/antibuild/Permissions.java b/EssentialsAntiBuild/src/net/ess3/antibuild/Permissions.java index 250caa4a3..cae97667c 100644 --- a/EssentialsAntiBuild/src/net/ess3/antibuild/Permissions.java +++ b/EssentialsAntiBuild/src/net/ess3/antibuild/Permissions.java @@ -12,12 +12,13 @@ import org.bukkit.permissions.PermissionDefault; public enum Permissions implements IPermission { + BUILD("essentials.", PermissionDefault.TRUE), BLACKLIST_ALLOWPLACEMENT, BLACKLIST_ALLOWUSAGE, BLACKLIST_ALLOWBREAK, ALERTS, ALERTS_NOTRIGGER; - private static final String base = "essentials.build."; + private static final String defaultBase = "essentials.build."; private final String permission; private final PermissionDefault defaultPerm; private transient String parent = null; @@ -29,6 +30,11 @@ public enum Permissions implements IPermission private Permissions(final PermissionDefault defaultPerm) { + this(defaultBase, defaultPerm); + } + + private Permissions(final String base, final PermissionDefault defaultPerm) + { permission = base + toString().toLowerCase(Locale.ENGLISH).replace('_', '.'); this.defaultPerm = defaultPerm; } diff --git a/EssentialsProtect/src/net/ess3/protect/EssentialsConnect.java b/EssentialsProtect/src/net/ess3/protect/EssentialsConnect.java index 96a161a5f..1c0130863 100644 --- a/EssentialsProtect/src/net/ess3/protect/EssentialsConnect.java +++ b/EssentialsProtect/src/net/ess3/protect/EssentialsConnect.java @@ -1,9 +1,9 @@ package net.ess3.protect; -import static net.ess3.I18n._; -import net.ess3.api.IEssentials; import java.util.logging.Level; import java.util.logging.Logger; +import static net.ess3.I18n._; +import net.ess3.api.IEssentials; import org.bukkit.plugin.Plugin; diff --git a/EssentialsProtect/src/net/ess3/protect/IProtect.java b/EssentialsProtect/src/net/ess3/protect/IProtect.java index 95af97402..de3dbc3fa 100644 --- a/EssentialsProtect/src/net/ess3/protect/IProtect.java +++ b/EssentialsProtect/src/net/ess3/protect/IProtect.java @@ -5,16 +5,8 @@ import org.bukkit.plugin.Plugin; public interface IProtect extends Plugin { -// boolean checkProtectionItems(final ProtectConfig list, final int id); -// boolean getSettingBool(final ProtectConfig protectConfig); -// String getSettingString(final ProtectConfig protectConfig); - - EssentialsConnect getEssentialsConnect(); -// Map<ProtectConfig, Boolean> getSettingsBoolean(); -// Map<ProtectConfig, String> getSettingsString(); -// Map<ProtectConfig, List<Integer>> getSettingsList(); ProtectHolder getSettings(); void setSettings(ProtectHolder settings); diff --git a/EssentialsProtect/src/net/ess3/protect/Permissions.java b/EssentialsProtect/src/net/ess3/protect/Permissions.java index 2a7db4130..ae900e6c5 100644 --- a/EssentialsProtect/src/net/ess3/protect/Permissions.java +++ b/EssentialsProtect/src/net/ess3/protect/Permissions.java @@ -4,14 +4,11 @@ import java.util.Locale; import net.ess3.api.IPermission; import net.ess3.bukkit.PermissionFactory; import org.bukkit.command.CommandSender; -import org.bukkit.permissions.Permission; import org.bukkit.permissions.PermissionDefault; public enum Permissions implements IPermission -{ - - ADMIN, +{ ENTITYTARGET(PermissionDefault.TRUE), PVP(PermissionDefault.TRUE), PREVENTDAMAGE_FALL(PermissionDefault.FALSE), |