Displays BentoBox version info alphabetically

https://github.com/BentoBoxWorld/BentoBox/issues/555
This commit is contained in:
tastybento 2019-02-26 09:09:12 -08:00
parent 2664acbe47
commit d68817863a

View File

@ -37,9 +37,12 @@ public class BentoBoxVersionCommand extends CompositeCommand {
TextVariables.VERSION, serverVersion != null ? serverVersion.toString() : user.getTranslation("general.invalid"));
user.sendMessage("commands.bentobox.version.plugin-version", TextVariables.VERSION, getPlugin().getDescription().getVersion());
user.sendMessage("commands.bentobox.version.loaded-game-worlds");
getIWM().getOverWorldNames().forEach((k,v) -> user.sendMessage("commands.bentobox.version.game-worlds", TextVariables.NAME, k, "[addon]", v));
getIWM().getOverWorldNames().entrySet().stream().sorted()
.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()
getPlugin().getAddonsManager().getAddons().stream().sorted((o1, o2)->o1.getDescription().getName().toLowerCase().compareTo(o2.getDescription().getName().toLowerCase()))
.forEach(a -> user.sendMessage("commands.bentobox.version.addon-syntax", TextVariables.NAME, a.getDescription().getName(),
TextVariables.VERSION, a.getDescription().getVersion()));