Skip to content
On this page

Common

KattonEventsArg

top.katton.api.eventcommon/src/main/kotlin/top/katton/api/event/KattonEventsArg.kt
Argument for server-level events.

ServerArg

CommonValue Class
kotlin
@JvmInline
value class ServerArg(val server: MinecraftServer)

Argument for server-level events.

Properties

PropertyDescription
serverThe MinecraftServer instance

SyncDatapackContentsArg

CommonData Class
kotlin
data class SyncDatapackContentsArg( val player: ServerPlayer, val joined: Boolean )

Argument for datapack contents synchronization event.

Properties

PropertyDescription
playerThe player receiving the sync
joinedWhether this sync is due to player joining

StartDatapackReloadArg

CommonData Class
kotlin
data class StartDatapackReloadArg( val server: MinecraftServer, val resourceManager: ResourceManager )

Argument for datapack reload start event.

Properties

PropertyDescription
serverThe MinecraftServer instance
resourceManagerThe resource manager being reloaded

EndDatapackReloadArg

CommonData Class
kotlin
data class EndDatapackReloadArg( val server: MinecraftServer, val resourceManager: ResourceManager, val success: Boolean )

Argument for datapack reload end event.

Properties

PropertyDescription
serverThe MinecraftServer instance
resourceManagerThe resource manager that was reloaded
successWhether the reload completed successfully

ServerSaveArg

CommonData Class
kotlin
data class ServerSaveArg( val server: MinecraftServer, val flush: Boolean, val force: Boolean )

Argument for server save event.

Properties

PropertyDescription
serverThe MinecraftServer instance
flushWhether data should be flushed to disk
forceWhether this is a forced save

ServerTickArg

CommonValue Class
kotlin
@JvmInline
value class ServerTickArg(val server: MinecraftServer)

Argument for server tick event.

Properties

PropertyDescription
serverThe MinecraftServer instance

WorldTickArg

CommonValue Class
kotlin
@JvmInline
value class WorldTickArg(val world: ServerLevel)

Argument for world tick event.

Properties

PropertyDescription
worldThe ServerLevel being ticked

EntityLoadArg

CommonData Class
kotlin
data class EntityLoadArg( val entity: Entity, val world: ServerLevel ): CancellableEventArg()

Argument for entity load event.

Triggered when an entity is loaded into a world. Can be cancelled to prevent the entity from loading.

Properties

PropertyDescription
entityThe entity being loaded
worldThe ServerLevel the entity is loading into

EntityUnloadArg

CommonData Class
kotlin
data class EntityUnloadArg( val entity: Entity, val world: ServerLevel )

Argument for entity unload event.

Triggered when an entity is unloaded from a world.

Properties

PropertyDescription
entityThe entity being unloaded
worldThe ServerLevel the entity is unloading from

EquipmentChangeArg

CommonData Class
kotlin
data class EquipmentChangeArg( val entity: LivingEntity, val slot: EquipmentSlot, val from: ItemStack, val to: ItemStack )

Argument for equipment change event.

Triggered when a living entity's equipment changes.

Properties

PropertyDescription
entityThe entity whose equipment changed
slotThe equipment slot that changed
fromThe previous ItemStack in the slot
toThe new ItemStack in the slot

ChunkLoadArg

CommonData Class
kotlin
data class ChunkLoadArg( val world: ServerLevel, val chunk: LevelChunk, val generated: Boolean )

Argument for chunk load event.

Properties

PropertyDescription
worldThe ServerLevel containing the chunk
chunkThe LevelChunk that was loaded
generatedWhether the chunk was newly generated

ChunkUnloadArg

CommonData Class
kotlin
data class ChunkUnloadArg( val world: ServerLevel, val chunk: LevelChunk )

Argument for chunk unload event.

Properties

PropertyDescription
worldThe ServerLevel containing the chunk
chunkThe LevelChunk being unloaded

ChunkStatusChangeArg

CommonData Class
kotlin
data class ChunkStatusChangeArg( val world: ServerLevel, val chunk: LevelChunk, val oldStatus: FullChunkStatus, val newStatus: FullChunkStatus )

Argument for chunk status change event.

Triggered when a chunk's loading status changes.

Properties

PropertyDescription
worldThe ServerLevel containing the chunk
chunkThe LevelChunk whose status changed
oldStatusThe previous chunk status
newStatusThe new chunk status

BlockEntityLoadArg

CommonData Class
kotlin
data class BlockEntityLoadArg( val blockEntity: BlockEntity, val world: ServerLevel )

Argument for block entity load event.

Properties

PropertyDescription
blockEntityThe BlockEntity that was loaded
worldThe ServerLevel containing the block entity

BlockBreakArg

CommonData Class
kotlin
data class BlockBreakArg( val world: Level, val player: Player, val pos: BlockPos, val state: BlockState, val blockEntity: BlockEntity?, ) : CancellableEventArg()

Argument for block break event.

Can be cancelled to prevent the block from being broken.

Properties

PropertyDescription
worldThe Level containing the block
playerThe player breaking the block
posThe position of the block
stateThe BlockState being broken
blockEntityThe BlockEntity at the position, if any

BlockPlaceArg

CommonData Class
kotlin
data class BlockPlaceArg( val world: Level, val player: Player?, val pos: BlockPos, val state: BlockState, val blockEntity: BlockEntity? ): CancellableEventArg()

Argument for block place event.

Can be cancelled to prevent the block from being placed.

Properties

PropertyDescription
worldThe Level where the block is being placed
playerThe player placing the block (may be null for non-player placement)
posThe position where the block is being placed
stateThe BlockState being placed
blockEntityThe BlockEntity being placed, if any

UseItemOnArg

CommonData Class
kotlin
data class UseItemOnArg( val stack: ItemStack, val state: BlockState, val world: Level, val pos: BlockPos, val player: Player, val hand: InteractionHand, val hitResult: BlockHitResult )

Argument for item use on block event.

Properties

PropertyDescription
stackThe ItemStack being used
stateThe BlockState of the block being interacted with
worldThe Level containing the block
posThe position of the block
playerThe player using the item
handThe hand holding the item
hitResultThe block hit result containing face and position details

UseWithoutItemOnArg

CommonData Class
kotlin
data class UseWithoutItemOnArg( val state: BlockState, val world: Level, val pos: BlockPos, val player: Player, val hitResult: BlockHitResult )

Argument for block interaction without item event.

Properties

PropertyDescription
stateThe BlockState of the block being interacted with
worldThe Level containing the block
posThe position of the block
playerThe player interacting with the block
hitResultThe block hit result

AllowEnchantingArg

CommonData Class
kotlin
data class AllowEnchantingArg( val enchantment: Holder<Enchantment>, val target: ItemStack, val context: EnchantingContext )

Argument for enchantment allowance check event.

Used to determine if an enchantment can be applied to an item.

Properties

PropertyDescription
enchantmentThe enchantment being checked
targetThe target ItemStack
contextThe enchanting context (PRIMARY or ACCEPTABLE)

ModifyEnchantmentArg

CommonData Class
kotlin
data class ModifyEnchantmentArg( val key: ResourceKey<Enchantment>, val builder: Enchantment.Builder )

Argument for enchantment modification event.

Properties

PropertyDescription
keyThe ResourceKey of the enchantment being modified
builderThe Enchantment.Builder for modification

ElytraAllowArg

CommonData Class
kotlin
data class ElytraAllowArg(val entity: LivingEntity)

Argument for elytra flight allowance check.

Properties

PropertyDescription
entityThe entity attempting to use elytra flight

ElytraCustomArg

CommonData Class
kotlin
data class ElytraCustomArg( val entity: LivingEntity, val tickElytra: Boolean )

Argument for custom elytra flight event.

Properties

PropertyDescription
entityThe entity using elytra flight
tickElytraWhether vanilla elytra tick logic should run

AllowSleepingArg

CommonData Class
kotlin
data class AllowSleepingArg( val entity: LivingEntity, val pos: BlockPos )

Argument for sleeping allowance check.

Properties

PropertyDescription
entityThe entity attempting to sleep
posThe position of the bed

SleepingArg

CommonData Class
kotlin
data class SleepingArg( val entity: LivingEntity, val pos: BlockPos )

Argument for sleeping event.

Properties

PropertyDescription
entityThe entity that is sleeping
posThe position of the bed

AllowBedArg

CommonData Class
kotlin
data class AllowBedArg( val entity: LivingEntity, val pos: BlockPos, val state: BlockState, val vanillaResult: Boolean )

Argument for bed usage allowance check.

Properties

PropertyDescription
entityThe entity attempting to use the bed
posThe position of the bed
stateThe BlockState of the bed
vanillaResultThe vanilla game's result for this check

AllowNearbyMonstersArg

CommonData Class
kotlin
data class AllowNearbyMonstersArg( val entity: Player, val pos: BlockPos, val vanillaResult: Boolean )

Argument for nearby monsters check during sleeping.

Properties

PropertyDescription
entityThe player attempting to sleep
posThe position of the bed
vanillaResultThe vanilla game's result for this check

AllowResettingTimeArg

CommonData Class
kotlin
data class AllowResettingTimeArg(val player: Player)

Argument for time reset allowance check.

Properties

PropertyDescription
playerThe player attempting to reset the time

ModifySleepingDirectionArg

CommonData Class
kotlin
data class ModifySleepingDirectionArg( val entity: LivingEntity, val pos: BlockPos, val direction: Direction? )

Argument for sleeping direction modification.

Properties

PropertyDescription
entityThe entity sleeping
posThe position of the bed
directionThe direction the entity is facing while sleeping

AllowSettingSpawnArg

CommonData Class
kotlin
data class AllowSettingSpawnArg( val entity: LivingEntity, val pos: BlockPos )

Argument for spawn point setting allowance.

Properties

PropertyDescription
entityThe entity whose spawn point is being set
posThe position of the spawn point

SetBedOccupationStateArg

CommonData Class
kotlin
data class SetBedOccupationStateArg( val entity: LivingEntity, val pos: BlockPos, val state: BlockState, val occupied: Boolean )

Argument for bed occupation state change.

Properties

PropertyDescription
entityThe entity occupying the bed
posThe position of the bed
stateThe BlockState of the bed
occupiedWhether the bed is now occupied

ModifyWakeUpPositionArg

CommonData Class
kotlin
data class ModifyWakeUpPositionArg( val entity: LivingEntity, val sleepingPos: BlockPos, val bedState: BlockState, val wakeUpPos: Vec3? )

Argument for wake-up position modification.

Properties

PropertyDescription
entityThe entity waking up
sleepingPosThe position where the entity was sleeping
bedStateThe BlockState of the bed
wakeUpPosThe calculated wake-up position (may be modified)

ItemUseOnArg

CommonData Class
kotlin
data class ItemUseOnArg(val context: UseOnContext)

Argument for item use on block context.

Properties

PropertyDescription
contextThe UseOnContext containing all interaction details

ItemUseArg

CommonData Class
kotlin
data class ItemUseArg( val world: Level, val player: Player, val hand: InteractionHand )

Argument for item use event.

Properties

PropertyDescription
worldThe Level where the item is being used
playerThe player using the item
handThe hand holding the item

LootTableReplaceArg

CommonData Class
kotlin
data class LootTableReplaceArg( val key: ResourceKey<LootTable>, val original: LootTable, val registries: HolderLookup.Provider )

Argument for loot table replacement event.

Properties

PropertyDescription
keyThe ResourceKey of the loot table
originalThe original LootTable
registriesThe registry lookup provider

LootTableModifyArg

CommonData Class
kotlin
data class LootTableModifyArg( val key: ResourceKey<LootTable>, val tableBuilder: LootTable.Builder, val registries: HolderLookup.Provider )

Argument for loot table modification event.

Properties

PropertyDescription
keyThe ResourceKey of the loot table
tableBuilderThe LootTable.Builder for modification
registriesThe registry lookup provider

LootTableAllLoadArg

CommonData Class
kotlin
data class LootTableAllLoadArg( val resourceManager: ResourceManager, val lootDataManager: Registry<LootTable> )

Argument for all loot tables load event.

Properties

PropertyDescription
resourceManagerThe resource manager
lootDataManagerThe loot data manager registry

LootTableModifyDropsArg

CommonData Class
kotlin
data class LootTableModifyDropsArg( val table: Holder<LootTable>, val context: LootContext, val drops: List<ItemStack> )

Argument for loot table drops modification.

Properties

PropertyDescription
tableThe loot table holder
contextThe loot context for the drop
dropsThe list of dropped ItemStacks (may be modified)

PlayerAttackBlockArg

CommonData Class
kotlin
data class PlayerAttackBlockArg( val player: Player, val world: Level, val hand: InteractionHand, val pos: BlockPos, val direction: Direction, )

Argument for player attack block event.

Properties

PropertyDescription
playerThe player attacking the block
worldThe Level containing the block
handThe hand used to attack
posThe position of the block being attacked
directionThe face being attacked

PlayerAttackEntityArg

CommonData Class
kotlin
data class PlayerAttackEntityArg( val player: Player, val world: Level, val hand: InteractionHand, val entity: Entity, val hitResult: EntityHitResult? )

Argument for player attack entity event.

Properties

PropertyDescription
playerThe player attacking
worldThe Level where the attack occurs
handThe hand used to attack
entityThe entity being attacked
hitResultThe entity hit result

PlayerUseBlockArg

CommonData Class
kotlin
data class PlayerUseBlockArg( val player: Player, val world: Level, val hand: InteractionHand, val hitResult: BlockHitResult )

Argument for player use block event.

Properties

PropertyDescription
playerThe player interacting
worldThe Level containing the block
handThe hand used for interaction
hitResultThe block hit result

PlayerUseEntityArg

CommonData Class
kotlin
data class PlayerUseEntityArg( val player: Player, val world: Level, val hand: InteractionHand, val entity: Entity, val hitResult: EntityHitResult? )

Argument for player use entity event.

Properties

PropertyDescription
playerThe player interacting
worldThe Level containing the entity
handThe hand used for interaction
entityThe entity being interacted with
hitResultThe entity hit result

PlayerUseItemArg

CommonData Class
kotlin
data class PlayerUseItemArg( val player: Player, val world: Level, val hand: InteractionHand )

Argument for player use item event.

Properties

PropertyDescription
playerThe player using the item
worldThe Level where the item is used
handThe hand holding the item

PlayerPickFromBlockArg

CommonData Class
kotlin
data class PlayerPickFromBlockArg( val player: ServerPlayer, val pos: BlockPos, val state: BlockState, val includeData: Boolean )

Argument for player pick block event.

Properties

PropertyDescription
playerThe player picking the block
posThe position of the block being picked
stateThe BlockState of the block
includeDataWhether block entity data should be included

PlayerPickFromEntityArg

CommonData Class
kotlin
data class PlayerPickFromEntityArg( val player: ServerPlayer, val entity: Entity, val includeData: Boolean )

Argument for player pick entity event.

Properties

PropertyDescription
playerThe player picking the entity
entityThe entity being picked
includeDataWhether entity data should be included

AfterKilledOtherEntityArg

CommonData Class
kotlin
data class AfterKilledOtherEntityArg( val world: ServerLevel, val entity: Entity, val killedEntity: LivingEntity, val source: DamageSource )

Argument for after entity killed another entity event.

Properties

PropertyDescription
worldThe ServerLevel where the kill occurred
entityThe killer entity
killedEntityThe entity that was killed
sourceThe damage source that caused the death

AfterEntityChangeLevelArg

CommonData Class
kotlin
data class AfterEntityChangeLevelArg( val originalEntity: Entity, val destinationEntity: Entity, val originalLevel: ServerLevel, val destinationLevel: ServerLevel )

Argument for entity level change event.

Properties

PropertyDescription
originalEntityThe entity before level change
destinationEntityThe entity after level change
originalLevelThe ServerLevel the entity was in
destinationLevelThe ServerLevel the entity is now in

AfterPlayerChangeLevelArg

CommonData Class
kotlin
data class AfterPlayerChangeLevelArg( val player: ServerPlayer, val originalLevel: ServerLevel, val destinationLevel: ServerLevel )

Argument for player level change event.

Properties

PropertyDescription
playerThe ServerPlayer who changed level
originalLevelThe ServerLevel the player was in
destinationLevelThe ServerLevel the player is now in

AllowDamageArg

CommonData Class
kotlin
data class AllowDamageArg( val entity: LivingEntity, val source: DamageSource, val amount: Float )

Argument for damage allowance check.

Properties

PropertyDescription
entityThe entity potentially receiving damage
sourceThe damage source
amountThe damage amount

AfterDamageArg

CommonData Class
kotlin
data class AfterDamageArg( val entity: LivingEntity, val source: DamageSource, val initialDamage: Float, val finalDamage: Float, val handled: Boolean )

Argument for after damage event.

Properties

PropertyDescription
entityThe entity that received damage
sourceThe damage source
initialDamageThe damage amount before reductions
finalDamageThe damage amount after reductions
handledWhether the damage was handled

AllowDeathArg

CommonData Class
kotlin
data class AllowDeathArg( val entity: LivingEntity, val source: DamageSource, val amount: Float )

Argument for death allowance check.

Properties

PropertyDescription
entityThe entity potentially dying
sourceThe damage source causing death
amountThe damage amount

AfterDeathArg

CommonData Class
kotlin
data class AfterDeathArg( val entity: LivingEntity, val source: DamageSource )

Argument for after death event.

Properties

PropertyDescription
entityThe entity that died
sourceThe damage source that caused death

MobConversionArg

CommonData Class
kotlin
data class MobConversionArg( val oldEntity: Mob, val newEntity: Mob, val keepEquipment: ConversionParams? )

Argument for mob conversion event.

Properties

PropertyDescription
oldEntityThe original Mob before conversion
newEntityThe new Mob after conversion
keepEquipmentParameters for equipment retention during conversion

AllowChatMessageArg

CommonData Class
kotlin
data class AllowChatMessageArg( val message: PlayerChatMessage, val sender: ServerPlayer, val params: Bound )

Argument for chat message allowance check.

Properties

PropertyDescription
messageThe PlayerChatMessage being sent
senderThe ServerPlayer sending the message
paramsThe chat type bound parameters

AllowGameMessageArg

CommonData Class
kotlin
data class AllowGameMessageArg( val server: MinecraftServer, val message: Component, val overlay: Boolean )

Argument for game message allowance check.

Properties

PropertyDescription
serverThe MinecraftServer instance
messageThe message Component
overlayWhether the message should show as overlay

AllowCommandMessageArg

CommonData Class
kotlin
data class AllowCommandMessageArg( val message: PlayerChatMessage, val source: CommandSourceStack, val params: Bound )

Argument for command message allowance check.

Properties

PropertyDescription
messageThe PlayerChatMessage from command
sourceThe CommandSourceStack executing the command
paramsThe chat type bound parameters

ChatMessageArg

CommonData Class
kotlin
data class ChatMessageArg( val message: PlayerChatMessage, val sender: ServerPlayer, val params: Bound )

Argument for chat message event.

Properties

PropertyDescription
messageThe PlayerChatMessage being sent
senderThe ServerPlayer sending the message
paramsThe chat type bound parameters

GameMessageArg

CommonData Class
kotlin
data class GameMessageArg( val server: MinecraftServer, val message: Component, val overlay: Boolean )

Argument for game message event.

Properties

PropertyDescription
serverThe MinecraftServer instance
messageThe message Component
overlayWhether the message shows as overlay

CommandMessageArg

CommonData Class
kotlin
data class CommandMessageArg( val message: PlayerChatMessage, val source: CommandSourceStack, val params: Bound )

Argument for command message event.

Properties

PropertyDescription
messageThe PlayerChatMessage from command
sourceThe CommandSourceStack executing the command
paramsThe chat type bound parameters

PlayerArg

CommonData Class
kotlin
data class PlayerArg(val player: ServerPlayer)

Argument for player-related events.

Properties

PropertyDescription
playerThe ServerPlayer involved in the event

ServerPlayerAfterRespawnArg

CommonData Class
kotlin
data class ServerPlayerAfterRespawnArg( val oldPlayer: ServerPlayer, val newPlayer: ServerPlayer, val alive: Boolean )

Argument for player respawn event.

Properties

PropertyDescription
oldPlayerThe ServerPlayer before respawn
newPlayerThe ServerPlayer after respawn
aliveWhether the player was alive before respawn

ServerPlayerAllowDeathArg

CommonData Class
kotlin
data class ServerPlayerAllowDeathArg( val player: ServerPlayer, val damageSource: DamageSource, val damageAmount: Float )

Argument for player death allowance check.

Properties

PropertyDescription
playerThe ServerPlayer potentially dying
damageSourceThe damage source causing death
damageAmountThe damage amount

ServerPlayerCopyArg

CommonData Class
kotlin
data class ServerPlayerCopyArg( val oldPlayer: ServerPlayer, val newPlayer: ServerPlayer, val alive: Boolean )

Argument for player copy event (dimension change, etc.).

Properties

PropertyDescription
oldPlayerThe original ServerPlayer
newPlayerThe new ServerPlayer copy
aliveWhether the player was alive during copy

AnimalTameArg

CommonData Class
kotlin
data class AnimalTameArg( val animal: Animal, val tamer: Player ): CancellableEventArg()

Argument for animal tame event.

Can be cancelled to prevent taming.

Properties

PropertyDescription
animalThe Animal being tamed
tamerThe Player taming the animal

BabySpawnArg

CommonData Class
kotlin
data class BabySpawnArg( val parentA: LivingEntity, val parentB: LivingEntity, val child: AgeableMob? ): CancellableEventArg()

Argument for baby spawn event.

Can be cancelled to prevent baby spawning.

Properties

PropertyDescription
parentAThe first parent LivingEntity
parentBThe second parent LivingEntity
childThe baby AgeableMob (may be null)

CriticalHitArg

CommonData Class
kotlin
data class CriticalHitArg( val player: Player, val target: Entity, val isVanillaCritical: Boolean )

Argument for critical hit event.

Properties

PropertyDescription
playerThe Player making the attack
targetThe Entity being attacked
isVanillaCriticalWhether vanilla considers this a critical hit

PlayerWakeUpArg

CommonData Class
kotlin
data class PlayerWakeUpArg( val player: Player, val wakeImmediately: Boolean, val updateLevelList: Boolean )

Argument for player wake up event.

Properties

PropertyDescription
playerThe Player waking up
wakeImmediatelyWhether to wake immediately
updateLevelListWhether to update the level list

EntityTeleportArg

CommonData Class
kotlin
data class EntityTeleportArg( val entity: Entity, val fromX: Double, val fromY: Double, val fromZ: Double, val toX: Double, val toY: Double, val toZ: Double ): CancellableEventArg()

Argument for entity teleport event.

Can be cancelled to prevent teleportation.

Properties

PropertyDescription
entityThe Entity teleporting
fromXThe original X coordinate
fromYThe original Y coordinate
fromZThe original Z coordinate
toXThe destination X coordinate
toYThe destination Y coordinate
toZThe destination Z coordinate

EndermanAngerArg

CommonData Class
kotlin
data class EndermanAngerArg( val enderman: EnderMan, val player: Player ): CancellableEventArg()

Argument for enderman anger event.

Can be cancelled to prevent the enderman from becoming angry.

Properties

PropertyDescription
endermanThe EnderMan becoming angry
playerThe Player the enderman is targeting

ExplosionStartArg

CommonData Class
kotlin
data class ExplosionStartArg( val level: Level, val explosion: Explosion ): CancellableEventArg()

Argument for explosion start event.

Can be cancelled to prevent the explosion.

Properties

PropertyDescription
levelThe Level where the explosion is starting
explosionThe Explosion instance

ExplosionDetonateArg

CommonData Class
kotlin
data class ExplosionDetonateArg( val level: Level, val explosion: Explosion, val affectedEntities: List<Entity> )

Argument for explosion detonate event.

Properties

PropertyDescription
levelThe Level where the explosion is detonating
explosionThe Explosion instance
affectedEntitiesList of entities affected by the explosion

ItemTossArg

CommonData Class
kotlin
data class ItemTossArg( val player: Player, val item: ItemEntity )

Argument for item toss event.

Properties

PropertyDescription
playerThe Player tossing the item
itemThe ItemEntity being tossed

PlayerDestroyItemArg

CommonData Class
kotlin
data class PlayerDestroyItemArg( val player: Player, val item: ItemStack, val hand: InteractionHand? )

Argument for item destruction event.

Properties

PropertyDescription
playerThe Player whose item was destroyed
itemThe ItemStack that was destroyed
handThe hand the item was in (may be null)

LivingUseItemStartArg

CommonData Class
kotlin
data class LivingUseItemStartArg( val entity: LivingEntity, val item: ItemStack, val hand: InteractionHand, val duration: Int ): CancellableEventArg()

Argument for item use start event.

Can be cancelled to prevent item use.

Properties

PropertyDescription
entityThe LivingEntity starting to use the item
itemThe ItemStack being used
handThe hand holding the item
durationThe initial use duration in ticks

LivingUseItemTickArg

CommonData Class
kotlin
data class LivingUseItemTickArg( val entity: LivingEntity, val item: ItemStack, var duration: Int ): CancellableEventArg()

Argument for item use tick event.

Properties

PropertyDescription
entityThe LivingEntity using the item
itemThe ItemStack being used
durationThe remaining use duration (modifiable)

LivingUseItemStopArg

CommonData Class
kotlin
data class LivingUseItemStopArg( val entity: LivingEntity, val item: ItemStack, val duration: Int ): CancellableEventArg()

Argument for item use stop event.

Properties

PropertyDescription
entityThe LivingEntity that stopped using the item
itemThe ItemStack that was being used
durationThe remaining use duration when stopped

LivingUseItemFinishArg

CommonData Class
kotlin
data class LivingUseItemFinishArg( val entity: LivingEntity, val item: ItemStack, val duration: Int, var result: ItemStack )

Argument for item use finish event.

Properties

PropertyDescription
entityThe LivingEntity that finished using the item
itemThe ItemStack that was used
durationThe total use duration in ticks
resultThe resulting ItemStack (modifiable)

NeoPlayerAttackEntityArg

CommonData Class
kotlin
data class NeoPlayerAttackEntityArg( val player: Player, val target: Entity ) : CancellableEventArg()

Argument for NeoForge player attack entity event.

Can be cancelled to prevent the attack.

Properties

PropertyDescription
playerThe Player attacking
targetThe Entity being attacked

NeoPlayerInteractEntityArg

CommonData Class
kotlin
data class NeoPlayerInteractEntityArg( val player: Player, val entity: Entity, val hand: InteractionHand ) : CancellableEventArg()

Argument for NeoForge player interact entity event.

Can be cancelled to prevent the interaction.

Properties

PropertyDescription
playerThe Player interacting
entityThe Entity being interacted with
handThe hand used for interaction

NeoPlayerInteractBlockArg

CommonData Class
kotlin
data class NeoPlayerInteractBlockArg( val player: Player, val pos: BlockPos, val face: Direction?, val hand: InteractionHand ) : CancellableEventArg()

Argument for NeoForge player interact block event.

Can be cancelled to prevent the interaction.

Properties

PropertyDescription
playerThe Player interacting
posThe BlockPos being interacted with
faceThe Direction of the face being interacted with
handThe hand used for interaction

NeoPlayerInteractItemArg

CommonData Class
kotlin
data class NeoPlayerInteractItemArg( val player: Player, val hand: InteractionHand ) : CancellableEventArg()

Argument for NeoForge player interact item event.

Can be cancelled to prevent the interaction.

Properties

PropertyDescription
playerThe Player interacting
handThe hand holding the item

NeoPlayerLeftClickBlockArg

CommonData Class
kotlin
data class NeoPlayerLeftClickBlockArg( val player: Player, val pos: BlockPos, val face: Direction? ) : CancellableEventArg()

Argument for NeoForge player left click block event.

Can be cancelled to prevent the action.

Properties

PropertyDescription
playerThe Player left-clicking
posThe BlockPos being clicked
faceThe Direction of the face being clicked

PlayerXpChangeArg

CommonData Class
kotlin
data class PlayerXpChangeArg( val player: Player, val amount: Int ): CancellableEventArg()

Argument for player XP change event.

Can be cancelled to prevent the XP change.

Properties

PropertyDescription
playerThe Player receiving XP
amountThe amount of XP points being added

PlayerXpLevelChangeArg

CommonData Class
kotlin
data class PlayerXpLevelChangeArg( val player: Player, val levels: Int ): CancellableEventArg()

Argument for player XP level change event.

Can be cancelled to prevent the level change.

Properties

PropertyDescription
playerThe Player receiving levels
levelsThe number of levels being added

PlayerPickupXpArg

CommonData Class
kotlin
data class PlayerPickupXpArg( val player: Player, val orb: ExperienceOrb ): CancellableEventArg()

Argument for player pickup XP orb event.

Can be cancelled to prevent the pickup.

Properties

PropertyDescription
playerThe Player picking up the orb
orbThe ExperienceOrb being picked up

LivingHurtArg

CommonData Class
kotlin
data class LivingHurtArg( val entity: LivingEntity, val source: DamageSource, val amount: Float ): CancellableEventArg()

Argument for living entity hurt event.

Can be cancelled to prevent the damage.

Properties

PropertyDescription
entityThe LivingEntity being hurt
sourceThe DamageSource causing the hurt
amountThe damage amount

NeoLivingDamageArg

CommonData Class
kotlin
data class NeoLivingDamageArg( val entity: LivingEntity, val source: DamageSource, val amount: Float )

Argument for NeoForge living damage event.

Properties

PropertyDescription
entityThe LivingEntity receiving damage
sourceThe DamageSource
amountThe damage amount

NeoLivingDeathArg

CommonData Class
kotlin
data class NeoLivingDeathArg( val entity: LivingEntity, val source: DamageSource )

Argument for NeoForge living death event.

Properties

PropertyDescription
entityThe LivingEntity that died
sourceThe DamageSource that caused death

LivingDropsArg

CommonData Class
kotlin
data class LivingDropsArg( val entity: LivingEntity, val source: DamageSource, val drops: List<ItemStack> ): CancellableEventArg()

Argument for living entity drops event.

Can be cancelled to prevent drops.

Properties

PropertyDescription
entityThe LivingEntity dropping items
sourceThe DamageSource that caused the drops
dropsThe list of ItemStacks being dropped

LivingFallArg

CommonData Class
kotlin
data class LivingFallArg( val entity: LivingEntity, val distance: Double, val damageMultiplier: Float ): CancellableEventArg()

Argument for living entity fall event.

Can be cancelled to prevent fall damage.

Properties

PropertyDescription
entityThe LivingEntity falling
distanceThe fall distance in blocks
damageMultiplierThe damage multiplier

LivingJumpArg

CommonValue Class
kotlin
@JvmInline
value class LivingJumpArg(val entity: LivingEntity)

Argument for living entity jump event.

Properties

PropertyDescription
entityThe LivingEntity jumping

ServerChatArg

CommonData Class
kotlin
data class ServerChatArg( val player: ServerPlayer, val message: String, val component: Component ) : CancellableEventArg()

Argument for server chat event.

Can be cancelled to prevent the message from being sent.

Properties

PropertyDescription
playerThe ServerPlayer sending the message
messageThe raw message string
componentThe message as a Component

ShieldBlockArg

CommonData Class
kotlin
data class ShieldBlockArg( val entity: LivingEntity, val source: DamageSource, val blockedDamage: Float, val originalBlockedState: Boolean )

Argument for shield block event.

Properties

PropertyDescription
entityThe LivingEntity blocking with a shield
sourceThe DamageSource being blocked
blockedDamageThe amount of damage blocked
originalBlockedStateWhether the shield was originally blocking