forked from SteamWar/SteamWar
Update some part of Region
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* This file is a part of the SteamWar software.
|
||||
*
|
||||
* Copyright (C) 2024 SteamWar.de-Serverteam
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.regionnew;
|
||||
|
||||
import com.sk89q.worldedit.EditSession;
|
||||
import de.steamwar.bausystem.regionnew.flags.Flag;
|
||||
import de.steamwar.sql.SchematicNode;
|
||||
import lombok.NonNull;
|
||||
import org.bukkit.Location;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.File;
|
||||
import java.util.Optional;
|
||||
|
||||
public interface Region {
|
||||
|
||||
RegionType getType();
|
||||
|
||||
<T extends Enum<T> & Flag.Value<T>> RegionFlagPolicy hasFlag(@NonNull Flag<T> flag);
|
||||
|
||||
<T extends Enum<T> & Flag.Value<T>> boolean setFlag(@NonNull Flag<T> flag, Flag.Value<T> value);
|
||||
|
||||
<T extends Enum<T> & Flag.Value<T>> Optional<Flag.Value<T>> getFlag(@NonNull Flag<T> flag);
|
||||
|
||||
Point getMinPoint();
|
||||
|
||||
Point getMaxPoint();
|
||||
|
||||
boolean inRegion(Location location);
|
||||
|
||||
Optional<Point> getBuildMinPoint(boolean extension);
|
||||
|
||||
Optional<Point> getBuildMaxPoint(boolean extension);
|
||||
|
||||
boolean inBuildRegion(boolean extension);
|
||||
|
||||
Optional<Point> getTestblockMinPoint(boolean extension);
|
||||
|
||||
Optional<Point> getTestblockMaxPoint(boolean extension);
|
||||
|
||||
boolean inTestblockRegion(boolean extension);
|
||||
|
||||
// TODO: Add forEachChunk and getChunkOutsidePredicate
|
||||
|
||||
Optional<File> getGameModeConfig();
|
||||
|
||||
Optional<EditSession> copy();
|
||||
|
||||
Optional<EditSession> copyBuild();
|
||||
|
||||
Optional<EditSession> copyTestblock();
|
||||
|
||||
void reset();
|
||||
|
||||
void resetBuild(@Nullable SchematicNode schematicNode, boolean extension);
|
||||
|
||||
void resetTestblock(@Nullable SchematicNode schematicNode, boolean extension);
|
||||
|
||||
void remember(EditSession editSession);
|
||||
|
||||
boolean undo();
|
||||
|
||||
boolean redo();
|
||||
}
|
||||
Reference in New Issue
Block a user