Do not send plugin headers when it is not required (#8889)

This commit is contained in:
Jakubk15 2023-02-23 00:59:42 +01:00
parent 751beefa8e
commit 4ad4252079
2 changed files with 11 additions and 2 deletions

View file

@ -54,4 +54,5 @@ vytskalt <vytskalt@protonmail.com>
TheFruxz <cedricspitzer@outlook.de>
Kieran Wallbanks <kieran.wallbanks@gmail.com>
Denery <dorofeevij@gmail.com>
Jakubk15 <jakubk15@protonmail.com>
```

View file

@ -229,11 +229,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ //.append(INFO_ICON_START.hoverEvent(SERVER_PLUGIN_INFO)); TODO: Add docs
+
+ sender.sendMessage(infoMessage);
+
+ if (!paperPlugins.isEmpty()) {
+ sender.sendMessage(PAPER_HEADER);
+ }
+
+ for (Component component : formatProviders(paperPlugins)) {
+ sender.sendMessage(component);
+ }
+
+ if (!spigotPlugins.isEmpty()) {
+ sender.sendMessage(BUKKIT_HEADER);
+ }
+
+ for (Component component : formatProviders(spigotPlugins)) {
+ sender.sendMessage(component);
+ }