Skip to content

Commit

Permalink
Port ExampleCommand (I forgor)
Browse files Browse the repository at this point in the history
  • Loading branch information
Deftu committed Dec 30, 2024
1 parent 682bb6a commit 474e628
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/main/java/org/polyfrost/example/command/ExampleCommand.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
package org.polyfrost.example.command;

import org.polyfrost.example.ExampleMod;
import cc.polyfrost.oneconfig.utils.commands.annotations.Command;
import cc.polyfrost.oneconfig.utils.commands.annotations.Main;
import org.polyfrost.oneconfig.api.commands.v1.factories.annotated.Command;
import org.polyfrost.oneconfig.utils.v1.dsl.ScreensKt;

/**
* An example command implementing the Command api of OneConfig.
* Registered in ExampleMod.java with `CommandManager.INSTANCE.registerCommand(new ExampleCommand());`
*
* @see Command
* @see Main
* @see ExampleMod
*/
@Command(value = ExampleMod.ID, description = "Access the " + ExampleMod.NAME + " GUI.")
public class ExampleCommand {
@Main

@Command
private void handle() {
ExampleMod.INSTANCE.config.openGui();
ScreensKt.openUI(ExampleMod.getConfig());
}
}

}

0 comments on commit 474e628

Please sign in to comment.