46
46
47
47
import java .io .File ;
48
48
49
- @ Plugin (id = "foxcore" , name = "FoxCore" , version = FoxCoreMain .PLUGIN_VERSION , dependencies = "before:foxguard" )
49
+ @ Plugin (id = "foxcore" , name = "FoxCore" , version = FoxCoreMain .PLUGIN_VERSION )
50
50
public class FoxCoreMain {
51
51
52
52
public static final String PLUGIN_VERSION = "SNAPSHOT" ;
@@ -77,19 +77,20 @@ public void gameConstruct(GameConstructionEvent event) {
77
77
@ Listener
78
78
public void gamePreInit (GamePreInitializationEvent event ) {
79
79
FCStateRegistry .init ();
80
+ registerCommands ();
80
81
}
81
82
82
83
@ Listener
83
84
public void gameInit (GameInitializationEvent event ) {
84
- registerCommands ( );
85
+ game . getCommandManager (). register ( this , fcDispatcher , "foxcore" , "foxc" , "fcommon" , "fc" );
85
86
FCStateRegistry .instance ().registerStateFactory (new PositionStateFieldFactory (), PositionsStateField .ID , Aliases .POSITIONS_ALIASES );
86
87
}
87
88
88
89
private void registerCommands () {
89
90
TextBuilder builder = Texts .builder ();
90
- builder .append (Texts .of (TextColors .GOLD , "FoxCore \n " ));
91
+ builder .append (Texts .of (TextColors .GOLD , "FoxCore\n " ));
91
92
builder .append (Texts .of ("Version: " + FoxCoreMain .PLUGIN_VERSION + "\n " ));
92
- builder .append (Texts .of ("Author: gravityfox" ));
93
+ builder .append (Texts .of ("Author: gravityfox\n " ));
93
94
94
95
FCCommandMainDispatcher fcDispatcher = new FCCommandMainDispatcher ("/foxcore" );
95
96
this .fcDispatcher = fcDispatcher ;
@@ -99,7 +100,7 @@ private void registerCommands() {
99
100
fcDispatcher .register (new CommandSubtract (), "subtract" , "sub" , "pop" );
100
101
fcDispatcher .register (new CommandFlush (), "flush" , "clear" , "wipe" );
101
102
102
- game . getCommandManager (). register ( this , fcDispatcher , "foxcore " , "foxc" , "fcommon" , "fc " );
103
+ fcDispatcher . register ( new CommandAbout ( builder . build ()), "about " , "info " );
103
104
}
104
105
105
106
public Logger logger () {
0 commit comments