PlayerXpEvent

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.

script.zs
import crafttweaker.neoforge.api.event.xp.PlayerXpEvent;

Extends

PlayerXpEvent extends PlayerEvent.

Members

Getter
script.zs
// PlayerXpEvent.entity as Player
myPlayerXpEvent.entity

Return Type: Player

Getter
script.zs
// PlayerXpEvent.entity as LivingEntity
myPlayerXpEvent.entity

Return Type: LivingEntity

Getter
script.zs
// PlayerXpEvent.entity as Entity
myPlayerXpEvent.entity

Return Type: Entity

Getter
script.zs
// PlayerXpEvent.hasResult as bool
myPlayerXpEvent.hasResult

Return Type: bool

hasResult() as bool
script.zs
// PlayerXpEvent.hasResult() as bool;
myPlayerXpEvent.hasResult();

Return Type: bool

Getter
script.zs
// PlayerXpEvent.result as Result
myPlayerXpEvent.result

Return Type: EventResult

Setter
script.zs
// PlayerXpEvent.result = (result as Result);
myPlayerXpEvent.result = myResult;

Parameters:

result Type: EventResult
result() as Result
script.zs
// PlayerXpEvent.result() as Result;
myPlayerXpEvent.result();

Return Type: EventResult

result(result as Result)
script.zs
// PlayerXpEvent.result(result as Result);
myPlayerXpEvent.result(myResult);

Parameters:

result Type: EventResult
setAllow()
sets the event's result to allow
script.zs
// PlayerXpEvent.setAllow();
myPlayerXpEvent.setAllow();
setDefault()
sets the event's result to default
script.zs
// PlayerXpEvent.setDefault();
myPlayerXpEvent.setDefault();
setDeny()
sets the event's result to deny
script.zs
// PlayerXpEvent.setDeny();
myPlayerXpEvent.setDeny();