MCEvent
The event is not cancelable.
The event does not have a result.
导入相关包
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
方法
cancel
Cancels the event. Same as setCanceled(true)
Return Type: void
hasResult
Return Type: boolean
isCancelable
Return Type: boolean
isCanceled
Return Type: boolean
setAllow
sets the event's result to allow
Return Type: void
setCanceled
Return Type: void
setDefault
sets the event's result to default
Return Type: void
setDeny
sets the event's result to deny
Return Type: void