Package-level declarations

Types

Link copied to clipboard

Utilities related to BlockFace.

Link copied to clipboard

The side of a block.

Link copied to clipboard
object BlockUtils
Link copied to clipboard
Link copied to clipboard
abstract class FakeOnlinePlayer(offlinePlayer: OfflinePlayer, location: Location) : Player, OfflinePlayer

A Player which will throw an UnsupportedOperationException when methods which aren't supported by OfflinePlayer are called.

Link copied to clipboard
class FakePlayer(server: MinecraftServer, level: ServerLevel, profile: GameProfile, val hasEvents: Boolean) : ServerPlayer
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
object NMSUtils
Link copied to clipboard
Link copied to clipboard
class PacketTask(packets: List<Packet<*>>, interval: Long, getViewers: () -> Iterable<Player>)

A task that sends the given packets to all players from getViewers every interval ticks.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class VoidingVirtualInventory(size: Int) : VirtualInventory

A VirtualInventory implementation that does not store any items, but voids them.

Properties

Link copied to clipboard
val Block.above: Block

The block that is one y-level above the current one.

Link copied to clipboard
val BlockFace.axis: Axis

The axis of a BlockFace

Link copied to clipboard
val Block.below: Block

The block that is one y-level below the current one.

Link copied to clipboard
val Direction.blockFace: BlockFace
Link copied to clipboard
val Location.blockLocation: Location
Link copied to clipboard
val Location.blockPos: BlockPos
Link copied to clipboard
val BlockState.bukkitBlockData: BlockData
Link copied to clipboard
val ItemStack.bukkitCopy: ItemStack
Link copied to clipboard
val InteractionHand.bukkitEquipmentSlot: EquipmentSlot
val EquipmentSlot.bukkitEquipmentSlot: EquipmentSlot
Link copied to clipboard
val Item.bukkitMaterial: Material
val Block.bukkitMaterial: Material
Link copied to clipboard
val ItemStack.bukkitMirror: ItemStack
Link copied to clipboard
val Pose.bukkitPose: Pose
Link copied to clipboard
val BlockPos.center: Vec3

val Block.center: Location

The location at the center of this block.

Link copied to clipboard
val BlockPos.chunkSection: LevelChunkSection
Link copied to clipboard
val Player.connection: ServerGamePacketListenerImpl
Link copied to clipboard
val CUBE_FACES: Set<BlockFace>
Link copied to clipboard
Link copied to clipboard
val Player.destroyProgress: Double?

The current block destroy progress of the player. Between 0 and 1 or null if the player is not breaking a block at the moment.

Link copied to clipboard
val Entity.eyeInWater: Boolean

If the Entity's eye is underwater.

Link copied to clipboard
val PlayerInteractEvent.handItems: Array<ItemStack>
Link copied to clipboard
val PlayerInteractEvent.hands: Array<Pair<EquipmentSlot, ItemStack>>
Link copied to clipboard
val Block.hardness: Double

The hardness of this block, also considering the custom hardness of Nova blocks.

Link copied to clipboard

If the Player has is currently looking into an inventory. Does not detect the player's inventory itself because that is not sent to the server.

Link copied to clipboard
val HORIZONTAL_FACES: Set<BlockFace>
Link copied to clipboard
val BlockState.id: Int

val Block.id: ResourceLocation

The ResourceLocation of this block, considering blocks from Nova, custom item services and vanilla.

Link copied to clipboard
val Chunk.levelChunk: LevelChunk
Link copied to clipboard
val Entity.localizedName: String?

The translation key for the name of this BukkitEntity.

Link copied to clipboard
val MINECRAFT_SERVER: DedicatedServer
Link copied to clipboard
val ResourceLocation.namespacedKey: NamespacedKey
Link copied to clipboard
val Attribute.nmsAttribute: Attribute
Link copied to clipboard
val Material.nmsBlock: Block
Link copied to clipboard
val BlockData.nmsBlockState: BlockState
Link copied to clipboard
val ItemStack?.nmsCopy: ItemStack
Link copied to clipboard
val BlockFace.nmsDirection: Direction
Link copied to clipboard
val Entity.nmsEntity: Entity
Link copied to clipboard
val InteractionHand.nmsEquipmentSlot: EquipmentSlot
val EquipmentSlot.nmsEquipmentSlot: EquipmentSlot
Link copied to clipboard
val EquipmentSlot.nmsInteractionHand: InteractionHand
val EquipmentSlot.nmsInteractionHand: InteractionHand
Link copied to clipboard
val Material.nmsItem: Item
Link copied to clipboard
val AttributeModifier.Operation.nmsOperation: AttributeModifier.Operation
Link copied to clipboard
val Pose.nmsPose: Pose
Link copied to clipboard
val Block.nmsState: BlockState
Link copied to clipboard
val ItemStack?.nmsVersion: ItemStack
Link copied to clipboard
var Block.novaBlock: NovaBlock?

The NovaBlock of the NovaBlockState at the position of this Block.

Link copied to clipboard

The NovaBlockState at the position of this Block.

Link copied to clipboard

The sound group of this block, also considering custom sound groups of Nova blocks.

Link copied to clipboard
val BlockFace.pitch: Float

The corresponding pitch value.

Link copied to clipboard
val REGISTRY_ACCESS: RegistryAccess
Link copied to clipboard
val NamespacedKey.resourceLocation: ResourceLocation
Link copied to clipboard
val World.serverLevel: ServerLevel
Link copied to clipboard
val Player.serverPlayer: ServerPlayer
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val BlockPos.vec3: Vec3
val Location.vec3: Vec3
val Vector.vec3: Vec3
Link copied to clipboard
val VERTICAL_FACES: Set<BlockFace>
Link copied to clipboard
val BlockFace.yaw: Float

The corresponding yaw value.

Functions

Link copied to clipboard
fun Location.add(vec: Vector3d): Location
fun Location.add(vec: Vector3f): Location
fun Rotations.add(x: Float, y: Float, z: Float): Rotations
Link copied to clipboard
fun VirtualInventory.addAll(reason: UpdateReason?, items: List<ItemStack>)

Adds a List of ItemStacks to a VirtualInventory.

Link copied to clipboard
fun Inventory.addItemCorrectly(itemStack: ItemStack, blockedSlots: BooleanArray = BooleanArray(size)): Int

Adds an ItemStack to an Inventory while respecting both the max stack size of the inventory and the max stack size of the item type.

Link copied to clipboard
fun String.addNamespace(namespace: String): String
Link copied to clipboard
Link copied to clipboard
fun Inventory.addPrioritized(prioritizedSlot: Int, itemStack: ItemStack)

Puts an ItemStack on the prioritizedSlot or adds it to the Inventory if the given slot is occupied.

fun PlayerInventory.addPrioritized(prioritizedSlot: EquipmentSlot, itemStack: ItemStack)

Puts an ItemStack on the prioritizedSlot or adds it to the Inventory if the given slot is occupied.

Link copied to clipboard
Link copied to clipboard
fun Player.addToInventoryOrDrop(items: List<ItemStack>)

Adds items to the Player's inventory or drops them on the ground if there is not enough space.

Link copied to clipboard
fun Location.advance(axis: Axis, stepSize: Double = 1.0): @NotNull Location
fun Location.advance(blockFace: BlockFace, stepSize: Double = 1.0): @NotNull Location
Link copied to clipboard
fun PlayerList.broadcast(location: Location, maxDistance: Double, packet: Packet<*>)
fun PlayerList.broadcast(block: Block, maxDistance: Double, packet: Packet<*>)
fun PlayerList.broadcast(exclude: Player?, location: Location, maxDistance: Double, packet: Packet<*>)
fun PlayerList.broadcast(exclude: Player?, block: Block, maxDistance: Double, packet: Packet<*>)
fun PlayerList.broadcast(exclude: Player?, location: Location, maxDistance: Double, packet: Packet<*>)
fun PlayerList.broadcast(exclude: Player?, block: Block, maxDistance: Double, packet: Packet<*>)
Link copied to clipboard

Sends the ClientboundLevelEventPacket to all players in a 1-chunk-range, causing break particles and sounds to be played. Only works with vanilla blocks.

Link copied to clipboard
fun Block.broadcastDestructionStage(entityId: Int, stage: Int)

Sends the ClientboundBlockDestructionPacket to all players in a 1-chunk-range with the given entityId and breaking stage. Only works with vanilla blocks.

fun Block.broadcastDestructionStage(player: Player, stage: Int)

Sends the ClientboundBlockDestructionPacket to all players in a 1-chunk-range with the entity id of the given player and breaking stage. Only works with vanilla blocks.

Link copied to clipboard
fun <T : Any> Registry<T>.byNameBinaryAdapter(): BinaryAdapter<T>
Link copied to clipboard
inline fun <T : Any> Registry<T>.byNameTypeSerializer(): TypeSerializer<T>
Link copied to clipboard
fun Vector.calculateYaw(): Float
Link copied to clipboard
Link copied to clipboard
fun callEvent(event: Event)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun Level.captureDrops(run: () -> Unit): List<ItemEntity>
Link copied to clipboard
inline fun Location.castRay(stepSize: Double, maxDistance: Double, run: (Location) -> Boolean)
Link copied to clipboard
fun Location.center(): Location
Link copied to clipboard
operator fun Location.component1(): World
Link copied to clipboard
operator fun Location.component2(): Double
Link copied to clipboard
operator fun Location.component3(): Double
Link copied to clipboard
operator fun Location.component4(): Double
Link copied to clipboard
operator fun Location.component5(): Float
Link copied to clipboard
operator fun Location.component6(): Float
Link copied to clipboard
operator fun Registry<*>.contains(key: String): Boolean
Link copied to clipboard
fun Inventory.containsAll(choices: List<RecipeChoice>): Boolean

Checks if this Inventory contains all choices

Link copied to clipboard
fun Rotations.copy(x: Float? = null, y: Float? = null, z: Float? = null): Rotations
Link copied to clipboard
fun Location.createColoredParticle(color: Color): ClientboundLevelParticlesPacket
Link copied to clipboard
fun LivingEntity.damageItemInHand(hand: EquipmentSlot, damage: Int = 1)

Damages the item in the specified hand by damage amount.

Link copied to clipboard
fun LivingEntity.damageItemInMainHand(damage: Int = 1)

Damages the item in the entity's main hand by damage amount.

Link copied to clipboard
fun LivingEntity.damageItemInOffHand(damage: Int = 1)

Damages the item in the entity's offhand by damage amount.

Link copied to clipboard
fun LivingEntity.damageToolAttackEntity()

Damages the tool in the entity's main hand as if they've attack an entity.

Link copied to clipboard
fun LivingEntity.damageToolBreakBlock()

Damages the tool in the entity's main hand as if they've broken a block.

Link copied to clipboard
fun Location.dropItem(item: ItemStack)
Link copied to clipboard
fun Location.dropItems(items: Iterable<ItemStack>)
Link copied to clipboard
fun World.dropItemsNaturally(location: Location, items: Iterable<ItemStack>)
Link copied to clipboard
fun String.equalsAny(vararg strings: String, ignoreCase: Boolean = false): Boolean
Link copied to clipboard
fun Iterable<Player>.filterInRange(location: Location, maxDistance: Double): List<Player>
Link copied to clipboard
fun forcePacketBroadcast(run: () -> Unit)
Link copied to clipboard
fun String.Companion.formatSafely(format: String, vararg args: Any?): String
Link copied to clipboard
inline fun Location.fullCuboidTo(to: Location, run: (Location) -> Boolean)
Link copied to clipboard
operator fun <T> Registry<T>.get(key: String): T?
Link copied to clipboard
fun BlockPos.getBlockState(): BlockState
fun LevelChunkSection.getBlockState(pos: BlockPos): BlockState
Link copied to clipboard
fun Location.getBoxOutline(other: Location, correct: Boolean, stepSize: Double = 0.5): List<Location>
Link copied to clipboard
fun Location.getCoordinate(axis: Axis): Double
Link copied to clipboard
fun Inventory.getFirstEmptySlot(): Int?

Gets the first slot index of the Inventory.getStorageContents that is completely empty.

Link copied to clipboard
fun Inventory.getFirstPartialStack(type: ItemStack): @Nullable ItemStack?

Gets the first ItemStack in the Inventory.getStorageContents that is similar to type and not a full stack.

Link copied to clipboard
fun Location.getFullCuboid(other: Location): List<Location>
Link copied to clipboard
fun <T> Registry<T>.getHolder(id: ResourceLocation): Holder<T>?
Link copied to clipboard
fun <T> Registry<T>.getHolderOrThrow(id: ResourceLocation): Holder<T>
Link copied to clipboard
fun Location.getNextBlockBelow(countSelf: Boolean, requiresSolid: Boolean): Location?
Link copied to clipboard
fun <T> Registry<T>.getOrCreateHolder(id: ResourceLocation): Holder<T>
Link copied to clipboard
fun <T> Registry<T>.getOrThrow(key: String): T
fun <T> Registry<T>.getOrThrow(id: ResourceLocation): T
Link copied to clipboard
fun Location.getPlayersNearby(maxDistance: Double, vararg excluded: Player): Sequence<Player>
Link copied to clipboard
fun Location.getRectangle(to: Location, omitCorners: Boolean): Map<Axis, List<Location>>
Link copied to clipboard
fun Location.getStraightLine(axis: Axis, to: Int): List<Location>
Link copied to clipboard
fun Chunk.getSurroundingChunks(range: Int, includeCurrent: Boolean, ignoreUnloaded: Boolean = false): List<Chunk>
Link copied to clipboard
fun Location.getTargetLocation(stepSize: Double, maxDistance: Double): Location
Link copied to clipboard
fun <T : Comparable<T>> BlockState.hasProperty(property: Property<T>, value: T): Boolean
Link copied to clipboard
fun String.insert(offset: Int, charSequence: CharSequence): String
Link copied to clipboard
fun String.insertAfter(char: Char, charSequence: CharSequence, ignoreCase: Boolean = false): String
Link copied to clipboard
fun String.insertAfterLast(char: Char, charSequence: CharSequence, ignoreCase: Boolean = false): String
Link copied to clipboard
fun Location.isBetween(min: Location, max: Location): Boolean
Link copied to clipboard
fun Location.isBetweenXZ(min: Location, max: Location): Boolean
Link copied to clipboard
fun Location.isBlockLocation(): Boolean
Link copied to clipboard
fun Action.isClickAir(): Boolean
Link copied to clipboard
fun Action.isClickBlock(): Boolean
Link copied to clipboard
fun PlayerInteractEvent.isCompletelyDenied(): Boolean
Link copied to clipboard
fun Inventory.isFull(): Boolean

Checks if an Inventory is full.

Link copied to clipboard

Checks if a location is inside the world borders and in the allowed building height.

Link copied to clipboard
fun InventoryView.isPlayerView(): Boolean

Checks if an InventoryView is the player inventory

Link copied to clipboard
fun Location(world: World?, x: Number, y: Number, z: Number, yaw: Number = 0, pitch: Number = 0): Location
Link copied to clipboard
fun <E : Any> NonNullList(list: List<E>, default: E? = null): NonNullList<E>
Link copied to clipboard
fun Player.playClickSound()
Link copied to clipboard
fun Player.playItemPickupSound()
Link copied to clipboard
fun Location.playSoundNearby(sound: Sound, volume: Float, pitch: Float, vararg excluded: Player)
fun Location.playSoundNearby(sound: Sound, category: SoundCategory, volume: Float, pitch: Float, vararg excluded: Player)
Link copied to clipboard
operator fun Any.plus(other: String): String
Link copied to clipboard
fun Location.positionEquals(other: Location): Boolean
Link copied to clipboard
inline fun preventEvents(run: () -> Unit)
Link copied to clipboard
Link copied to clipboard
fun <T : Any> WritableRegistry<T>.register(id: ResourceLocation, value: T): Holder.Reference<T>
Link copied to clipboard
@JvmName(name = "registerEvent1")
fun registerEvent(listener: Listener, event: Class<out Event>)
Link copied to clipboard
fun Listener.registerEvent(eventClass: Class<out Event>)
fun Listener.registerEvent(eventClass: KClass<out Event>)
Link copied to clipboard
@JvmName(name = "registerEventFirst1")
fun registerEventFirst(listener: Listener, event: Class<out Event>)
Link copied to clipboard
fun Listener.registerEventFirst(eventClass: Class<out Event>)
fun Listener.registerEventFirst(eventClass: KClass<out Event>)
Link copied to clipboard
@JvmName(name = "registerEvents1")
fun registerEvents(listener: Listener)
Link copied to clipboard
fun Listener.registerEvents()
Link copied to clipboard
@JvmName(name = "registerEventsExcept1")
fun registerEventsExcept(listener: Listener, vararg eventClasses: Class<out Event>)
Link copied to clipboard
fun Listener.registerEventsExcept(vararg eventClasses: Class<out Event>)
fun Listener.registerEventsExcept(vararg eventClasses: KClass<out Event>)
Link copied to clipboard
@JvmName(name = "registerEventsFirst1")
fun registerEventsFirst(listener: Listener)
Link copied to clipboard
fun Listener.registerEventsFirst()
Link copied to clipboard
fun RegistryFriendlyByteBuf(): RegistryFriendlyByteBuf
Link copied to clipboard
Link copied to clipboard
fun Location.removeOrientation()
Link copied to clipboard
fun replaceBroadcastExclusion(exclude: ServerPlayer, run: () -> Unit)
Link copied to clipboard
fun ResourceLocation(addon: Addon, name: String): ResourceLocation
Link copied to clipboard
fun runAsyncTask(run: () -> Unit): @NotNull BukkitTask
Link copied to clipboard
fun runAsyncTaskLater(delay: Long, run: () -> Unit): @NotNull BukkitTask
Link copied to clipboard
fun runAsyncTaskTimer(delay: Long, period: Long, run: () -> Unit): @NotNull BukkitTask
Link copied to clipboard
fun runTask(run: () -> Unit): @NotNull BukkitTask
Link copied to clipboard
fun runTaskLater(delay: Long, run: () -> Unit): @NotNull BukkitTask
Link copied to clipboard
fun runTaskTimer(delay: Long, period: Long, run: () -> Unit): @NotNull BukkitTask
Link copied to clipboard
fun Player.send(vararg packets: Packet<*>)
fun Player.send(packets: Iterable<Packet<*>>)
Link copied to clipboard
fun Packet<*>.sendTo(vararg players: Player)
fun Packet<*>.sendTo(players: Iterable<Player>)
Link copied to clipboard
operator fun <T : Any> WritableRegistry<T>.set(name: String, value: T)
operator fun <T : Any> WritableRegistry<T>.set(id: ResourceLocation, value: T)
operator fun <T : Any> WritableRegistry<T>.set(addon: Addon, key: String, value: T)
Link copied to clipboard
fun BlockPos.setBlockState(state: BlockState)
Link copied to clipboard
fun BlockPos.setBlockStateNoUpdate(state: BlockState)
Link copied to clipboard
fun BlockPos.setBlockStateSilently(state: BlockState)
fun LevelChunkSection.setBlockStateSilently(pos: BlockPos, state: BlockState)
Link copied to clipboard
fun Block.setBreakStage(entityId: Int, stage: Int)

Sets the break stage for this Block. Works with Nova and vanilla blocks.

Link copied to clipboard
fun Location.setCoordinate(axis: Axis, coordinate: Double)
Link copied to clipboard
fun Block.spawnExpOrb(exp: Int, location: Location = this.location.add(.5, .5, .5)): Int

Spawns an experience orb of exp from this block after calling the BlockExpEvent.

Link copied to clipboard
fun String.startsWithAny(vararg prefixes: String): Boolean
Link copied to clipboard
fun Location.subtract(vec: Vector3d): Location
fun Location.subtract(vec: Vector3f): Location
Link copied to clipboard
fun <T> Either<T, T>.take(): T
Link copied to clipboard
fun Inventory.takeFirstOccurrence(choice: RecipeChoice): ItemStack?

Removes one item matching the given choice and returns it

Link copied to clipboard
fun Entity.teleport(modifyLocation: Location.() -> Unit)

Teleports the BukkitEntity after modifying its location using the modifyLocation lambda.

Link copied to clipboard
fun <T> Registry<T>.toHolderMap(): Map<ResourceLocation, Holder<T>>
Link copied to clipboard
Link copied to clipboard
fun Vector3d.toLocation(world: World? = null): Location
fun Vector3f.toLocation(world: World? = null): Location
Link copied to clipboard
fun <T> Registry<T>.toMap(): Map<ResourceLocation, T>
Link copied to clipboard
fun BlockPos.toNovaPos(world: World): BlockPos
Link copied to clipboard
fun ResourceLocation.toString(separator: String): String
Link copied to clipboard
fun Location.toVec3(): Vec3
fun Vector.toVec3(): Vec3
fun Vector3d.toVec3(): Vec3
fun Vector3f.toVec3(): Vec3
Link copied to clipboard
fun Location.toVector3d(): Vector3d
Link copied to clipboard
fun Location.toVector3f(): Vector3f
Link copied to clipboard
fun Listener.unregisterEvents()
Link copied to clipboard
fun Location.untilHeightLimit(includeThis: Boolean, run: (Location) -> Boolean)
Link copied to clipboard
fun ItemStack?.unwrap(): ItemStack
Link copied to clipboard
fun Vector(yaw: Float, pitch: Float): Vector