AdvancementEvent

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.forge.api.event.advancement.AdvancementEvent;

Extends

AdvancementEvent extends PlayerEvent.

Members

Getter
script.zs
// AdvancementEvent.advancement as Advancement
myAdvancementEvent.advancement

Return Type: Advancement

cancel()
Cancels the event. Same as setCanceled(true)
script.zs
// AdvancementEvent.cancel();
myAdvancementEvent.cancel();
Getter
script.zs
// AdvancementEvent.cancelable as bool
myAdvancementEvent.cancelable

Return Type: bool

cancelable() as bool
script.zs
// AdvancementEvent.cancelable() as bool;
myAdvancementEvent.cancelable();

Return Type: bool

Getter
script.zs
// AdvancementEvent.canceled as bool
myAdvancementEvent.canceled

Return Type: bool

Setter
script.zs
// AdvancementEvent.canceled = (cancel as bool);
myAdvancementEvent.canceled = myBool;

Parameters:

cancel Type: bool
canceled() as bool
script.zs
// AdvancementEvent.canceled() as bool;
myAdvancementEvent.canceled();

Return Type: bool

canceled(cancel as bool)
script.zs
// AdvancementEvent.canceled(cancel as bool);
myAdvancementEvent.canceled(myBool);

Parameters:

cancel Type: bool
Getter
script.zs
// AdvancementEvent.entity as Player
myAdvancementEvent.entity

Return Type: Player

Getter
script.zs
// AdvancementEvent.entity as LivingEntity
myAdvancementEvent.entity

Return Type: LivingEntity

Getter
script.zs
// AdvancementEvent.entity as Entity
myAdvancementEvent.entity

Return Type: Entity

Getter
script.zs
// AdvancementEvent.hasResult as bool
myAdvancementEvent.hasResult

Return Type: bool

hasResult() as bool
script.zs
// AdvancementEvent.hasResult() as bool;
myAdvancementEvent.hasResult();

Return Type: bool

Getter
script.zs
// AdvancementEvent.result as Result
myAdvancementEvent.result

Return Type: EventResult

Setter
script.zs
// AdvancementEvent.result = (result as Result);
myAdvancementEvent.result = myResult;

Parameters:

result Type: EventResult
result() as Result
script.zs
// AdvancementEvent.result() as Result;
myAdvancementEvent.result();

Return Type: EventResult

result(result as Result)
script.zs
// AdvancementEvent.result(result as Result);
myAdvancementEvent.result(myResult);

Parameters:

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