Add JavaDoc to RegionSystem

This commit is contained in:
2025-08-01 22:32:55 +02:00
parent 91a41ccd3f
commit 38b061c12c
2 changed files with 29 additions and 1 deletions
@@ -32,18 +32,39 @@ public interface RegionSystem {
RegionSystem INSTANCE = init();
/**
* Loads and initializes the Regions and anything that should be loaded on startup.
*/
void load();
/**
* Saves anything that should be written to file on either CRIUSleepEvent or plugin disable.
*/
void save();
/**
* Returns the GlobalRegion. This Region should have their {@link Region#getID()} return the
* '00000000-0000-0000-0000-000000000000' UUID for easier retrieval with {@link #getRegion(UUID)}.
*/
@NonNull
Region getGlobalRegion();
/**
* Should return a Region that is present at the specific Location or the {@link #getGlobalRegion()}
* if none are present.
*/
@NonNull
Region get(@NonNull Location location);
/**
* Should return the Region by their UUID.
*/
@CheckReturnValue
Optional<Region> getRegion(@NonNull UUID id);
/**
* Does and should not contain the GlobalRegion returned by {@link #getGlobalRegion()}.
*/
@NonNull
Stream<Region> getRegions();