From 96d9f487dba428443204510d5d8137f746b83424 Mon Sep 17 00:00:00 2001 From: Zeanon Date: Wed, 5 May 2021 14:35:33 +0200 Subject: [PATCH] less error prone --- .../steamwar/bausystem/region/flags/flagvalues/ColorMode.java | 2 +- .../steamwar/bausystem/region/flags/flagvalues/DamageMode.java | 2 +- .../de/steamwar/bausystem/region/flags/flagvalues/FireMode.java | 2 +- .../steamwar/bausystem/region/flags/flagvalues/FreezeMode.java | 2 +- .../steamwar/bausystem/region/flags/flagvalues/ProtectMode.java | 2 +- .../de/steamwar/bausystem/region/flags/flagvalues/TNTMode.java | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/ColorMode.java b/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/ColorMode.java index 1287a810..f37ba21a 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/ColorMode.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/ColorMode.java @@ -65,7 +65,7 @@ public enum ColorMode implements Flag.Value { @Override public ColorMode getValueOf(final String name) { try { - return ColorMode.valueOf(name); + return ColorMode.valueOf(name.toUpperCase()); } catch (IllegalArgumentException e) { return ColorMode.YELLOW; } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/DamageMode.java b/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/DamageMode.java index 735afb4d..071fd5fe 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/DamageMode.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/DamageMode.java @@ -49,7 +49,7 @@ public enum DamageMode implements Flag.Value { @Override public DamageMode getValueOf(final String name) { try { - return DamageMode.valueOf(name); + return DamageMode.valueOf(name.toUpperCase()); } catch (IllegalArgumentException e) { if (name.equalsIgnoreCase("false")) { return DamageMode.DENY; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/FireMode.java b/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/FireMode.java index 8b08f0a6..cf0fab31 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/FireMode.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/FireMode.java @@ -49,7 +49,7 @@ public enum FireMode implements Flag.Value { @Override public FireMode getValueOf(final String name) { try { - return FireMode.valueOf(name); + return FireMode.valueOf(name.toUpperCase()); } catch (IllegalArgumentException e) { if (name.equalsIgnoreCase("false")) { return FireMode.DENY; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/FreezeMode.java b/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/FreezeMode.java index 8e51bb29..1b1774c7 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/FreezeMode.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/FreezeMode.java @@ -50,7 +50,7 @@ public enum FreezeMode implements Flag.Value { @Override public FreezeMode getValueOf(final String name) { try { - return FreezeMode.valueOf(name); + return FreezeMode.valueOf(name.toUpperCase()); } catch (IllegalArgumentException e) { if (name.equalsIgnoreCase("false")) { return FreezeMode.INACTIVE; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/ProtectMode.java b/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/ProtectMode.java index 35d3c12a..18ea897b 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/ProtectMode.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/ProtectMode.java @@ -49,7 +49,7 @@ public enum ProtectMode implements Flag.Value { @Override public ProtectMode getValueOf(final String name) { try { - return ProtectMode.valueOf(name); + return ProtectMode.valueOf(name.toUpperCase()); } catch (IllegalArgumentException e) { if (name.equalsIgnoreCase("false")) { return ProtectMode.INACTIVE; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/TNTMode.java b/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/TNTMode.java index 548b8ff0..f6f2706d 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/TNTMode.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/TNTMode.java @@ -50,7 +50,7 @@ public enum TNTMode implements Flag.Value { @Override public TNTMode getValueOf(final String name) { try { - return TNTMode.valueOf(name); + return TNTMode.valueOf(name.toUpperCase()); } catch (IllegalArgumentException e) { return TNTMode.ALLOW; }