Skip to content

@minecraft/server


@minecraft/server / PlayerSwingEventOptions

Interface: PlayerSwingEventOptions ​

Defined in: @minecraft/server/index.d.ts:24366

An interface that is passed into @minecraft/server.PlayerSwingStartAfterEvent.subscribe that filters out which events are passed to the provided callback.

Properties ​

heldItemOption? ​

optional heldItemOption?: HeldItemOption

Defined in: @minecraft/server/index.d.ts:24374

Remarks ​

The held item option that the callback should be called for. If undefined, the callback will be called whether or not the player is holding an item in their hand.


swingSource? ​

optional swingSource?: EntitySwingSource

Defined in: @minecraft/server/index.d.ts:24382

Remarks ​

The EntitySwingSource that the callback should be called for. If undefined, the callback will be called for all swing sources.