-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
111 additions
and
300 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 0 additions & 39 deletions
39
plugin/src/main/java/team/unnamed/creativeglyphs/plugin/command/ArgumentStack.java
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
plugin/src/main/java/team/unnamed/creativeglyphs/plugin/command/CommandRunnable.java
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
plugin/src/main/java/team/unnamed/creativeglyphs/plugin/command/CommandService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package team.unnamed.creativeglyphs.plugin.command; | ||
|
||
import me.fixeddev.commandflow.annotated.AnnotatedCommandTreeBuilder; | ||
import me.fixeddev.commandflow.annotated.part.PartInjector; | ||
import me.fixeddev.commandflow.annotated.part.defaults.DefaultsModule; | ||
import me.fixeddev.commandflow.bukkit.BukkitCommandManager; | ||
import me.fixeddev.commandflow.bukkit.factory.BukkitModule; | ||
import org.jetbrains.annotations.NotNull; | ||
import team.unnamed.creativeglyphs.plugin.CreativeGlyphsPlugin; | ||
|
||
import static java.util.Objects.requireNonNull; | ||
|
||
public final class CommandService { | ||
private final CreativeGlyphsPlugin plugin; | ||
|
||
public CommandService(final @NotNull CreativeGlyphsPlugin plugin) { | ||
this.plugin = requireNonNull(plugin, "plugin"); | ||
} | ||
|
||
public void start() { | ||
final var manager = new BukkitCommandManager(plugin.getName()); | ||
final var partInjector = PartInjector.create(); | ||
|
||
partInjector.install(new DefaultsModule()); | ||
partInjector.install(new BukkitModule()); | ||
|
||
final var builder = AnnotatedCommandTreeBuilder.create(partInjector); | ||
|
||
manager.registerCommands(builder.fromClass(new GlyphsCommand(plugin))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 0 additions & 62 deletions
62
plugin/src/main/java/team/unnamed/creativeglyphs/plugin/command/RootCommand.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.