Add Region.initSessions
Dieser Commit ist enthalten in:
Ursprung
ba3ee30385
Commit
25111c62be
@ -27,6 +27,7 @@ import de.steamwar.bausystem.region.utils.RegionExtensionType;
|
||||
import de.steamwar.bausystem.region.utils.RegionType;
|
||||
import de.steamwar.bausystem.shared.SizedStack;
|
||||
import de.steamwar.sql.Schematic;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import org.bukkit.Location;
|
||||
@ -90,7 +91,10 @@ public class Region {
|
||||
|
||||
private FlagStorage flagStorage;
|
||||
|
||||
@Getter(AccessLevel.PRIVATE)
|
||||
private SizedStack<EditSession> undoSessions;
|
||||
|
||||
@Getter(AccessLevel.PRIVATE)
|
||||
private SizedStack<EditSession> redoSessions;
|
||||
|
||||
public Region(String name, Prototype prototype, YAPIONObject regionConfig, FlagStorage flagStorage, YAPIONObject regionData) {
|
||||
@ -164,6 +168,13 @@ public class Region {
|
||||
}
|
||||
}
|
||||
|
||||
private void initSessions() {
|
||||
if (undoSessions == null) {
|
||||
undoSessions = new SizedStack<>(20);
|
||||
redoSessions = new SizedStack<>(20);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean inRegion(Location location, RegionType regionType, RegionExtensionType regionExtensionType) {
|
||||
if (!hasType(regionType)) {
|
||||
return false;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren