@@ -46,8 +46,9 @@ public EverythingCommand(Everything plugin) {
4646 @ Override
4747 public boolean onCommand (CommandSender sender , Command command , String label , String [] args ) {
4848 if (args .length == 0 ) {
49+ // Blue theme, not bold, prefix for every message
4950 Everything .sendFancy (sender , Component .text ()
50- .append (Component .text ("❓ Help & Commands\n " ).color (NamedTextColor .GOLD ). decorate ( net . kyori . adventure . text . format . TextDecoration . BOLD ))
51+ .append (Component .text ("❓ Everything Help & Commands\n " ).color (NamedTextColor .BLUE ))
5152 .append (Component .text ("Click a command for usage. Hover for description.\n " ).color (NamedTextColor .GRAY ))
5253 .build ());
5354
@@ -66,10 +67,9 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
6667 }
6768 }
6869 Component cmdComponent = Component .text ()
69- .append (Component .text ("• " ).color (NamedTextColor .LIGHT_PURPLE ))
70+ .append (Component .text ("• " ).color (NamedTextColor .BLUE ))
7071 .append (Component .text (usageLine .toString ())
7172 .color (NamedTextColor .AQUA )
72- .decorate (net .kyori .adventure .text .format .TextDecoration .BOLD )
7373 .clickEvent (net .kyori .adventure .text .event .ClickEvent .suggestCommand ("/" + cmd ))
7474 .hoverEvent (net .kyori .adventure .text .event .HoverEvent .showText (
7575 Component .text (descText == null || descText .isEmpty () ? "No description." : descText )
@@ -89,13 +89,11 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
8989 switch (args [0 ].toLowerCase ()) {
9090 case "reload" :
9191 if (!sender .hasPermission ("everything.reload" )) {
92- sender .sendMessage (Component .text ("You do not have permission to use this command." )
93- .color (NamedTextColor .RED ));
92+ Everything .sendFancy (sender , Component .text ("You do not have permission to use this command." ).color (NamedTextColor .RED ));
9493 return true ;
9594 }
9695 plugin .reloadConfig ();
97- sender .sendMessage (Component .text ("Plugin configuration reloaded successfully!" )
98- .color (NamedTextColor .GREEN ));
96+ Everything .sendFancy (sender , Component .text ("Plugin configuration reloaded successfully!" ).color (NamedTextColor .GREEN ));
9997 return true ;
10098
10199 case "info" : {
@@ -144,32 +142,30 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
144142
145143 case "checkupdate" :
146144 if (!sender .hasPermission ("everything.admin" )) {
147- sender .sendMessage (Component .text ("You don't have permission to check for updates!" )
148- .color (NamedTextColor .RED ));
145+ Everything .sendFancy (sender , Component .text ("You don't have permission to check for updates!" ).color (NamedTextColor .RED ));
149146 return true ;
150147 }
151-
152148 if (updater .isUpdateAvailable ()) {
153- sender . sendMessage ( Component .text ()
149+ Everything . sendFancy ( sender , Component .text ()
154150 .append (Component .text ("A new version is available! " ).color (NamedTextColor .GREEN ))
155151 .append (Component .text ("Current: " ).color (NamedTextColor .YELLOW ))
156152 .append (Component .text (plugin .getPluginMeta ().getVersion ()).color (NamedTextColor .WHITE ))
157153 .append (Component .text (" Latest: " ).color (NamedTextColor .YELLOW ))
158- .append (Component .text (updater .getLatestVersion ()).color (NamedTextColor .WHITE )));
154+ .append (Component .text (updater .getLatestVersion ()).color (NamedTextColor .WHITE ))
155+ .build ());
159156 } else {
160- sender .sendMessage (Component .text ("You are running the latest version!" )
161- .color (NamedTextColor .GREEN ));
157+ Everything .sendFancy (sender , Component .text ("You are running the latest version!" ).color (NamedTextColor .GREEN ));
162158 }
163159 return true ;
164160
165161
166162 case "test" :
167- sender . sendMessage ( Component .text ("[TEST] Listing and attempting to run all commands:" ).color (NamedTextColor .AQUA ));
163+ Everything . sendFancy ( sender , Component .text ("[TEST] Listing and attempting to run all commands:" ).color (NamedTextColor .AQUA ));
168164 List <String > testCommands = getPluginCommands ();
169165 for (String cmd : testCommands ) {
170166 org .bukkit .command .PluginCommand pluginCmd = plugin .getCommand (cmd );
171167 if (pluginCmd == null ) {
172- sender . sendMessage ( Component .text ("/" + cmd + " (Not registered)" ).color (NamedTextColor .RED ));
168+ Everything . sendFancy ( sender , Component .text ("/" + cmd + " (Not registered)" ).color (NamedTextColor .RED ));
173169 continue ;
174170 }
175171 String usage = pluginCmd .getUsage ();
@@ -185,7 +181,7 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
185181 if (descText != null && !descText .isEmpty ()) {
186182 line .append (" - " ).append (descText );
187183 }
188- sender . sendMessage ( Component .text (line .toString ()).color (NamedTextColor .GRAY ));
184+ Everything . sendFancy ( sender , Component .text (line .toString ()).color (NamedTextColor .GRAY ));
189185 // Try to run the command with the sender as the player if possible
190186 try {
191187 String [] testArgs = new String [0 ];
@@ -204,24 +200,24 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
204200 if (sender instanceof org .bukkit .entity .Player ) {
205201 testArgs = new String [] { ((org .bukkit .entity .Player )sender ).getName () };
206202 } else {
207- sender . sendMessage ( Component .text ("(Skipped: Needs player context)" ).color (NamedTextColor .DARK_GRAY ));
203+ Everything . sendFancy ( sender , Component .text ("(Skipped: Needs player context)" ).color (NamedTextColor .DARK_GRAY ));
208204 continue ;
209205 }
210206 }
211207 pluginCmd .execute (sender , cmd , testArgs );
212- sender . sendMessage ( Component .text ("(Executed)" ).color (NamedTextColor .DARK_GREEN ));
208+ Everything . sendFancy ( sender , Component .text ("(Executed)" ).color (NamedTextColor .DARK_GREEN ));
213209 } catch (Exception ex ) {
214- sender . sendMessage ( Component .text ("(Error executing: " + ex .getMessage () + ")" ).color (NamedTextColor .RED ));
210+ Everything . sendFancy ( sender , Component .text ("(Error executing: " + ex .getMessage () + ")" ).color (NamedTextColor .RED ));
215211 }
216212 }
217213
218214 // --- Fake updater test ---
219- sender . sendMessage ( Component .text ("[TEST] Faking updater state..." ).color (NamedTextColor .LIGHT_PURPLE ));
215+ Everything . sendFancy ( sender , Component .text ("[TEST] Faking updater state..." ).color (NamedTextColor .LIGHT_PURPLE ));
220216 // Simulate update available
221217 String fakeCurrent = plugin .getPluginMeta ().getVersion ();
222218 String fakeLatest = "v99.99.99-FAKE" ;
223219 String fakeUrl = "https://example.com/fake-update.jar" ;
224- sender . sendMessage ( Component .text ("[TEST] Simulated update available!" ).color (NamedTextColor .GREEN )
220+ Everything . sendFancy ( sender , Component .text ("[TEST] Simulated update available!" ).color (NamedTextColor .GREEN )
225221 .append (Component .text (" Current: " ).color (NamedTextColor .YELLOW ))
226222 .append (Component .text (fakeCurrent ).color (NamedTextColor .WHITE ))
227223 .append (Component .text (" Latest: " ).color (NamedTextColor .YELLOW ))
@@ -230,40 +226,39 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
230226 .append (Component .text (fakeUrl ).color (NamedTextColor .AQUA ))
231227 .append (Component .text (")" ).color (NamedTextColor .GRAY ))
232228 );
233- sender . sendMessage ( Component .text ("[TEST] (No real update performed, this is a debug simulation.)" ).color (NamedTextColor .DARK_GRAY ));
229+ Everything . sendFancy ( sender , Component .text ("[TEST] (No real update performed, this is a debug simulation.)" ).color (NamedTextColor .DARK_GRAY ));
234230
235231 // --- Print debug info ---
236- sender . sendMessage ( Component .text ("[DEBUG] Plugin info:" ).color (NamedTextColor .YELLOW ));
237- sender . sendMessage ( Component .text (" Name: " + plugin .getPluginMeta ().getName ()).color (NamedTextColor .GRAY ));
238- sender . sendMessage ( Component .text (" Version: " + plugin .getPluginMeta ().getVersion ()).color (NamedTextColor .GRAY ));
239- sender . sendMessage ( Component .text (" Authors: " + String .join (", " , plugin .getPluginMeta ().getAuthors ())).color (NamedTextColor .GRAY ));
240- sender . sendMessage ( Component .text (" Description: " + plugin .getPluginMeta ().getDescription ()).color (NamedTextColor .GRAY ));
241- sender . sendMessage ( Component .text ("[DEBUG] Java version: " + System .getProperty ("java.version" )).color (NamedTextColor .GRAY ));
242- sender . sendMessage ( Component .text ("[DEBUG] OS: " + System .getProperty ("os.name" ) + " (" + System .getProperty ("os.arch" ) + ")" ).color (NamedTextColor .GRAY ));
243- sender . sendMessage ( Component .text ("[DEBUG] Bukkit version: " + plugin .getServer ().getBukkitVersion ()).color (NamedTextColor .GRAY ));
244- sender . sendMessage ( Component .text ("[DEBUG] Data folder: " + plugin .getDataFolder ().getAbsolutePath ()).color (NamedTextColor .GRAY ));
232+ Everything . sendFancy ( sender , Component .text ("[DEBUG] Plugin info:" ).color (NamedTextColor .YELLOW ));
233+ Everything . sendFancy ( sender , Component .text (" Name: " + plugin .getPluginMeta ().getName ()).color (NamedTextColor .GRAY ));
234+ Everything . sendFancy ( sender , Component .text (" Version: " + plugin .getPluginMeta ().getVersion ()).color (NamedTextColor .GRAY ));
235+ Everything . sendFancy ( sender , Component .text (" Authors: " + String .join (", " , plugin .getPluginMeta ().getAuthors ())).color (NamedTextColor .GRAY ));
236+ Everything . sendFancy ( sender , Component .text (" Description: " + plugin .getPluginMeta ().getDescription ()).color (NamedTextColor .GRAY ));
237+ Everything . sendFancy ( sender , Component .text ("[DEBUG] Java version: " + System .getProperty ("java.version" )).color (NamedTextColor .GRAY ));
238+ Everything . sendFancy ( sender , Component .text ("[DEBUG] OS: " + System .getProperty ("os.name" ) + " (" + System .getProperty ("os.arch" ) + ")" ).color (NamedTextColor .GRAY ));
239+ Everything . sendFancy ( sender , Component .text ("[DEBUG] Bukkit version: " + plugin .getServer ().getBukkitVersion ()).color (NamedTextColor .GRAY ));
240+ Everything . sendFancy ( sender , Component .text ("[DEBUG] Data folder: " + plugin .getDataFolder ().getAbsolutePath ()).color (NamedTextColor .GRAY ));
245241
246242 // --- Simulate config reload ---
247- sender . sendMessage ( Component .text ("[TEST] Simulating config reload..." ).color (NamedTextColor .LIGHT_PURPLE ));
243+ Everything . sendFancy ( sender , Component .text ("[TEST] Simulating config reload..." ).color (NamedTextColor .LIGHT_PURPLE ));
248244 try {
249245 plugin .reloadConfig ();
250- sender . sendMessage ( Component .text ("[TEST] Config reload simulated successfully." ).color (NamedTextColor .GREEN ));
246+ Everything . sendFancy ( sender , Component .text ("[TEST] Config reload simulated successfully." ).color (NamedTextColor .GREEN ));
251247 } catch (Exception e ) {
252- sender . sendMessage ( Component .text ("[TEST] Config reload failed: " + e .getMessage ()).color (NamedTextColor .RED ));
248+ Everything . sendFancy ( sender , Component .text ("[TEST] Config reload failed: " + e .getMessage ()).color (NamedTextColor .RED ));
253249 }
254250
255251 // --- Simulate permission check ---
256- sender . sendMessage ( Component .text ("[TEST] Permission check for 'everything.admin': " )
252+ Everything . sendFancy ( sender , Component .text ("[TEST] Permission check for 'everything.admin': " )
257253 .color (NamedTextColor .LIGHT_PURPLE )
258254 .append (Component .text (sender .hasPermission ("everything.admin" ) ? "GRANTED" : "DENIED" ).color (sender .hasPermission ("everything.admin" ) ? NamedTextColor .GREEN : NamedTextColor .RED ))
259255 );
260256
261- sender . sendMessage ( Component .text ("[TEST] End of diagnostics." ).color (NamedTextColor .AQUA ));
257+ Everything . sendFancy ( sender , Component .text ("[TEST] End of diagnostics." ).color (NamedTextColor .AQUA ));
262258 return true ;
263259
264260 default :
265- sender .sendMessage (Component .text ("Unknown sub-command. Use /everything for help." )
266- .color (NamedTextColor .RED ));
261+ Everything .sendFancy (sender , Component .text ("Unknown sub-command. Use /everything for help." ).color (NamedTextColor .RED ));
267262 return true ;
268263 }
269264 }
0 commit comments