mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-28 05:35:44 +01:00
Adds the addon name to the world list for version.
https://github.com/BentoBoxWorld/bentobox/issues/285
This commit is contained in:
parent
8cc2d1678a
commit
ebeaa650d9
@ -30,7 +30,7 @@ public class BentoBoxVersionCommand extends CompositeCommand {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
user.sendMessage("commands.bentobox.version.plugin-version", TextVariables.NAME, getPlugin().getDescription().getVersion());
|
||||
user.sendMessage("commands.bentobox.version.loaded-game-worlds");
|
||||
getIWM().getOverWorldNames().forEach(n -> user.sendMessage("commands.bentobox.version.game-worlds", TextVariables.NAME, n));
|
||||
getIWM().getOverWorldNames().forEach((k,v) -> user.sendMessage("commands.bentobox.version.game-worlds", TextVariables.NAME, k, "[addon]", v));
|
||||
user.sendMessage("commands.bentobox.version.loaded-addons");
|
||||
getPlugin().getAddonsManager()
|
||||
.getAddons()
|
||||
|
@ -100,13 +100,13 @@ public class IslandWorldManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get friendly names of all the over worlds
|
||||
* Get friendly names of all the over worlds and associated addon
|
||||
*
|
||||
* @return Set of world names
|
||||
* @return Map of world names and associated addon or if it's a built-in world "none"
|
||||
*/
|
||||
public Set<String> getOverWorldNames() {
|
||||
return worlds.entrySet().stream().filter(e -> e.getKey().getEnvironment().equals(Environment.NORMAL))
|
||||
.map(Map.Entry::getValue).collect(Collectors.toSet());
|
||||
public Map<String, String> getOverWorldNames() {
|
||||
return worldSettings.values().stream()
|
||||
.collect(Collectors.toMap(ws -> ws.getWorldName(), ws -> ws.getAddon().map(a -> a.getDescription().getName()).orElse("None")));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -203,9 +203,9 @@ commands:
|
||||
plugin-version: "&2Bentobox version: &3[name]"
|
||||
description: "display info"
|
||||
loaded-addons: "Loaded Add-Ons"
|
||||
loaded-game-worlds: "Loaded Game Worlds"
|
||||
loaded-game-worlds: "Loaded Game Worlds:"
|
||||
addon-syntax: "&2[name] &3[version]"
|
||||
game-worlds: "&2[name]"
|
||||
game-worlds: "&2[name] &3([addon])"
|
||||
confirmation:
|
||||
confirm: "&cType command again within &b[seconds]s&c to confirm"
|
||||
previous-request-cancelled: "&6Previous confirmation request cancelled"
|
||||
|
Loading…
Reference in New Issue
Block a user