forked from SteamWar/SteamWar
Add Unified GameModeConfig
This commit is contained in:
+5
-1
@@ -22,9 +22,13 @@ 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.YMLWrapperImpl;
|
||||
import de.steamwar.sql.SchematicType;
|
||||
import lombok.NonNull;
|
||||
import lombok.Setter;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.File;
|
||||
@@ -90,7 +94,7 @@ public final class FixedGlobalRegion implements Region {
|
||||
}
|
||||
};
|
||||
|
||||
private static final GameModeConfig GLOBAL_CONFIG = new GameModeConfig(null);
|
||||
private static final GameModeConfig<Material, SchematicType, String> GLOBAL_CONFIG = new GameModeConfig<>(YMLWrapperImpl.ofTyped(null));
|
||||
|
||||
private FixedGlobalRegion() {
|
||||
}
|
||||
|
||||
+5
-2
@@ -28,9 +28,12 @@ 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.YMLWrapperImpl;
|
||||
import de.steamwar.sql.SchematicType;
|
||||
import lombok.NonNull;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import yapion.hierarchy.types.YAPIONObject;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
@@ -57,7 +60,7 @@ public class FixedRegion implements Region {
|
||||
private final Area testblock;
|
||||
private final int floorLevel;
|
||||
private final int waterLevel;
|
||||
private final GameModeConfig gameModeConfig;
|
||||
private final GameModeConfig<Material, SchematicType, String> gameModeConfig;
|
||||
private final RegionData regionData;
|
||||
private final RegionHistory regionHistory = new RegionHistory.Impl(20);
|
||||
|
||||
@@ -336,7 +339,7 @@ public class FixedRegion implements Region {
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.gameModeConfig = new GameModeConfig(found);
|
||||
this.gameModeConfig = new GameModeConfig<>(YMLWrapperImpl.ofTyped(found));
|
||||
this.regionData = new RegionData.RegionDataImpl(regionData, WorldData::write);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user