@@ -23,17 +23,13 @@ private void registerCommands() {
2323 }
2424
2525 private void handleRootCommand (CommandContext context ) {
26- context .replyMini ("<gold>╔════════════</gold> <yellow>NextCore v" + plugin .getPluginVersion () + "</yellow> <gold>═════════════</gold>" );
27- context .replyMini ("<gold>║</gold> " );
28- context .replyMini ("<gold>║</gold> <gray>/nextcore <yellow>reload</yellow><dark_gray> - </dark_gray>Reloads the NextCore configuration" );
29- context .replyMini ("<gold>║</gold> <gray>/nextcore <yellow>version</yellow><dark_gray> - </dark_gray>Displays the NextCore version" );
30- context .replyMini ("<gold>║</gold> <gray>/nextcore <yellow>debug</yellow><dark_gray> - </dark_gray>Toggles debug mode for NextCore" );
31- context .replyMini ("<gold>║</gold> <gray>/nextcore <yellow>info</yellow><dark_gray> - </dark_gray>Get server information" );
32- context .replyMini ("<gold>║</gold> <gray>/nextcore <yellow>test</yellow><dark_gray> - </dark_gray>Run test commands" );
33- context .replyMini ("<gold>║</gold> <gray>/nextcore <yellow>managers</yellow><dark_gray> - </dark_gray>See the managers doing their job" );
34- context .replyMini ("<gold>║</gold> <gray>/nextcore <yellow>help</yellow><dark_gray> - </dark_gray>Shows this help message" );
35- context .replyMini ("<gold>║</gold> " );
36- context .replyMini ("<gold>╚════════════</gold> <yellow>NextCore v" + plugin .getPluginVersion () + "</yellow> <gold>═════════════</gold>" );
26+ plugin .getMessagesFile ().getStringList ("commands.nextcore.help" ).forEach (line -> {
27+ line = line .replace ("%prefix%" , plugin .getMessagesFile ().getString ("general.prefix" , "<dark_gray>[<gradient:aqua:dark_aqua>ɴᴇxᴛᴄᴏʀᴇ<dark_gray>]</gradient></dark_gray>" ));
28+ line = line .replace ("%version%" , plugin .getPluginVersion ());
29+ line = line .replace ("%author%" , "NextForge Team" );
30+ line = line .replace ("%website%" , "https://nextforge.gg" );
31+ context .replyMini (line );
32+ });
3733 }
3834
3935 private void handleReloadCommand (CommandContext context ) {
@@ -43,10 +39,10 @@ private void handleReloadCommand(CommandContext context) {
4339 plugin .getConfigManager ().reloadAll ();
4440
4541 long time = System .currentTimeMillis () - start ;
46- plugin .getTextManager ().send (context .sender (), plugin .getMessagesFile ().getString ("reload.success" , "%prefix% <green>Configuration reloaded successfully.</green> <gray>(%time%ms)</gray>" ).replace ("%time%" , time + "" ));
42+ plugin .getTextManager ().send (context .sender (), plugin .getMessagesFile ().getString ("commands.nextcore. reload.success" , "%prefix% <green>Configuration reloaded successfully.</green> <gray>(%time%ms)</gray>" ).replace ("%time%" , time + "" ));
4743 } catch (Exception e ) {
4844 plugin .getSLF4JLogger ().error ("Failed to reload configuration" , e );
49- plugin .getTextManager ().send (context .sender (), plugin .getMessagesFile ().getString ("reload.error" , "%prefix% <red>Failed to reload configuration: %error%" ).replace ("%error%" , e .getMessage ()));
45+ plugin .getTextManager ().send (context .sender (), plugin .getMessagesFile ().getString ("commands.nextcore. reload.error" , "%prefix% <red>Failed to reload configuration: %error%" ).replace ("%error%" , e .getMessage ()));
5046 }
5147 }
5248
0 commit comments