forked from SteamWar/SteamWar
Improve GameModeConfig
This commit is contained in:
@@ -22,7 +22,7 @@ package de.steamwar.bausystem.region;
|
||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||
import de.steamwar.bausystem.utils.FlatteningWrapper;
|
||||
import de.steamwar.bausystem.utils.PasteBuilder;
|
||||
import de.steamwar.data.GameModeConfig;
|
||||
import de.steamwar.sql.GameModeConfig;
|
||||
import de.steamwar.sql.SchematicType;
|
||||
import lombok.NonNull;
|
||||
import org.bukkit.Location;
|
||||
@@ -67,7 +67,7 @@ public interface Region {
|
||||
Area getTestblockArea();
|
||||
|
||||
@NonNull
|
||||
GameModeConfig<Material, SchematicType, String> getGameModeConfig();
|
||||
GameModeConfig<Material, String> getGameModeConfig();
|
||||
|
||||
@NonNull
|
||||
RegionHistory getHistory();
|
||||
|
||||
+2
-3
@@ -22,9 +22,8 @@ package de.steamwar.bausystem.region.fixed;
|
||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||
import de.steamwar.bausystem.region.*;
|
||||
import de.steamwar.bausystem.utils.PasteBuilder;
|
||||
import de.steamwar.data.GameModeConfig;
|
||||
import de.steamwar.data.GameModeConfigUtils;
|
||||
import de.steamwar.sql.SchematicType;
|
||||
import de.steamwar.sql.GameModeConfig;
|
||||
import lombok.NonNull;
|
||||
import lombok.Setter;
|
||||
import org.bukkit.Location;
|
||||
@@ -94,7 +93,7 @@ public final class FixedGlobalRegion implements Region {
|
||||
}
|
||||
};
|
||||
|
||||
private static final GameModeConfig<Material, SchematicType, String> GLOBAL_CONFIG = new GameModeConfig<>(null, GameModeConfigUtils.ToMaterial, GameModeConfig.ToSchematicType, GameModeConfig.ToString, GameModeConfig.ToStaticWarGear);
|
||||
private static final GameModeConfig<Material, String> GLOBAL_CONFIG = new GameModeConfig<>(null, GameModeConfigUtils.ToMaterial, GameModeConfig.ToString, GameModeConfig.ToStaticWarGear);
|
||||
|
||||
private FixedGlobalRegion() {
|
||||
}
|
||||
|
||||
+3
-3
@@ -28,8 +28,8 @@ import de.steamwar.bausystem.utils.FlatteningWrapper;
|
||||
import de.steamwar.bausystem.utils.PasteBuilder;
|
||||
import de.steamwar.bausystem.worlddata.WorldData;
|
||||
import de.steamwar.core.Core;
|
||||
import de.steamwar.data.GameModeConfig;
|
||||
import de.steamwar.data.GameModeConfigUtils;
|
||||
import de.steamwar.sql.GameModeConfig;
|
||||
import de.steamwar.sql.SchematicType;
|
||||
import lombok.NonNull;
|
||||
import org.bukkit.Bukkit;
|
||||
@@ -60,7 +60,7 @@ public class FixedRegion implements Region {
|
||||
private final Area testblock;
|
||||
private final int floorLevel;
|
||||
private final int waterLevel;
|
||||
private final GameModeConfig<Material, SchematicType, String> gameModeConfig;
|
||||
private final GameModeConfig<Material, String> gameModeConfig;
|
||||
private final RegionData regionData;
|
||||
private final RegionHistory regionHistory = new RegionHistory.Impl(20);
|
||||
|
||||
@@ -339,7 +339,7 @@ public class FixedRegion implements Region {
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.gameModeConfig = new GameModeConfig<>(found, GameModeConfigUtils.ToMaterial, GameModeConfig.ToSchematicType, GameModeConfig.ToString, GameModeConfig.ToStaticWarGear);
|
||||
this.gameModeConfig = new GameModeConfig<>(found, GameModeConfigUtils.ToMaterial, GameModeConfig.ToString, GameModeConfig.ToStaticWarGear);
|
||||
this.regionData = new RegionData.RegionDataImpl(regionData, WorldData::write);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user