mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-26 02:57:59 +01:00
Minor improvement of the comparator in /bbox version
This commit is contained in:
parent
197d51add0
commit
82dccfd839
@ -1,12 +1,14 @@
|
||||
package world.bentobox.bentobox.commands;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.localization.TextVariables;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
import world.bentobox.bentobox.versions.ServerCompatibility;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Displays information about Gamemodes, Addons and versioning.
|
||||
*
|
||||
@ -38,11 +40,11 @@ public class BentoBoxVersionCommand extends CompositeCommand {
|
||||
user.sendMessage("commands.bentobox.version.plugin-version", TextVariables.VERSION, getPlugin().getDescription().getVersion());
|
||||
user.sendMessage("commands.bentobox.version.loaded-game-worlds");
|
||||
|
||||
getIWM().getOverWorldNames().entrySet().stream().sorted((o1, o2)-> o1.getKey().compareTo(o2.getKey()))
|
||||
getIWM().getOverWorldNames().entrySet().stream().sorted(Comparator.comparing(Map.Entry::getKey))
|
||||
.forEach(e -> user.sendMessage("commands.bentobox.version.game-worlds", TextVariables.NAME, e.getKey(), "[addon]", e.getValue()));
|
||||
|
||||
user.sendMessage("commands.bentobox.version.loaded-addons");
|
||||
getPlugin().getAddonsManager().getAddons().stream().sorted((o1, o2)->o1.getDescription().getName().toLowerCase().compareTo(o2.getDescription().getName().toLowerCase()))
|
||||
getPlugin().getAddonsManager().getAddons().stream().sorted(Comparator.comparing(o -> o.getDescription().getName().toLowerCase()))
|
||||
.forEach(a -> user.sendMessage("commands.bentobox.version.addon-syntax", TextVariables.NAME, a.getDescription().getName(),
|
||||
TextVariables.VERSION, a.getDescription().getVersion()));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user