From fa8ba1ab813ca730c196ecfc5cf98774cd4c307d Mon Sep 17 00:00:00 2001 From: Zeanon Date: Sat, 17 Apr 2021 18:50:35 +0200 Subject: [PATCH] Cleanstate --- .../bausystem/region/FlagStorage.java | 8 ++---- .../bausystem/region/flags/FlagType.java | 25 ------------------- 2 files changed, 2 insertions(+), 31 deletions(-) delete mode 100644 BauSystem_Main/src/de/steamwar/bausystem/region/flags/FlagType.java diff --git a/BauSystem_Main/src/de/steamwar/bausystem/region/FlagStorage.java b/BauSystem_Main/src/de/steamwar/bausystem/region/FlagStorage.java index 4ad92204..6f5fab99 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/region/FlagStorage.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/region/FlagStorage.java @@ -22,16 +22,13 @@ package de.steamwar.bausystem.region; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; import de.steamwar.bausystem.region.flags.Flag; -import de.steamwar.bausystem.region.flags.FlagType; -import de.steamwar.bausystem.region.flags.flagvalues.FREEZE; -import de.steamwar.bausystem.region.flags.flagvalues.TNT; import java.util.HashMap; import java.util.Map; public class FlagStorage { - protected final Map, Flag.Value> flags; + protected final Map> flags; protected final JsonObject jsonObject; public FlagStorage(final JsonObject jsonObject) { @@ -40,12 +37,11 @@ public class FlagStorage { readKeys(); } - public & Flag.Value> boolean set(final FlagType flagType, final Flag.Value value) { + public boolean set(final Flag flagType, final Flag.Value value) { return flags.put(flagType, value) != value; } public Flag.Value get(final Flag flagType) { - set(Flag.TNT_FLAG, TNT.ALLOW); return flags.get(flagType); } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/region/flags/FlagType.java b/BauSystem_Main/src/de/steamwar/bausystem/region/flags/FlagType.java deleted file mode 100644 index c043aecc..00000000 --- a/BauSystem_Main/src/de/steamwar/bausystem/region/flags/FlagType.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2021 SteamWar.de-Serverteam - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -package de.steamwar.bausystem.region.flags; - -public interface FlagType> { - - String name(); -} \ No newline at end of file