Class PlayerAdvancementSaveEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
moe.caramel.daydream.event.player.PlayerAdvancementSaveEvent
All Implemented Interfaces:
Cancellable

@NullMarked public final class PlayerAdvancementSaveEvent extends PlayerEvent implements Cancellable
플레이어 발전 과제 데이터가 저장될 때 호출됩니다.
  • Constructor Details

  • Method Details

    • getAdvancementData

      public PlayerAdvancementData getAdvancementData()
      플레이어의 발전 과제 데이터 인스턴스를 가져옵니다.
      Returns:
      발전 과제 데이터 인스턴스
    • saveToData

      public <T> T saveToData(AdvancementFormat<T> format) throws Exception
      발전 과제 진행도를 직렬화된 데이터로 변환합니다.
      Type Parameters:
      T - 데이터의 타입
      Parameters:
      format - 발전 과제 데이터 저장 포맷
      Returns:
      진행도 데이터
      Throws:
      Exception - 일부 데이터는 저장 도중 예외가 던져질 수 있습니다.
    • getSection

      public NamespacedKey getSection()
      발전 과제의 저장 구역을 가져옵니다.

      실제 파일로는 바닐라 메인 구역 데이터만 저장됩니다.

      Returns:
      저장 구역
    • getData

      public ProgressMap getData()
      저장될 발전 과제 데이터를 가져옵니다.
      Returns:
      발전 과제 데이터
    • getReason

      이벤트 호출 사유를 가져옵니다.
      Returns:
      이벤트 호출 사유
    • isCancelled

      public boolean isCancelled()
      발전 과제 데이터를 파일에 저장하는 바닐라 동작을 취소할지 여부를 가져옵니다.
      Specified by:
      isCancelled in interface Cancellable
      Returns:
      바닐라 동작 취소 여부
    • setCancelled

      public void setCancelled(boolean cancel)
      발전 과제 데이터를 파일에 저장하는 바닐라 동작을 취소할지 여부를 결정합니다.
      Specified by:
      setCancelled in interface Cancellable
      Parameters:
      cancel - 바닐라 동작 취소 여부
    • getHandlers

      public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      public static HandlerList getHandlerList()