PlayerBreakSpeedEvent

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.entity.player.PlayerBreakSpeedEvent;

Extends

PlayerBreakSpeedEvent extends PlayerEvent.

Implements

PlayerBreakSpeedEvent implements the following interfaces:

ICancellableEvent

Listening to the event

This event can be listened to like so:

script.zs
events.register<crafttweaker.neoforge.api.event.entity.player.PlayerBreakSpeedEvent>(event => {
println("PlayerBreakSpeedEvent ran!");
});

Members

cancel()
Cancels the event. Same as setCanceled(true)
script.zs
// BreakSpeed.cancel();
event.cancel();
Getter
script.zs
// BreakSpeed.canceled as bool
event.canceled

Return Type: bool

Setter
script.zs
// BreakSpeed.canceled = (cancel as bool);
event.canceled = myBool;

Parameters:

cancel Type: bool
canceled() as bool
script.zs
// BreakSpeed.canceled() as bool;
event.canceled();

Return Type: bool

canceled(cancel as bool)
script.zs
// BreakSpeed.canceled(cancel as bool);
event.canceled(myBool);

Parameters:

cancel Type: bool
Getter
script.zs
// BreakSpeed.entity as Player
event.entity

Return Type: Player

Getter
script.zs
// BreakSpeed.entity as LivingEntity
event.entity

Return Type: LivingEntity

Getter
script.zs
// BreakSpeed.entity as Entity
event.entity

Return Type: Entity

Getter
script.zs
// BreakSpeed.newSpeed as float
event.newSpeed

Return Type: float

Setter
script.zs
// BreakSpeed.newSpeed = (newSpeed as float);
event.newSpeed = myFloat;

Parameters:

newSpeed Type: float
Getter
script.zs
// BreakSpeed.originalSpeed as float
event.originalSpeed

Return Type: float

Getter
script.zs
// BreakSpeed.position as BlockPos
event.position

Return Type: BlockPos

Getter
script.zs
// BreakSpeed.state as BlockState
event.state

Return Type: BlockState