LivingEvent
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import crafttweaker.forge.api.event.entity.living.LivingEvent;Extends
LivingEvent extends EntityEvent.
Members
cancel()
Cancels the event. Same as script.zs
setCanceled(true)// LivingEvent.cancel();myLivingEvent.cancel();Getter
// LivingEvent.cancelable as boolmyLivingEvent.cancelable
Return Type:
bool
cancelable() as bool
// LivingEvent.cancelable() as bool;myLivingEvent.cancelable();
Return Type:
bool
Getter
// LivingEvent.canceled as boolmyLivingEvent.canceled
Return Type:
bool
Setter
// LivingEvent.canceled = (cancel as bool);myLivingEvent.canceled = myBool;Parameters:
cancel: bool Type: bool canceled() as bool
// LivingEvent.canceled() as bool;myLivingEvent.canceled();
Return Type:
bool
canceled(cancel as bool)
// LivingEvent.canceled(cancel as bool);myLivingEvent.canceled(myBool);Parameters:
cancel: bool Type: bool Getter
// LivingEvent.entity as LivingEntitymyLivingEvent.entity
Return Type:
LivingEntity
Getter
// LivingEvent.hasResult as boolmyLivingEvent.hasResult
Return Type:
bool
hasResult() as bool
// LivingEvent.hasResult() as bool;myLivingEvent.hasResult();
Return Type:
bool
Getter
// LivingEvent.result as EventResultmyLivingEvent.result
Return Type:
EventResult
Setter
myLivingEvent.result = myResult;Parameters:
result: EventResult Type: EventResult result() as Result
result(result as Result)
myLivingEvent.result(myResult);Parameters:
result: EventResult Type: EventResult setAllow()
sets the event's result to script.zs
allow// LivingEvent.setAllow();myLivingEvent.setAllow();setDefault()
sets the event's result to script.zs
default// LivingEvent.setDefault();myLivingEvent.setDefault();setDeny()
sets the event's result to script.zs
deny// LivingEvent.setDeny();myLivingEvent.setDeny();