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
플레이어 발전 과제 데이터가 저장될 때 호출됩니다.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player
-
Constructor Summary
ConstructorDescriptionPlayerAdvancementSaveEvent
(Player who, NamespacedKey section, ProgressMap progress, PlayerAdvancementSaveEvent.Reason reason) -
Method Summary
Modifier and TypeMethodDescription플레이어의 발전 과제 데이터 인스턴스를 가져옵니다.getData()
저장될 발전 과제 데이터를 가져옵니다.static HandlerList
이벤트 호출 사유를 가져옵니다.발전 과제의 저장 구역을 가져옵니다.boolean
발전 과제 데이터를 파일에 저장하는 바닐라 동작을 취소할지 여부를 가져옵니다.<T> T
saveToData
(AdvancementFormat<T> format) 발전 과제 진행도를 직렬화된 데이터로 변환합니다.void
setCancelled
(boolean cancel) 발전 과제 데이터를 파일에 저장하는 바닐라 동작을 취소할지 여부를 결정합니다.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
callEvent, getEventMetadata, getEventName, isAsynchronous, isSupportInterrupt
-
Constructor Details
-
PlayerAdvancementSaveEvent
@Internal public PlayerAdvancementSaveEvent(Player who, NamespacedKey section, ProgressMap progress, PlayerAdvancementSaveEvent.Reason reason)
-
-
Method Details
-
getAdvancementData
플레이어의 발전 과제 데이터 인스턴스를 가져옵니다.- Returns:
- 발전 과제 데이터 인스턴스
-
saveToData
발전 과제 진행도를 직렬화된 데이터로 변환합니다.- Type Parameters:
T
- 데이터의 타입- Parameters:
format
- 발전 과제 데이터 저장 포맷- Returns:
- 진행도 데이터
- Throws:
Exception
- 일부 데이터는 저장 도중 예외가 던져질 수 있습니다.
-
getSection
발전 과제의 저장 구역을 가져옵니다.실제 파일로는 바닐라 메인 구역 데이터만 저장됩니다.
- Returns:
- 저장 구역
-
getData
저장될 발전 과제 데이터를 가져옵니다.- Returns:
- 발전 과제 데이터
-
getReason
이벤트 호출 사유를 가져옵니다.- Returns:
- 이벤트 호출 사유
-
isCancelled
public boolean isCancelled()발전 과제 데이터를 파일에 저장하는 바닐라 동작을 취소할지 여부를 가져옵니다.- Specified by:
isCancelled
in interfaceCancellable
- Returns:
- 바닐라 동작 취소 여부
-
setCancelled
public void setCancelled(boolean cancel) 발전 과제 데이터를 파일에 저장하는 바닐라 동작을 취소할지 여부를 결정합니다.- Specified by:
setCancelled
in interfaceCancellable
- Parameters:
cancel
- 바닐라 동작 취소 여부
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-