From 6c38686d0dc38c8ba03b60d766f471d5ad0b6003 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sun, 18 Apr 2021 18:53:58 +0200 Subject: [PATCH] Add Region.undoSessions Add Region.redoSessions --- .../de/steamwar/bausystem/region/Region.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java b/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java index 503e5334..c858a71e 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java @@ -19,9 +19,11 @@ package de.steamwar.bausystem.region; +import com.sk89q.worldedit.EditSession; import de.steamwar.bausystem.region.flags.Flag; import de.steamwar.bausystem.region.utils.RegionExtensionType; import de.steamwar.bausystem.region.utils.RegionType; +import de.steamwar.bausystem.shared.SizedStack; import lombok.Getter; import lombok.NonNull; import org.bukkit.Location; @@ -73,6 +75,9 @@ public class Region { private FlagStorage flagStorage; + private SizedStack undoSessions; + private SizedStack redoSessions; + public Region(Prototype prototype, YAPIONObject regionConfig, FlagStorage flagStorage, YAPIONObject regionData) { this.regionData = regionData; if (prototype != null) { @@ -183,4 +188,18 @@ public class Region { public & Flag.Value> Flag.Value get(Flag flagType) { return flagStorage.get(flagType); } + + public void reset(RegionType regionType) { + if (!hasType(regionType)) { + return; + } + switch (regionType) { + case BUILD: + + case TESTBLOCK: + default: + case NORMAL: + } + } + } \ No newline at end of file