Interface CornucopiaService


public interface CornucopiaService
Schematic validation, podium assignment, cage overrides, and release lifecycle. Placement and player operations must run on the Bukkit main thread.
Since:
1.6.0
  • Method Details

    • validateSchematic

      @NotNull @NotNull CornucopiaSchematicStatus validateSchematic(@NotNull @NotNull String schematic, @NotNull @NotNull org.bukkit.Material podiumBlock)
    • prepare

      void prepare(@NotNull @NotNull ZentrixGame game)
      Starts preparation if the game does not already own preparation state.
    • getPreparation

      @NotNull @NotNull CornucopiaPreparation getPreparation(@NotNull @NotNull ZentrixGame game)
    • shouldUse

      boolean shouldUse(@NotNull @NotNull ZentrixGame game)
    • teleportPlayersToPodiums

      boolean teleportPlayersToPodiums(@NotNull @NotNull ZentrixGame game)
    • getPodiumAssignments

      @NotNull @NotNull Map<UUID,org.bukkit.Location> getPodiumAssignments(@NotNull @NotNull ZentrixGame game)
    • setGlobalCageMaterial

      void setGlobalCageMaterial(@NotNull @NotNull org.bukkit.Material material)
      Runtime override of the head-level wall, used for every subsequently created cage until cleared. Cages that already stand are repainted immediately, and clearing the override repaints them back to their design's wall. Per-player overrides always win over the global one.

      Only cage designs that accept it are repainted: the built-in Classic design does, and server owners choose for every other design (material-override in content/cosmetics/cage-designs.yml, or Addon Wall Override in the cage editor). Any other design keeps its own wall, so a carefully built cage is never changed by an addon.

    • clearGlobalCageMaterial

      void clearGlobalCageMaterial()
    • getGlobalCageMaterial

      @NotNull @NotNull Optional<org.bukkit.Material> getGlobalCageMaterial()
    • setPlayerCageMaterial

      void setPlayerCageMaterial(@NotNull @NotNull UUID playerId, @NotNull @NotNull org.bukkit.Material material)
      Runtime override of the head-level wall of the cage assigned to one player. Like the global override, only a design that accepts it is repainted.
    • clearPlayerCageMaterial

      void clearPlayerCageMaterial(@NotNull @NotNull UUID playerId)
    • getPlayerCageMaterial

      @NotNull @NotNull Optional<org.bukkit.Material> getPlayerCageMaterial(@NotNull @NotNull UUID playerId)
    • startReleaseCountdown

      boolean startReleaseCountdown(@NotNull @NotNull ZentrixGame game, @NotNull @NotNull Runnable onRelease)
      Starts the configured physical release countdown and invokes the callback on release.
    • removeFromReleaseCountdown

      void removeFromReleaseCountdown(@NotNull @NotNull ZentrixGame game, @NotNull @NotNull org.bukkit.entity.Player player)