Skip to content

Commit 2d944fa

Browse files
committed
Replace annotation command with Brigadier
1 parent 0e4d6c7 commit 2d944fa

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

src/main/kotlin/org/polyfrost/polyweather/client/PolyWeatherClient.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package org.polyfrost.polyweather.client
22

33
import org.polyfrost.oneconfig.api.commands.v1.CommandManager
4+
import org.polyfrost.oneconfig.utils.v1.dsl.openUI
5+
import org.polyfrost.polyweather.PolyWeatherConstants
46
import org.polyfrost.polyweather.client.realtime.RealWeatherHandler
57
import org.polyfrost.polyweather.util.WeatherType
68

@@ -32,8 +34,14 @@ object PolyWeatherClient {
3234

3335
fun initialize() {
3436
PolyWeatherConfig.preload()
35-
CommandManager.register(PolyWeatherCommand)
3637
RealWeatherHandler.initialize()
38+
39+
with(CommandManager.literal(PolyWeatherConstants.ID)) {
40+
executes { ctx ->
41+
PolyWeatherConfig.openUI()
42+
0
43+
}
44+
}
3745
}
3846

3947
}

src/main/kotlin/org/polyfrost/polyweather/client/PolyWeatherCommand.kt

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)