forked from SteamWar/SteamWar
Add PathRegion, PathArea and PathRegionData
Add VariantSelector Add DynamicRegionCommand Fix RegionData constructor
This commit is contained in:
@@ -24,6 +24,7 @@ import de.steamwar.bausystem.utils.FlatteningWrapper;
|
||||
import de.steamwar.bausystem.utils.PasteBuilder;
|
||||
import de.steamwar.sql.GameModeConfig;
|
||||
import lombok.NonNull;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
|
||||
@@ -82,6 +83,9 @@ public interface Region extends RegionDataStore {
|
||||
|
||||
interface Area {
|
||||
|
||||
int WORLD_MIN_Y = Bukkit.getWorlds().get(0).getMinHeight();
|
||||
int WORLD_MAX_Y = Bukkit.getWorlds().get(0).getMaxHeight();
|
||||
|
||||
Area EMPTY = new Area() {
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
|
||||
@@ -41,7 +41,7 @@ public abstract class RegionData {
|
||||
protected RegionData(RegionDataStore store) {
|
||||
this.store = store;
|
||||
initialize();
|
||||
store.loadRegion();
|
||||
store.loadRegion(this);
|
||||
}
|
||||
|
||||
public final void setStore(RegionDataStore store) {
|
||||
|
||||
@@ -21,7 +21,7 @@ package de.steamwar.bausystem.region;
|
||||
|
||||
public interface RegionDataStore {
|
||||
void saveRegion();
|
||||
void loadRegion();
|
||||
void loadRegion(RegionData regionData);
|
||||
default void deleteRegion() {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user