Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
class KattonEntityAttributeValueMap(val entity: LivingEntity)
Link copied to clipboard
class KattonItemCollection(val container: Container)
Link copied to clipboard
class KattonLevelBlockCollection(val level: Level)
Link copied to clipboard
class KattonLevelBlockEntityCollection(val level: Level)
Link copied to clipboard
class KattonLevelBlockStateCollection(val level: Level)
Link copied to clipboard
class KattonLevelEntityCollection(val level: ServerLevel) : Iterable<Entity>
Link copied to clipboard
class KattonLevelMap(server: MinecraftServer) : Map<ResourceKey<Level>, ServerLevel>
Link copied to clipboard
class KattonLevelPlayerCollection(val level: ServerLevel) : List<ServerPlayer>
Link copied to clipboard
class KattonPlayerList(val playerList: PlayerList) : List<ServerPlayer>
Link copied to clipboard
class KattonScoreHolderScoreCollection(val scoreboard: Scoreboard, val scoreHolder: ScoreHolder)
Link copied to clipboard
class KattonServerEntityCollection(server: MinecraftServer)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var difficulty: Difficulty
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var Entity.nbt: CompoundTag

Get/Set the NBT data of an Entity.

var ItemStack.nbt: CompoundTag

Extension property to get/set NBT data on an ItemStack.

var BlockEntity.nbt: CompoundTag
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val scoreboard: Scoreboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val storage: CommandStorage

Functions

Link copied to clipboard
fun addAttributeModify(entity: LivingEntity, attribute: Holder<Attribute>, modifier: AttributeModifier)

Add a transient attribute modifier to an entity.

Link copied to clipboard
fun addEffect(entity: LivingEntity, effect: Holder<MobEffect>, duration: Int = 600, amplifier: Int = 0, showParticles: Boolean = true, ambient: Boolean = false)

Add a mob effect to a LivingEntity.

Link copied to clipboard
fun Player.addItem(item: Item, amount: Int): Boolean
Link copied to clipboard
fun addScore(target: String, objective: Objective, delta: Int)

Add delta to a target's score by name.

fun addScore(target: Entity, objective: Objective, delta: Int)

Add delta to a target Entity's score.

fun addScore(target: ScoreHolder, objective: Objective, delta: Int)

Add delta to a ScoreHolder's score.

Link copied to clipboard
fun addTag(entity: Entity, string: String): Boolean

Add a tag to an entity.

Link copied to clipboard
fun addTime(clock: Holder<WorldClock>, ticks: Int)
Link copied to clipboard
fun addTriggerValue(serverPlayer: ServerPlayer, objective: Objective, i: Int)

Add a trigger score value for a player on a trigger objective.

Link copied to clipboard
fun addXpLevels(player: Player, levels: Int)

Give experience levels to a player.

Link copied to clipboard
fun addXpPoints(player: Player, points: Int)

Give experience points to a player.

Link copied to clipboard
fun applyModifier(itemStack: ItemStack, modifier: LootItemFunction): ItemStack

Applies a LootItemFunction to an ItemStack and returns the modified stack.

Link copied to clipboard
fun ban(player: ServerPlayer)

Ban a player by adding them to the server ban list and disconnecting them.

Link copied to clipboard
fun banIp(ip: String)

Ban an IP address and disconnect matching players.

Link copied to clipboard
fun CompoundTag.clear()
Link copied to clipboard
fun clearEffects(entity: LivingEntity)

Clear all effects from a LivingEntity.

Link copied to clipboard
fun clearInventory(player: Player)

Clear a player's inventory.

Link copied to clipboard
fun createTeam(name: String, displayName: Component = Component.literal(name))

Create a team if it does not exist.

Link copied to clipboard
fun damage(entity: Entity, amount: Float)

Damage an entity by an amount using generic damage.

fun damage(target: Entity, amount: Float, attacker: Entity, damageType: ResourceKey<DamageType> = DamageTypes.GENERIC)

Damage a target entity from an attacker using a damage type key.

fun damage(target: Entity, amount: Float, attacker: Entity, damageType: DamageType)

Damage a target entity from an attacker using a DamageType instance.

fun damage(target: Entity, amount: Float, pos: Vec3, damageType: ResourceKey<DamageType> = DamageTypes.GENERIC)

Damage a target entity from a position using a damage type key.

fun damage(target: Entity, amount: Float, pos: Vec3, damageType: DamageType)

Damage a target entity from a position using a DamageType instance.

Link copied to clipboard
fun deleteTeam(team: PlayerTeam)

Delete a player team from the scoreboard.

Link copied to clipboard
fun deop(player: ServerPlayer)

De-op a player (remove operator status).

Link copied to clipboard
fun dismount(passenger: Entity): Boolean

Dismount a passenger from its vehicle.

Link copied to clipboard
fun dropBlockLoot(pos: BlockPos, tool: ItemStack): List<ItemStack>

Get drops for a block as if it were broken with a tool.

Link copied to clipboard
fun dropChestLoot(lootTable: LootTable): List<ItemStack>

Generate chest loot from a LootTable.

Link copied to clipboard
fun dropFishingLoot(lootTable: LootTable, pos: BlockPos, tool: ItemStack): List<ItemStack>

Generate fishing loot from a LootTable.

Link copied to clipboard
fun dropKillLoot(entity: Entity, killer: Entity?): List<ItemStack>

Get drops for an entity as if it were killed.

Link copied to clipboard
fun dropTo(level: Level, pos: Vec3, itemStacks: List<ItemStack>)

Drop item stacks into the world at a position.

Link copied to clipboard
fun dropToBlock(block: BlockPos, itemStacks: List<ItemStack>)

Attempt to deposit item stacks into a container block.

Link copied to clipboard
fun dropToBlockReplace(block: BlockPos, i: Int, j: Int, itemStacks: List<ItemStack>)

Replace a range of slots in a container block with given item stacks.

Link copied to clipboard
fun dropToEntity(entity: Entity, i: Int, j: Int, itemStacks: List<ItemStack>)

Set item stacks into entity slots.

Link copied to clipboard
fun dropToPlayer(player: ServerPlayer, itemStacks: List<ItemStack>)

Give item stacks to players (adds copies to inventory).

Link copied to clipboard
fun emptyTeam(team: PlayerTeam)

Empty a player team of all members.

Link copied to clipboard
fun enchant(itemStack: ItemStack, enchantment: Holder<Enchantment>, level: Int)

Enchant an ItemStack with an enchantment.

Link copied to clipboard
fun enchantMainHand(entity: LivingEntity, enchantment: Holder<Enchantment>, level: Int)

Enchant the item in an entity's main hand if present.

Link copied to clipboard
fun execute(command: String)
Link copied to clipboard
fun executeCommand(source: CommandSourceStack, command: String)

Execute a command as the provided command source.

Link copied to clipboard

Execute a command as the server console.

Link copied to clipboard
fun fake(name: String): ScoreHolder
Link copied to clipboard
fun fill(level: Level, start: BlockPos, end: BlockPos, block: Block)

Fill a region with a given Block type using its default state.

fun fill(level: Level, start: BlockPos, end: BlockPos, state: BlockState)

Fill a region with a given BlockState.

Link copied to clipboard
fun fillBiome(level: Level, start: BlockPos, end: BlockPos, biome: Identifier, biomePredicate: (Holder<Biome>) -> Boolean)

Fill a region's biome using a predicate on biome holder.

Link copied to clipboard
fun findEntities(level: ServerLevel, selector: EntitySelector): List<Entity>
Link copied to clipboard
fun findEntity(uuid: UUID): Entity?
Link copied to clipboard
fun findItem(player: Player, item: Item): Int

Find the slot index of an item in player's inventory.

Link copied to clipboard
fun findPlayer(uuid: UUID): ServerPlayer?
fun findPlayer(player: String): ServerPlayer?
Link copied to clipboard
operator fun Container.get(slot: Int): ItemStack
operator fun Container.get(slots: List<KattonItemCollection.KattonItemSlot>): List<ItemStack?>
operator fun SlotProvider.get(slot: KattonItemCollection.KattonItemSlot): ItemStack?
operator fun Scoreboard.get(target: ScoreHolder, objective: Objective): Int?
Link copied to clipboard
fun getAttribute(entity: LivingEntity, attribute: Holder<Attribute>): Double

Get an attribute value from a LivingEntity.

Link copied to clipboard
fun getBaseAttribute(entity: LivingEntity, attribute: Holder<Attribute>): Double?

Get base attribute value from a LivingEntity.

Link copied to clipboard
fun getBlockItem(pos: BlockPos, slot: Int): ItemStack?

Gets an item from a container block slot.

Link copied to clipboard
fun getBlockNbt(block: BlockEntity): CompoundTag

Get the NBT data of a block entity.

fun getBlockNbt(level: Level, pos: BlockPos): CompoundTag?

Get the NBT data of a block at a position if it has a block entity.

Link copied to clipboard
fun getDefaultClock(level: ServerLevel): Holder<WorldClock>?
Link copied to clipboard
fun getDuration(level: ServerLevel, i: Int, intProvider: IntProvider): Int

Resolve duration: if i == -1 use IntProvider sampled value; otherwise return i.

Link copied to clipboard
fun getEntityItem(entity: Entity, slot: Int): ItemStack?

Gets an item from an entity slot.

Link copied to clipboard
fun getEntityNbt(entity: Entity): CompoundTag

Get the full NBT data of an entity.

Link copied to clipboard
fun getGameMode(player: ServerPlayer): GameType

Get a player's current GameType.

Link copied to clipboard
fun <T : Any> getGameRule(key: GameRule<T>): T

Get a game rule value from the server overworld.

Link copied to clipboard
fun getItem(player: Player, slot: Int): ItemStack

Get the item from a player's inventory slot.

Link copied to clipboard
fun getObjective(name: String): Objective?

Get an objective by name.

Link copied to clipboard
fun getOrCreateObjective(name: String, displayName: Component = Component.literal(name), criteria: ObjectiveCriteria = ObjectiveCriteria.DUMMY, renderType: ObjectiveCriteria.RenderType = ObjectiveCriteria.RenderType.INTEGER, displayAutoUpdate: Boolean = false, numberFormat: NumberFormat? = null): Objective

Get or create a scoreboard Objective.

Link copied to clipboard
fun getScore(target: String, objective: Objective): Int?

Get a score by target name.

fun getScore(target: Entity, objective: Objective): Int?

Get a score by Entity.

fun getScore(target: ScoreHolder, objective: Objective): Int?

Get a score for a ScoreHolder.

Link copied to clipboard
fun getStorageNbt(id: Identifier): CompoundTag

Get stored command storage NBT by identifier.

Link copied to clipboard
fun getTags(entity: Entity): MutableCollection<String>

Get tags attached to an entity.

Link copied to clipboard
fun getTeam(name: String): PlayerTeam?

Get a team by name.

Link copied to clipboard
fun getWorldBorderSize(level: ServerLevel): Double

Get the current world border size.

Link copied to clipboard
fun getXpLevel(player: Player): Int

Get a player's experience level.

Link copied to clipboard
fun getXpProgress(player: Player): Float

Get a player's experience progress (fraction).

Link copied to clipboard
fun giveItem(player: Player, itemStack: ItemStack): Boolean

Try to give an item stack to a player.

Link copied to clipboard
fun giveRecipes(players: Collection<ServerPlayer>, recipes: Collection<RecipeHolder<*>>)

Give recipe advancements to players.

Link copied to clipboard
fun hasAttribute(entity: LivingEntity, attribute: Holder<Attribute>): Boolean

Check if a LivingEntity has a given attribute.

Link copied to clipboard
fun hasItem(player: Player, item: Item): Boolean
Link copied to clipboard
operator fun <V> Tag?.invoke(default: V): V
operator fun <T : Tag> Tag?.invoke(tagType: TagType<T>): T?
Link copied to clipboard
fun joinTeam(team: PlayerTeam, members: Collection<ScoreHolder>)

Add members to a PlayerTeam.

Link copied to clipboard
fun kick(player: Player, reason: Component = Component.translatable("multiplayer.disconnect.kicked"))

Kick a player with an optional reason component.

Link copied to clipboard
fun leaveTeam(members: Collection<ScoreHolder>)

Remove a collection of players from any teams.

Link copied to clipboard
fun locateBiome(biomeKey: ResourceKey<Biome>, level: ServerLevel, startPos: BlockPos = BlockPos.ZERO): Pair<BlockPos, Holder<Biome>>?

Find closest biome by resource key.

fun locateBiome(biomeKey: TagKey<Biome>, level: ServerLevel, startPos: BlockPos = BlockPos.ZERO): Pair<BlockPos, Holder<Biome>>?

Find closest biome by tag key.

Link copied to clipboard
fun locateStructure(structureKey: ResourceKey<Structure>, level: ServerLevel, startPos: BlockPos = BlockPos.ZERO): BlockPos?

Locate a structure by ResourceKey.

fun locateStructure(structureKey: TagKey<Structure>, level: ServerLevel, startPos: BlockPos = BlockPos.ZERO): BlockPos?

Locate a structure by TagKey.

Link copied to clipboard
operator fun Inventory.minusAssign(itemStack: ItemStack)
Link copied to clipboard
fun modifyBlockItem(pos: BlockPos, slot: Int, modifier: LootItemFunction)

Applies a LootItemFunction modifier to a block container slot.

Link copied to clipboard
fun modifyEntityItem(entity: Entity, slot: Int, modifier: LootItemFunction)

Applies a LootItemFunction to an entity equipment slot.

Link copied to clipboard
fun mount(passenger: Entity, vehicle: Entity): Boolean

Mount a passenger on a vehicle entity.

Link copied to clipboard
fun <T : Number> numericTagOf(value: T)
Link copied to clipboard
fun op(player: ServerPlayer)

Op a player (grant operator status).

Link copied to clipboard
fun parseNbt(nbt: String): CompoundTag

Parse an NBT string into a CompoundTag.

Link copied to clipboard
fun particle(level: ServerLevel, players: Collection<ServerPlayer>, particle: ParticleOptions, pos: Vec3, delta: Vec3 = Vec3.ZERO, speed: Double = 1.0, count: Int = 0, forced: Boolean = false)

Send particles to a collection of players.

Link copied to clipboard
fun placeFeature(feature: Identifier, pos: BlockPos)

Place a configured feature at a position.

Link copied to clipboard
fun placeJigsaw(templatePool: Identifier, start: Identifier, depth: Int, pos: BlockPos)

Place a jigsaw structure from a template pool.

Link copied to clipboard
fun placeStructure(structure: Identifier, pos: BlockPos)

Place a structure by identifier at a position.

Link copied to clipboard
fun playSound(level: ServerLevel, players: Collection<ServerPlayer>, sound: Identifier, soundSource: SoundSource, pos: Vec3, volume: Float = 1.0f, pitch: Float = 1.0f, minVolume: Float = 0.0f)

Play a sound to a set of players, performing distance attenuation and minimum volume handling.

Link copied to clipboard
operator fun Inventory.plusAssign(itemStack: ItemStack)
Link copied to clipboard
fun queryGameTime(level: ServerLevel): Int
Link copied to clipboard
fun queryTime(clock: Holder<WorldClock>): Int
Link copied to clipboard
fun queryTimelineRepetitions(clock: Holder<WorldClock>, timeline: Holder<Timeline>): Result<Int>
Link copied to clipboard
fun queryTimelineTicks(clock: Holder<WorldClock>, timeline: Holder<Timeline>): Result<Int>
Link copied to clipboard
fun randomSample(randomSequence: Identifier? = null, broadcast: Boolean = false, min: Int = Int.MIN_VALUE, max: Int = Int.MAX_VALUE): Int?

Sample a random integer in min, max using optional random sequence.

Link copied to clipboard
fun removeAttributeModify(entity: LivingEntity, attribute: Holder<Attribute>, modifier: AttributeModifier)

Remove an attribute modifier from an entity.

Link copied to clipboard
fun removeEffect(entity: LivingEntity, effect: Holder<MobEffect>)

Remove a specific effect from a LivingEntity.

Link copied to clipboard
fun removeItem(player: Player, item: Item, count: Int): Boolean

Remove a count of items from player's inventory.

Link copied to clipboard
fun removeTag(entity: Entity, string: String): Boolean

Remove a tag from an entity.

Link copied to clipboard
fun resetAllSequences(level: ServerLevel)

Clear all random sequences for a level.

Link copied to clipboard
fun resetAllSequencesAndSetNewDefaults(level: ServerLevel, seed: Int, includeWorldSeed: Boolean = true, includeSequenceID: Boolean = true)

Reset all sequences and set new defaults.

Link copied to clipboard
fun resetScore(target: String, objective: Objective)

Reset a target's score by name.

fun resetScore(target: Entity, objective: Objective)

Reset a target's score by Entity.

fun resetScore(target: ScoreHolder, objective: Objective)

Reset a ScoreHolder's score.

Link copied to clipboard
fun resetSequence(level: ServerLevel, randomSequence: Identifier)

Reset a named random sequence for a level to its default seed.

fun resetSequence(level: ServerLevel, randomSequence: Identifier, seed: Int, includeWorldSeed: Boolean = true, includeSequenceID: Boolean = true)

Reset a named random sequence with a specific seed and behavior flags.

Link copied to clipboard
fun resetWaypointColor(serverLevel: ServerLevel, waypointTransmitter: WaypointTransmitter)

Reset waypoint color to default (unset).

Link copied to clipboard
fun rotate(target: Entity, rot: Vec2, relative: Boolean = false)

Rotate an entity by a Vec2 (pitch, yaw).

fun rotate(target: Entity, lookAt: Entity, targetAnchor: EntityAnchorArgument.Anchor = EntityAnchorArgument.Anchor.FEET, lookAtAnchor: EntityAnchorArgument.Anchor = EntityAnchorArgument.Anchor.FEET)

Rotate an entity to look at another entity.

fun rotate(target: Entity, lookAt: Vec3, targetAnchor: EntityAnchorArgument.Anchor = EntityAnchorArgument.Anchor.FEET, lookAtAnchor: EntityAnchorArgument.Anchor = EntityAnchorArgument.Anchor.FEET)

Rotate an entity to look at a position.

Link copied to clipboard
fun runFunction(id: Identifier, source: CommandSourceStack = requireServer().createCommandSourceStack())

Run a function (data pack function) with an optional command source.

Link copied to clipboard
operator fun Container.set(slot: Int, itemStack: ItemStack)
operator fun SlotProvider.set(slot: KattonItemCollection.KattonItemSlot, itemStack: ItemStack)
operator fun Scoreboard.set(target: ScoreHolder, objective: Objective, value: Int)
Link copied to clipboard
fun setBaseAttribute(entity: LivingEntity, attribute: Holder<Attribute>, value: Double): Boolean

Set the base attribute value for a LivingEntity.

Link copied to clipboard
fun setBlock(level: Level, pos: BlockPos, block: Block)

Set a block at position using a Block type's default state.

fun setBlock(level: Level, pos: BlockPos, state: BlockState)

Set a block at position to a specific BlockState.

Link copied to clipboard
fun setBlockItem(pos: BlockPos, slot: Int, itemStack: ItemStack)

Sets an item into a container block slot.

Link copied to clipboard
fun setBlockNbt(block: BlockEntity, tag: CompoundTag)

Replace the NBT data of a block entity.

fun setBlockNbt(level: Level, pos: BlockPos, tag: CompoundTag): Boolean

Set the NBT of a block entity at the given position.

Link copied to clipboard
fun setClear(level: ServerLevel, i: Int)

Set clear weather for specified duration (or sample when -1).

Link copied to clipboard
fun setDifficulty(difficulty: Difficulty, ignoreLock: Boolean = true)

Set server difficulty.

Link copied to clipboard
fun setEntityItem(entity: Entity, slot: Int, itemStack: ItemStack)

Sets an item into an entity slot.

Link copied to clipboard
fun setEntityNbt(entity: Entity, tag: CompoundTag)

Replace the NBT data of an entity.

Link copied to clipboard
fun setGameMode(player: ServerPlayer, gameMode: GameType)

Set a player's game mode.

Link copied to clipboard
fun <T : Any> setGameRule(key: GameRule<T>, value: T)

Set a game rule value on the server overworld.

Link copied to clipboard
fun setItem(player: Player, slot: Int, itemStack: ItemStack)

Set an item into a player's inventory slot.

Link copied to clipboard
fun setPaused(clock: Holder<WorldClock>, paused: Boolean)
Link copied to clipboard
fun setRain(level: ServerLevel, i: Int)

Set rain weather for specified duration (or sample when -1).

Link copied to clipboard
fun setScore(target: String, objective: Objective, value: Int)

Set a score for a target identified by name.

fun setScore(target: Entity, objective: Objective, value: Int)

Set a score for an Entity.

fun setScore(target: ScoreHolder, objective: Objective, value: Int)

Set a score for a ScoreHolder.

Link copied to clipboard
fun setStorageNbt(id: Identifier, tag: CompoundTag)

Set stored command storage NBT by identifier.

Link copied to clipboard
fun setThunder(level: ServerLevel, i: Int)

Set thunder weather for specified duration (or sample when -1).

Link copied to clipboard
fun setTickFreeze(freeze: Boolean)

Freeze or unfreeze server tick processing.

Link copied to clipboard

Set the server ticking rate.

Link copied to clipboard
fun setTimeToTimeMarker(clock: Holder<WorldClock>, timeMarker: ResourceKey<ClockTimeMarker>): Boolean
Link copied to clipboard
fun setTotalTicks(clock: Holder<WorldClock>, ticks: Int)
Link copied to clipboard
fun setTriggerValue(serverPlayer: ServerPlayer, objective: Objective, i: Int)

Set a trigger score value for a player on a trigger objective.

Link copied to clipboard
fun setWaypointColor(serverLevel: ServerLevel, waypointTransmitter: WaypointTransmitter, integer: Int)

Set waypoint color using an integer color value.

fun setWaypointColor(serverLevel: ServerLevel, waypointTransmitter: WaypointTransmitter, chatFormatting: ChatFormatting)

Set waypoint color using ChatFormatting.

Link copied to clipboard
fun setWaypointStyle(serverLevel: ServerLevel, waypointTransmitter: WaypointTransmitter, resourceKey: ResourceKey<WaypointStyleAsset>)

Set waypoint style for a waypoint transmitter.

Link copied to clipboard
fun setWorldBorderDamageAmount(level: ServerLevel, damage: Double)

Set world border damage per block amount.

Link copied to clipboard
fun setWorldBorderDamageBuffer(level: ServerLevel, distance: Double)

Set world border safe-zone buffer.

Link copied to clipboard
fun setWorldBorderSize(level: ServerLevel, size: Double, time: Long = 0)

Set world border size, optionally over time.

Link copied to clipboard
fun setWorldBorderWarningDistance(level: ServerLevel, distance: Int)

Set world border warning distance in blocks.

Link copied to clipboard
fun setWorldBorderWarningTime(level: ServerLevel, time: Int)

Set world border warning time.

Link copied to clipboard
fun setWorldSpawn(level: ServerLevel, blockPos: BlockPos, rot: Vec2)

Set the world spawn and respawn orientation for a level.

Link copied to clipboard
fun setXpLevel(player: Player, level: Int)

Set a player's experience level.

Link copied to clipboard
fun simpleTrigger(serverPlayer: ServerPlayer, objective: Objective)

Simple trigger: increment a trigger objective for a player by 1.

Link copied to clipboard
fun spawnPoint(player: MutableCollection<ServerPlayer>, level: ServerLevel, pos: BlockPos, rot: Vec2)

Set spawn point for a collection of players.

Link copied to clipboard
fun spectate(player: ServerPlayer, target: Entity?): Boolean

Make a player spectate a target entity.

Link copied to clipboard
fun spreadPlayers(level: ServerLevel, center: Vec2, spreadDistance: Float, maxRange: Float, maxHeight: Int, respectTeams: Boolean, targets: Collection<Entity>)

Spread players around a center point.

Link copied to clipboard
fun summon(level: ServerLevel, reference: Holder.Reference<EntityType<*>>, vec3: Vec3, entityData: CompoundTag? = null): Entity?

Summon an entity of a given type at a position with optional NBT.

Link copied to clipboard
fun takeRecipes(players: Collection<ServerPlayer>, recipes: Collection<RecipeHolder<*>>)

Take recipe advancements from players.

Link copied to clipboard
fun teamMsg(entity: Entity, playerTeam: PlayerTeam, list: MutableList<ServerPlayer>, playerChatMessage: PlayerChatMessage, commandSourceStack: CommandSourceStack = requireServer().createCommandSourceStack())

Send a team chat message to a list of players with filtering and formatting.

Link copied to clipboard
fun teleportToEntity(collection: MutableCollection<out Entity>, entity: Entity)

Teleport a collection of entities to another entity's position.

Link copied to clipboard
fun teleportToPos(collection: MutableCollection<out Entity>, serverLevel: ServerLevel, pos: Vec3, rot: Vec2? = null)

Teleport a collection of entities to a given position and optionally set rotation.

fun teleportToPos(collection: MutableCollection<out Entity>, serverLevel: ServerLevel, pos: Vec3, lookAt: Vec3, anchor: EntityAnchorArgument.Anchor = EntityAnchorArgument.Anchor.FEET)

Teleport a collection of entities to a position and make them look at a position.

fun teleportToPos(collection: MutableCollection<out Entity>, serverLevel: ServerLevel, pos: Vec3, lookAt: Entity, anchor: EntityAnchorArgument.Anchor = EntityAnchorArgument.Anchor.FEET, lookAtAnchor: EntityAnchorArgument.Anchor = EntityAnchorArgument.Anchor.FEET)

Teleport a collection of entities to a position and make them look at an entity.

Link copied to clipboard
fun tell(message: Any)

Send a system message to all players.

fun tell(players: Collection<ServerPlayer>, message: Any)
fun tell(players: Collection<ServerPlayer>, message: String)
fun tell(players: Collection<ServerPlayer>, message: Component)

Send a system message to multiple players.

fun tell(player: ServerPlayer, message: Any)
fun tell(player: ServerPlayer, message: String)
fun tell(player: ServerPlayer, message: Component)

Send a system message to a player.

Link copied to clipboard

Query current tickrate.

Link copied to clipboard
fun tickSprint(i: Int)

Request the server to sprint tick advancement by given ticks.

Link copied to clipboard
fun tickStep(i: Int)

Step the server forward a number of ticks while paused.

Link copied to clipboard

Stop sprinting mode on the tick manager.

Link copied to clipboard

Stop stepping mode on the tick manager.

Link copied to clipboard
fun ByteTag?.toBoolean(): Boolean