LivingEntityUseItemStopEvent
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.neoforge.api.event.entity.use.LivingEntityUseItemStopEvent;Extends
LivingEntityUseItemStopEvent extends LivingEntityUseItemEvent.
Implements
LivingEntityUseItemStopEvent
implements the following interfaces:
Listening to the event
This event can be listened to like so:
events.register<crafttweaker.neoforge.api.event.entity.use.LivingEntityUseItemStopEvent>(event => { println("LivingEntityUseItemStopEvent ran!");});Members
cancel()
Cancels the event. Same as script.zs
setCanceled(true)// Stop.cancel();event.cancel();Getter
// Stop.canceled as boolevent.canceled
Return Type:
bool
Setter
// Stop.canceled = (cancel as bool);event.canceled = myBool;Parameters:
cancel: bool Type: bool canceled() as bool
// Stop.canceled() as bool;event.canceled();
Return Type:
bool
canceled(cancel as bool)
// Stop.canceled(cancel as bool);event.canceled(myBool);Parameters:
cancel: bool Type: bool Getter
// Stop.duration as intevent.duration
Return Type:
int
Setter
// Stop.duration = (duration as int);event.duration = myInt;Parameters:
duration: int Type: int Getter
// Stop.entity as LivingEntityevent.entity
Return Type:
LivingEntity
Getter
Getter
// Stop.hasResult as boolevent.hasResult
Return Type:
bool
hasResult() as bool
// Stop.hasResult() as bool;event.hasResult();
Return Type:
bool
Getter
// Stop.item as IItemStackevent.item
Return Type:
IItemStack
Getter
// Stop.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// Stop.setAllow();event.setAllow();setDefault()
sets the event's result to script.zs
default// Stop.setDefault();event.setDefault();setDeny()
sets the event's result to script.zs
deny// Stop.setDeny();event.setDeny();