mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-28 03:57:39 +01:00
parent
5118b30303
commit
280f2e6c1c
@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||||
import world.bentobox.bentobox.api.localization.TextVariables;
|
import world.bentobox.bentobox.api.localization.TextVariables;
|
||||||
import world.bentobox.bentobox.api.user.User;
|
import world.bentobox.bentobox.api.user.User;
|
||||||
|
import world.bentobox.bentobox.versions.ServerCompatibility;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays information about Gamemodes, Addons and versioning.
|
* Displays information about Gamemodes, Addons and versioning.
|
||||||
@ -28,6 +29,12 @@ public class BentoBoxVersionCommand extends CompositeCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean execute(User user, String label, List<String> args) {
|
public boolean execute(User user, String label, List<String> args) {
|
||||||
|
ServerCompatibility.ServerSoftware serverSoftware = ServerCompatibility.getInstance().getServerSoftware(getPlugin().getServer());
|
||||||
|
ServerCompatibility.ServerVersion serverVersion = ServerCompatibility.getInstance().getServerVersion(getPlugin().getServer());
|
||||||
|
|
||||||
|
user.sendMessage("commands.bentobox.version.server",
|
||||||
|
TextVariables.NAME, serverSoftware != null ? serverSoftware.toString() : user.getTranslation("general.invalid"),
|
||||||
|
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.plugin-version", TextVariables.VERSION, getPlugin().getDescription().getVersion());
|
||||||
user.sendMessage("commands.bentobox.version.loaded-game-worlds");
|
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().forEach((k,v) -> user.sendMessage("commands.bentobox.version.game-worlds", TextVariables.NAME, k, "[addon]", v));
|
||||||
|
@ -13,6 +13,7 @@ meta:
|
|||||||
|
|
||||||
general:
|
general:
|
||||||
success: "&aSuccess!"
|
success: "&aSuccess!"
|
||||||
|
invalid: "Invalid"
|
||||||
errors:
|
errors:
|
||||||
command-cancelled: "&cCommand cancelled."
|
command-cancelled: "&cCommand cancelled."
|
||||||
no-permission: "&cYou don't have the permission to execute this command (&7[permission]&c)."
|
no-permission: "&cYou don't have the permission to execute this command (&7[permission]&c)."
|
||||||
@ -231,6 +232,7 @@ commands:
|
|||||||
loaded-game-worlds: "Loaded Game Worlds:"
|
loaded-game-worlds: "Loaded Game Worlds:"
|
||||||
addon-syntax: "&2[name] &3[version]"
|
addon-syntax: "&2[name] &3[version]"
|
||||||
game-worlds: "&2[name] &3([addon])"
|
game-worlds: "&2[name] &3([addon])"
|
||||||
|
server: "&2Running &3[name] [version]&2."
|
||||||
confirmation:
|
confirmation:
|
||||||
confirm: "&cType command again within &b[seconds]s&c to confirm."
|
confirm: "&cType command again within &b[seconds]s&c to confirm."
|
||||||
previous-request-cancelled: "&6Previous confirmation request cancelled."
|
previous-request-cancelled: "&6Previous confirmation request cancelled."
|
||||||
|
Loading…
Reference in New Issue
Block a user