Tags
Creators
Details
0.1.4+mc1.18.2
Compatibility
Required content
Changes
Kube Utils Changelog
[0.1.4]
Added
-
A new
ku.player.starter-itemsevent that, once used and successfully gave items, will stop running-
You can define an item and equipment slot (For things like armor) too ```javascript onEvent("ku.player.starter-items", event => { // Item.of is optional here event.addItems("5x minecraft:gold_ingot", Item.of("2x minecraft:grass_block"))
// Valid options are part of the EquipmentSlot Enum event.addEquipmentItem("chest", "minecraft:golden_chestplate") event.addEquipmentItem("offhand", "minecraft:stone") }) ```
-
-
A new
Ku.Playerclass that brings some helpful methodsshowActionBar(text: string, color?: Color = Color.WHITE, bold = false, italic = false)- Uses the built-in client action bar to display a message. This is already supported through the player class but this method allows for less boilerplate and stable code ports
showActionBarComponent(component: Component)- Mostly the same as the above but gives you access to use a JS Object as your component which might look a something like this
javascript const player = Ku.Player(event.player); player.showActionBarComponent({ text: "Hello", bold: true }) clearStarterItemsFlag- This method simply reset the flag for the
ku.player.starter-itemsmeaning on the next login, the player will be given the items once again isClientSide- Lets you know if the client being wrapped is client side. This was mostly a helper for my code but it could be helpful
Changed
- Renamed the internal binding classes to be suffixed with Ku so they're visually different from vanilla and KubeJS
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:JHdL51WR:ZY9vRqjW"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:JHdL51WR:ZY9vRqjW"
}

