diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 6abea8eb..9167102e 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -14,6 +14,7 @@
+
diff --git a/.idea/dbnavigator.xml b/.idea/dbnavigator.xml
index 901ee626..8fcbe357 100644
--- a/.idea/dbnavigator.xml
+++ b/.idea/dbnavigator.xml
@@ -17,14 +17,20 @@
-
+
@@ -39,16 +45,23 @@
+
+
+
+
+
+
+
@@ -115,6 +128,7 @@
+
@@ -142,7 +156,6 @@
-
diff --git a/src/main/java/de/relluem94/minecraft/server/spigot/essentials/commands/Protect.java b/src/main/java/de/relluem94/minecraft/server/spigot/essentials/commands/Protect.java
index ffe2b2a1..e85cd6c3 100644
--- a/src/main/java/de/relluem94/minecraft/server/spigot/essentials/commands/Protect.java
+++ b/src/main/java/de/relluem94/minecraft/server/spigot/essentials/commands/Protect.java
@@ -27,7 +27,7 @@ private String getFlags() {
StringBuilder sb = new StringBuilder();
sb.append("Available Flags: ");
for (ProtectionFlags flag : flags) {
- sb.append(flag.getName()).append(" ");
+ sb.append(flag.name()).append(" ");
}
return sb.toString();
}
@@ -78,7 +78,7 @@ public boolean onCommand(@NonNull CommandSender sender, @NonNull Command command
if (ProtectionFlags.valueOf(args[2].toUpperCase()) != null) {
p.sendMessage(PLUGIN_COMMAND_PROTECT_FLAG_ADD);
pe.setPlayerState(PlayerState.PROTECTION_FLAG_ADD);
- pe.setPlayerStateParameter(ProtectionFlags.valueOf(args[2].toUpperCase()).getName());
+ pe.setPlayerStateParameter(ProtectionFlags.valueOf(args[2].toUpperCase()).name());
}
} catch (IllegalArgumentException ex) {
p.sendMessage(PLUGIN_COMMAND_PROTECT_FLAG_NOT_FOUND);
@@ -89,7 +89,7 @@ public boolean onCommand(@NonNull CommandSender sender, @NonNull Command command
if (ProtectionFlags.valueOf(args[2].toUpperCase()) != null) {
p.sendMessage(PLUGIN_COMMAND_PROTECT_FLAG_REMOVE);
pe.setPlayerState(PlayerState.PROTECTION_FLAG_REMOVE);
- pe.setPlayerStateParameter(ProtectionFlags.valueOf(args[2].toUpperCase()).getName());
+ pe.setPlayerStateParameter(ProtectionFlags.valueOf(args[2].toUpperCase()).name());
}
} catch (IllegalArgumentException ex) {
p.sendMessage(PLUGIN_COMMAND_PROTECT_FLAG_NOT_FOUND);
diff --git a/src/main/java/de/relluem94/minecraft/server/spigot/essentials/constants/ProtectionFlags.java b/src/main/java/de/relluem94/minecraft/server/spigot/essentials/constants/ProtectionFlags.java
index d894e706..6c694734 100644
--- a/src/main/java/de/relluem94/minecraft/server/spigot/essentials/constants/ProtectionFlags.java
+++ b/src/main/java/de/relluem94/minecraft/server/spigot/essentials/constants/ProtectionFlags.java
@@ -4,17 +4,15 @@
@Getter
public enum ProtectionFlags {
- ALLOW_HOPPER("allowHopper", false),
- ALLOW_REDSTONE("allowRedstone", false),
- ALLOW_PUBLIC("allowPublic", false),
- AUTO_CLOSE("autoClose", false);
+ ALLOW_HOPPER(false),
+ ALLOW_REDSTONE(false),
+ ALLOW_PUBLIC(false),
+ AUTO_CLOSE(false);
- private final String name;
private final boolean isDefault;
- ProtectionFlags(String name, boolean isDefault){
- this.name = name;
+ ProtectionFlags(boolean isDefault){
this.isDefault = isDefault;
}
}
\ No newline at end of file
diff --git a/src/main/java/de/relluem94/minecraft/server/spigot/essentials/events/BetterLock.java b/src/main/java/de/relluem94/minecraft/server/spigot/essentials/events/BetterLock.java
index 0e9b567e..de474a8d 100644
--- a/src/main/java/de/relluem94/minecraft/server/spigot/essentials/events/BetterLock.java
+++ b/src/main/java/de/relluem94/minecraft/server/spigot/essentials/events/BetterLock.java
@@ -407,7 +407,7 @@ else if(b3.getBlockData() instanceof Chest cd3){
JSONObject flags = new JSONObject();
if(b.getType().equals(Material.LEVER) || b.getType().equals(Material.IRON_DOOR)){
- String[] flag = {ProtectionFlags.ALLOW_REDSTONE.getName()};
+ String[] flag = {ProtectionFlags.ALLOW_REDSTONE.name()};
flags.put(PLUGIN_EVENT_PROTECT_FLAGS, flag);
}
bpe.setFlags(flags);
@@ -538,7 +538,7 @@ else if(pe.getPlayerState().equals(PlayerState.PROTECTION_FLAG_REMOVE)){
if(pre.getFlags().has(PLUGIN_EVENT_PROTECT_FLAGS)){
JSONArray flagJSON = pre.getFlags().getJSONArray(PLUGIN_EVENT_PROTECT_FLAGS);
- String flag = ProtectionFlags.valueOf(((String)pe.getPlayerStateParameter()).toUpperCase()).getName();
+ String flag = ProtectionFlags.valueOf(((String)pe.getPlayerStateParameter()).toUpperCase()).name();
List