Skip to content

Commit

Permalink
build: bump hylib to 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xhyrom committed May 28, 2023
1 parent 95c4db3 commit cf9fb3f
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/modules/HyX.main.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

group = "me.xhyrom.hyx"
version = "1.1.0"
version = "2.0.0"
description = "A powerful and lightweight plugin"

repositories {
Expand All @@ -24,11 +24,11 @@ repositories {

dependencies {
compileOnly("io.papermc.paper:paper-api:1.19.2-R0.1-SNAPSHOT")
compileOnly("me.xhyrom.hylib:hylib-bukkit:1.2.3")
compileOnly("me.xhyrom.hylib:hylib-bukkit:2.0.0")
compileOnly("com.github.MilkBowl:VaultAPI:1.7")

compileOnly("dev.jorel:commandapi-annotations:8.8.0")
annotationProcessor("dev.jorel:commandapi-annotations:8.8.0")
compileOnly("dev.jorel:commandapi-annotations:9.0.1")
annotationProcessor("dev.jorel:commandapi-annotations:9.0.1")
}

tasks.processResources {
Expand Down
9 changes: 5 additions & 4 deletions src/main/kotlin/me/xhyrom/hyx/HyX.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import me.xhyrom.hylib.common.api.structs.Language
import me.xhyrom.hylib.libs.commandapi.CommandAPI
import me.xhyrom.hylib.libs.commandapi.arguments.ArgumentSuggestions
import me.xhyrom.hylib.libs.commandapi.arguments.StringArgument
import me.xhyrom.hylib.libs.commandapi.executors.CommandArguments
import me.xhyrom.hylib.libs.commandapi.executors.CommandExecutor
import me.xhyrom.hyx.commands.gamemodes.*
import me.xhyrom.hyx.commands.virtual.*
Expand Down Expand Up @@ -132,9 +133,9 @@ class HyX : JavaPlugin() {
)
)
.executes(
CommandExecutor { sender: CommandSender, args: Array<Any?> ->
CommandExecutor { sender: CommandSender, args: CommandArguments ->
run {
when (args[0]) {
when (args.get("type") as String) {
"addAllOnline" -> {
server.onlinePlayers.forEach { player ->
player.isWhitelisted = true
Expand Down Expand Up @@ -176,9 +177,9 @@ class HyX : JavaPlugin() {
)
)
.executes(
CommandExecutor { sender: CommandSender, args: Array<Any?> ->
CommandExecutor { sender: CommandSender, args: CommandArguments ->
run {
when (args[0] as String) {
when (args.get("type") as String) {
"config" -> {
if (!xConfig().reload()) {
sender.sendMessage(
Expand Down
3 changes: 2 additions & 1 deletion src/main/kotlin/me/xhyrom/hyx/commands/Repair.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package me.xhyrom.hyx.commands

import me.xhyrom.hylib.libs.commandapi.executors.CommandArguments
import me.xhyrom.hylib.libs.commandapi.executors.PlayerCommandExecutor
import me.xhyrom.hyx.HyX.Companion.getInstanceUnsafe
import me.xhyrom.hyx.structs.Command
Expand All @@ -16,7 +17,7 @@ class Repair : Command("repair") {
})
}

private fun onDefault(player: Player, args: Array<Any>) {
private fun onDefault(player: Player, args: CommandArguments) {
val item = player.inventory.itemInMainHand
val meta = item.itemMeta
(meta as Damageable).damage = 0
Expand Down

0 comments on commit cf9fb3f

Please sign in to comment.