본문 바로가기
Dev

버킷 이벤트 실행 순서

by ryush00 2015. 2. 27.

마인크래프트 버킷(Bukkit) 개발시 이벤트 리스너 우선순위를 지정하게 된다. 그런데 이 우선순위가 어떤 순서로 작동되는지 모르는 상태로 프로그램을 작성하게 되면 문제가 꼭 발생하게 된다. (그래서 아이템 지급 다 해놓고서는 다 날려버리는 불상사가... )



Event Priorities

There are six priorities in Bukkit that are called in the following order


EventPriority.LOWEST

EventPriority.LOW

EventPriority.NORMAL

EventPriority.HIGH

EventPriority.HIGHEST

EventPriority.MONITOR

http://wiki.bukkit.org/Event_API_Reference#Event_Priorities


버킷 공식 위키에 의하면 실행되는 순서는 아래와 같이 낮은 순서가 먼저 실행된다.


  1. EventPriority.LOWEST
  2. EventPriority.LOW
  3. EventPriority.NORMAL
  4. EventPriority.HIGH
  5. EventPriority.HIGHEST
  6. EventPriority.MONITOR


참고하도록 하자.




댓글