LivingExperienceDropEvent
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.xp.LivingExperienceDropEvent;
Extends
LivingExperienceDropEvent extends LivingEvent
.
Listening to the event
This event can be listened to like so:
events.register<crafttweaker.forge.api.event.xp.LivingExperienceDropEvent>(event => { println("LivingExperienceDropEvent ran!");});
Members
cancel()
Cancels the event. Same as script.zs
setCanceled(true)
// LivingExperienceDropEvent.cancel();event.cancel();
Getter
// LivingExperienceDropEvent.cancelable as boolevent.cancelable
Return Type:
bool
cancelable() as bool
// LivingExperienceDropEvent.cancelable() as bool;event.cancelable();
Return Type:
bool
Getter
// LivingExperienceDropEvent.canceled as boolevent.canceled
Return Type:
bool
Setter
// LivingExperienceDropEvent.canceled = (cancel as bool);event.canceled = myBool;
Parameters:
cancel: bool
Type: bool
canceled() as bool
// LivingExperienceDropEvent.canceled() as bool;event.canceled();
Return Type:
bool
canceled(cancel as bool)
// LivingExperienceDropEvent.canceled(cancel as bool);event.canceled(myBool);
Parameters:
cancel: bool
Type: bool
Getter
// LivingExperienceDropEvent.droppedExperience as intevent.droppedExperience
Return Type:
int
Setter
// LivingExperienceDropEvent.droppedExperience = (droppedExperience as int);event.droppedExperience = myInt;
Parameters:
droppedExperience: int
Type: int
Getter
// LivingExperienceDropEvent.entity as LivingEntityevent.entity
Return Type:
LivingEntity
Getter
Getter
// LivingExperienceDropEvent.hasResult as boolevent.hasResult
Return Type:
bool
hasResult() as bool
// LivingExperienceDropEvent.hasResult() as bool;event.hasResult();
Return Type:
bool
Getter
// LivingExperienceDropEvent.originalExperience as intevent.originalExperience
Return Type:
int
Getter
// LivingExperienceDropEvent.result as EventResultevent.result
Return Type:
EventResult
Setter
event.result = myResult;
Parameters:
result: EventResult
Type: EventResult
result() as Result
result(result as Result)
event.result(myResult);
Parameters:
result: EventResult
Type: EventResult
setAllow()
sets the event's result to script.zs
allow
// LivingExperienceDropEvent.setAllow();event.setAllow();
setDefault()
sets the event's result to script.zs
default
// LivingExperienceDropEvent.setDefault();event.setDefault();
setDeny()
sets the event's result to script.zs
deny
// LivingExperienceDropEvent.setDeny();event.setDeny();