Interface EndService
setAccess(dev.itsharshxd.zentrix.api.game.ZentrixGame, dev.itsharshxd.zentrix.api.end.EndToggleRequest) is safe to call
from any thread and completes after the request is applied or queued.- Since:
- 1.6.0
-
Method Summary
Modifier and TypeMethodDescription@NotNull Optional<org.bukkit.entity.EnderDragon> getDragon(@NotNull ZentrixGame game) The Ender Dragon of this match's runtime End, and only that one.@NotNull EndStatusgetStatus(@NotNull ZentrixGame game) @NotNull Optional<org.bukkit.World> getWorld(@NotNull ZentrixGame game) getWorldName(@NotNull ZentrixGame game) default booleanisAccessEnabled(@NotNull ZentrixGame game) default booleanisConfigured(@NotNull ZentrixGame game) booleanisLockedDown(@NotNull ZentrixGame game) Whether this match's runtime End is sealed.default booleanisPrepared(@NotNull ZentrixGame game) default booleanisPreparing(@NotNull ZentrixGame game) @NotNull CompletableFuture<EndToggleResult> setAccess(@NotNull ZentrixGame game, @NotNull EndToggleRequest request) booleansetLockedDown(@NotNull ZentrixGame game, boolean locked) Seals or unseals this match's runtime End.
-
Method Details
-
getStatus
-
getWorld
-
getWorldName
-
isConfigured
-
isPreparing
-
isPrepared
-
isAccessEnabled
-
setAccess
@NotNull @NotNull CompletableFuture<EndToggleResult> setAccess(@NotNull @NotNull ZentrixGame game, @NotNull @NotNull EndToggleRequest request) -
getDragon
@NotNull @NotNull Optional<org.bukkit.entity.EnderDragon> getDragon(@NotNull @NotNull ZentrixGame game) The Ender Dragon of this match's runtime End, and only that one.Resolved through the End's own dragon fight, so a dragon that merely happens to be flying in the world — a transport dragon, one another plugin spawned, one belonging to a different match — is never returned. That makes this the check an objective built on the dragon needs.
Empty when the match has no End, when the copy is not prepared yet, or when the dragon is dead or not currently loaded.
- Since:
- 1.6.0
-
isLockedDown
Whether this match's runtime End is sealed.- Since:
- 1.6.0
-
setLockedDown
Seals or unseals this match's runtime End.A sealed End refuses new arrivals the way closed access does, and additionally keeps the players already inside from leaving: the exit portal puts them back on the island instead of returning them to the arena, and a portal out is refused. Gateways keep working, because they never leave the End in the first place.
This is what a scenario that moves the final fight into the End needs, and it is undone automatically when the match is cleaned up.
- Returns:
- true when the match has a runtime End the flag could be applied to
- Since:
- 1.6.0
-