-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from CyR1en/development
SignUI change and Command rework
- Loading branch information
Showing
30 changed files
with
418 additions
and
474 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
52 changes: 0 additions & 52 deletions
52
src/main/java/com/cyr1en/commandprompter/command/CommodoreRegistry.java
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
src/main/java/com/cyr1en/commandprompter/commands/Cancel.java
This file was deleted.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
src/main/java/com/cyr1en/commandprompter/commands/CommandAPIWrapper.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,47 @@ | ||
package com.cyr1en.commandprompter.commands; | ||
|
||
import com.cyr1en.commandprompter.CommandPrompter; | ||
import com.cyr1en.commandprompter.util.Util; | ||
|
||
import dev.jorel.commandapi.CommandAPI; | ||
import dev.jorel.commandapi.CommandAPIBukkitConfig; | ||
|
||
/** | ||
* Wrapper for CommandAPI. | ||
* | ||
* <p> | ||
* Since CommandPrompter loads CommandAPI dynamically, we need a wrapper to | ||
* prevent | ||
* CommandAPI imports on the main class. | ||
*/ | ||
public class CommandAPIWrapper { | ||
|
||
private final CommandPrompter plugin; | ||
|
||
public CommandAPIWrapper(CommandPrompter plugin) { | ||
this.plugin = plugin; | ||
} | ||
|
||
public void load() { | ||
var config = new CommandAPIBukkitConfig(plugin); | ||
config = plugin.getConfiguration().debugMode() ? config.silentLogs(false).verboseOutput(true) | ||
: config.silentLogs(true).verboseOutput(false); | ||
|
||
var msg = plugin.getI18N().getProperty("DelegateConsoleOnly"); | ||
config.missingExecutorImplementationMessage(Util.color(msg)); | ||
CommandAPI.onLoad(config); | ||
} | ||
|
||
public void onEnable() { | ||
CommandAPI.onEnable(); | ||
} | ||
|
||
public void onDisable() { | ||
CommandAPI.onDisable(); | ||
} | ||
|
||
public void registerCommands() { | ||
new MainCommand(plugin).register(); | ||
new ConsoleDelegate(plugin).register(); | ||
} | ||
} |
Oops, something went wrong.