MCEvent
Link to mcevent
The event is not cancelable.
The event does not have a result.
Импорт класса
Link to импорт-класса
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.
ZenScript Copyimport crafttweaker.api.event.MCEvent;
Методы
Link to методы
Name: cancel
Cancels the event. Same as setCanceled(true)
Return Type: void
ZenScript Copy// MCEvent.cancel() as void
myMCEvent.cancel();
Name: hasResult
Return Type: boolean
ZenScript Copy// MCEvent.hasResult() as boolean
myMCEvent.hasResult();
Name: isCancelable
Return Type: boolean
ZenScript Copy// MCEvent.isCancelable() as boolean
myMCEvent.isCancelable();
Name: isCanceled
Return Type: boolean
ZenScript Copy// MCEvent.isCanceled() as boolean
myMCEvent.isCanceled();
Name: setAllow
sets the event's result to allow
Return Type: void
ZenScript Copy// MCEvent.setAllow() as void
myMCEvent.setAllow();
Name: setCanceled
Return Type: void
ZenScript CopyMCEvent.setCanceled(cancel as boolean) as void
Параметр | Тип | Описание |
---|---|---|
Параметр cancel | Тип boolean | Описание No Description Provided |
Name: setDefault
sets the event's result to default
Return Type: void
ZenScript Copy// MCEvent.setDefault() as void
myMCEvent.setDefault();
Name: setDeny
sets the event's result to deny
Return Type: void
ZenScript Copy// MCEvent.setDeny() as void
myMCEvent.setDeny();
Свойства
Link to свойства
Название | Тип | Имеет Getter | Имеет Setter | Описание |
---|---|---|---|---|
Название cancelable | Тип boolean | Имеет Getter true | Имеет Setter false | Описание No Description Provided |
Название canceled | Тип boolean | Имеет Getter true | Имеет Setter true | Описание No Description Provided |
Название hasResult | Тип boolean | Имеет Getter true | Имеет Setter false | Описание No Description Provided |