Skip to content

Commit 474e628

Browse files
committed
Port ExampleCommand (I forgor)
1 parent 682bb6a commit 474e628

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
package org.polyfrost.example.command;
22

33
import org.polyfrost.example.ExampleMod;
4-
import cc.polyfrost.oneconfig.utils.commands.annotations.Command;
5-
import cc.polyfrost.oneconfig.utils.commands.annotations.Main;
4+
import org.polyfrost.oneconfig.api.commands.v1.factories.annotated.Command;
5+
import org.polyfrost.oneconfig.utils.v1.dsl.ScreensKt;
66

77
/**
88
* An example command implementing the Command api of OneConfig.
99
* Registered in ExampleMod.java with `CommandManager.INSTANCE.registerCommand(new ExampleCommand());`
1010
*
1111
* @see Command
12-
* @see Main
1312
* @see ExampleMod
1413
*/
1514
@Command(value = ExampleMod.ID, description = "Access the " + ExampleMod.NAME + " GUI.")
1615
public class ExampleCommand {
17-
@Main
16+
17+
@Command
1818
private void handle() {
19-
ExampleMod.INSTANCE.config.openGui();
19+
ScreensKt.openUI(ExampleMod.getConfig());
2020
}
21-
}
21+
22+
}

0 commit comments

Comments
 (0)