Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
Bump Minestom
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoDog896 committed May 26, 2022
1 parent 012262c commit f48501f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ dependencies {
testImplementation("io.kotest:kotest-runner-junit5:5.2.1")

// Compile Minestom into project
compileOnly("com.github.Minestom:Minestom:4ee5cbe424")
compileOnly("com.github.Minestom", "Minestom", "7867313290")

// Use kotlinx serialization
compileOnly("org.jetbrains.kotlinx", "kotlinx-serialization-json", "1.3.1")

// implement KStom
compileOnly("com.github.Project-Cepi:KStom:1229e45e12")
compileOnly("com.github.Project-Cepi:KStom:af120b5455")

// Add MiniMessage
compileOnly("net.kyori:adventure-text-minimessage:4.10.1")
Expand Down
1 change: 1 addition & 0 deletions src/main/kotlin/world/cepi/kepi/Kepi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import world.cepi.kstom.command.arguments.generation.CallbackGenerator
import world.cepi.kstom.command.register
import world.cepi.kstom.command.unregister
import world.cepi.kstom.event.listenOnly
import world.cepi.kstom.item.displayName
import world.cepi.kstom.item.item
import world.cepi.kstom.util.log
import world.cepi.kstom.util.node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ object BlockHandlerCommand : Kommand({
""".trimIndent()
}

syntax(get, relativeBlockPosition).onlyPlayers {
syntax(get, relativeBlockPosition) {
val block = player.instance!!
.getBlock((!relativeBlockPosition).from(player))

val handler = block.handler()

if (handler == null) {
player.sendMessage("No block handler found!")
return@onlyPlayers
return@syntax
}

player.sendMessage(
Expand All @@ -66,7 +66,7 @@ object BlockHandlerCommand : Kommand({
}

)
}
}.onlyPlayers()

val remove by literalFuzz(fuzz)

Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/world/cepi/kepi/command/KepiCommand.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ object KepiCommand : Kommand({
Component.text("Click to copy your player data", NamedTextColor.GRAY)
.clickEvent(
ClickEvent.copyToClipboard(
player.getTag(Tag.NBT)?.toSNBT() ?: "{}"
player.tagHandler().asCompound().toSNBT()
)
)
)
Expand Down
9 changes: 3 additions & 6 deletions src/main/kotlin/world/cepi/kepi/menu/KepiMenuUI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,14 @@ import net.minestom.server.entity.PlayerSkin
import net.minestom.server.item.Material
import net.minestom.server.item.metadata.PlayerHeadMeta
import world.cepi.kstom.adventure.noItalic
import world.cepi.kstom.item.item

fun menuUI(player: Player) = fragment(9, 6) {

this.inventory.title = Component.text("Menu", NamedTextColor.BLUE)

item(4, item(Material.PLAYER_HEAD) {
val builder = this as PlayerHeadMeta.Builder

builder.skullOwner(player.uuid)
builder.playerSkin(PlayerSkin.fromUuid(player.uuid.toString()))
item(4, world.cepi.kstom.item.item<PlayerHeadMeta.Builder, PlayerHeadMeta>(Material.PLAYER_HEAD) {
skullOwner(player.uuid)
playerSkin(PlayerSkin.fromUuid(player.uuid.toString()))

displayName(Component.text(player.username, NamedTextColor.BLUE).noItalic())
lore(
Expand Down

0 comments on commit f48501f

Please sign in to comment.