aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features/chat/PartyCommands.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/features/chat/PartyCommands.kt')
-rw-r--r--src/main/kotlin/features/chat/PartyCommands.kt8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/kotlin/features/chat/PartyCommands.kt b/src/main/kotlin/features/chat/PartyCommands.kt
index de3a0d9..85daf51 100644
--- a/src/main/kotlin/features/chat/PartyCommands.kt
+++ b/src/main/kotlin/features/chat/PartyCommands.kt
@@ -5,17 +5,18 @@ import com.mojang.brigadier.StringReader
import com.mojang.brigadier.exceptions.CommandSyntaxException
import com.mojang.brigadier.tree.LiteralCommandNode
import kotlin.time.Duration.Companion.seconds
-import net.minecraft.util.math.BlockPos
+import net.minecraft.core.BlockPos
import moe.nea.firmament.annotations.Subscribe
import moe.nea.firmament.commands.CaseInsensitiveLiteralCommandNode
import moe.nea.firmament.commands.thenExecute
import moe.nea.firmament.events.CommandEvent
import moe.nea.firmament.events.PartyMessageReceivedEvent
import moe.nea.firmament.events.ProcessChatEvent
-import moe.nea.firmament.gui.config.ManagedConfig
import moe.nea.firmament.util.ErrorUtil
import moe.nea.firmament.util.MC
import moe.nea.firmament.util.TimeMark
+import moe.nea.firmament.util.data.Config
+import moe.nea.firmament.util.data.ManagedConfig
import moe.nea.firmament.util.tr
import moe.nea.firmament.util.useMatch
@@ -79,7 +80,7 @@ object PartyCommands {
register("coords") {
executes {
- val p = MC.player?.blockPos ?: BlockPos.ORIGIN
+ val p = MC.player?.blockPosition() ?: BlockPos.ZERO
MC.sendCommand("pc x: ${p.x}, y: ${p.y}, z: ${p.z}")
0
}
@@ -89,6 +90,7 @@ object PartyCommands {
// TODO: at TPS command
}
+ @Config
object TConfig : ManagedConfig("party-commands", Category.CHAT) {
val enable by toggle("enable") { false }
val cooldown by duration("cooldown", 0.seconds, 20.seconds) { 2.seconds }