mirror of
https://github.com/ME1312/SubServers-2.git
synced 2024-11-22 10:15:52 +01:00
Update lang.yml
This commit is contained in:
parent
23a434054f
commit
746c51e8fa
@ -355,15 +355,15 @@ public class ConfigUpdater {
|
|||||||
def.put("Command.Generic.Console-Only", "&cSubServers &4&l\\u00BB&c This command is for console use only");
|
def.put("Command.Generic.Console-Only", "&cSubServers &4&l\\u00BB&c This command is for console use only");
|
||||||
def.put("Command.Generic.Usage", "&7SubServers &8&l\\u00BB&7 Usage: &f$str$");
|
def.put("Command.Generic.Usage", "&7SubServers &8&l\\u00BB&7 Usage: &f$str$");
|
||||||
def.put("Command.Generic.Exception", "&cSubServers &4&l\\u00BB&c An unexpected exception has occurred while parsing this command");
|
def.put("Command.Generic.Exception", "&cSubServers &4&l\\u00BB&c An unexpected exception has occurred while parsing this command");
|
||||||
def.put("Command.Generic.Invalid-Subcommand", "&cSubServers &4&l\\u00BB&c Unknown sub-command: $str$");
|
def.put("Command.Generic.Invalid-Subcommand", "&cSubServers &4&l\\u00BB&c Unknown sub-command: &4$str$");
|
||||||
def.put("Command.Generic.Invalid-Permission", "&cSubServers &4&l\\u00BB&c You need &4&n$str$&c to use this command");
|
def.put("Command.Generic.Invalid-Permission", "&cSubServers &4&l\\u00BB&c You need &4&n$str$&c to use this command");
|
||||||
def.put("Command.Generic.Invalid-Select-Permission", "&cSubServers &4&l\\u00BB&c You don't have permission to select &4$str$");
|
def.put("Command.Generic.Invalid-Select-Permission", "&cSubServers &4&l\\u00BB&c You don't have permission to select &4$str$");
|
||||||
def.put("Command.Generic.Unknown-Proxy", "&cSubServers &4&l\\u00BB&c There is no proxy with name &4$str$");
|
def.put("Command.Generic.Unknown-Proxy", "&cSubServers &4&l\\u00BB&c There is no proxy named &4$str$");
|
||||||
def.put("Command.Generic.Unknown-Host", "&cSubServers &4&l\\u00BB&c There is no host with name &4$str$");
|
def.put("Command.Generic.Unknown-Host", "&cSubServers &4&l\\u00BB&c There is no host named &4$str$");
|
||||||
def.put("Command.Generic.Unknown-Group", "&cSubServers &4&l\\u00BB&c There is no group with name &4$str$");
|
def.put("Command.Generic.Unknown-Group", "&cSubServers &4&l\\u00BB&c There is no group named &4$str$");
|
||||||
def.put("Command.Generic.Unknown-Server", "&cSubServers &4&l\\u00BB&c There is no server with name &4$str$");
|
def.put("Command.Generic.Unknown-Server", "&cSubServers &4&l\\u00BB&c There is no server named &4$str$");
|
||||||
def.put("Command.Generic.Unknown-SubServer", "&cSubServers &4&l\\u00BB&c There is no subserver with name &4$str$");
|
def.put("Command.Generic.Unknown-SubServer", "&cSubServers &4&l\\u00BB&c There is no subserver named &4$str$");
|
||||||
def.put("Command.Generic.Unknown-Player", "&cSubServers &4&l\\u00BB&c There is no player with name &4$str$");
|
def.put("Command.Generic.Unknown-Player", "&cSubServers &4&l\\u00BB&c There is no player named &4$str$");
|
||||||
def.put("Command.Generic.No-Servers-On-Host", "&7SubServers &8&l\\u00BB&7 There are no servers on host &f$str$");
|
def.put("Command.Generic.No-Servers-On-Host", "&7SubServers &8&l\\u00BB&7 There are no servers on host &f$str$");
|
||||||
def.put("Command.Generic.No-SubServers-On-Host", "&7SubServers &8&l\\u00BB&7 There are no subservers on host &f$str$");
|
def.put("Command.Generic.No-SubServers-On-Host", "&7SubServers &8&l\\u00BB&7 There are no subservers on host &f$str$");
|
||||||
def.put("Command.Generic.No-Servers-In-Group", "&7SubServers &8&l\\u00BB&7 There are no servers in group &f$str$");
|
def.put("Command.Generic.No-Servers-In-Group", "&7SubServers &8&l\\u00BB&7 There are no servers in group &f$str$");
|
||||||
@ -392,7 +392,7 @@ public class ConfigUpdater {
|
|||||||
def.put("Command.List.Header", "&7: ");
|
def.put("Command.List.Header", "&7: ");
|
||||||
def.put("Command.List.Divider", "&7, ");
|
def.put("Command.List.Divider", "&7, ");
|
||||||
def.put("Command.List.Empty", "&7(none)");
|
def.put("Command.List.Empty", "&7(none)");
|
||||||
def.put("Command.Info", "&7SubServers &8&l\\u00BB&7 Info on $str$&7: &r");
|
def.put("Command.Info", "&7SubServers &8&l\\u00BB&7 Info on $str$: &r");
|
||||||
def.put("Command.Info.Unknown", "&cSubServers &4&l\\u00BB&c There is no object with that name");
|
def.put("Command.Info.Unknown", "&cSubServers &4&l\\u00BB&c There is no object with that name");
|
||||||
def.put("Command.Info.Unknown-Type", "&cSubServers &4&l\\u00BB&c There is no object type with that name");
|
def.put("Command.Info.Unknown-Type", "&cSubServers &4&l\\u00BB&c There is no object type with that name");
|
||||||
def.put("Command.Info.Unknown-Proxy", "&cSubServers &4&l\\u00BB&c There is no proxy with that name");
|
def.put("Command.Info.Unknown-Proxy", "&cSubServers &4&l\\u00BB&c There is no proxy with that name");
|
||||||
|
@ -787,7 +787,7 @@ public final class SubCommand extends BukkitCommand {
|
|||||||
sender.sendMessage(plugin.api.getLang("SubServers", "Command.Generic.Invalid-Subcommand").replace("$str$", args[0]));
|
sender.sendMessage(plugin.api.getLang("SubServers", "Command.Generic.Invalid-Subcommand").replace("$str$", args[0]));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (sender.hasPermission("subservers.interface") && sender instanceof Player && plugin.gui != null) {
|
if (plugin.gui != null && sender instanceof Player && sender.hasPermission("subservers.interface")) {
|
||||||
plugin.gui.getRenderer((Player) sender).newUI();
|
plugin.gui.getRenderer((Player) sender).newUI();
|
||||||
} else {
|
} else {
|
||||||
sender.sendMessage(printHelp(sender, label));
|
sender.sendMessage(printHelp(sender, label));
|
||||||
@ -795,7 +795,7 @@ public final class SubCommand extends BukkitCommand {
|
|||||||
}
|
}
|
||||||
} else if (args.length > 0 && (args[0].equalsIgnoreCase("tp") || args[0].equalsIgnoreCase("teleport"))) {
|
} else if (args.length > 0 && (args[0].equalsIgnoreCase("tp") || args[0].equalsIgnoreCase("teleport"))) {
|
||||||
executeTeleport(sender, label, args);
|
executeTeleport(sender, label, args);
|
||||||
} else if (sender.hasPermission("subservers.interface") && sender instanceof Player) {
|
} else if (plugin.gui != null && sender instanceof Player && sender.hasPermission("subservers.interface")) {
|
||||||
plugin.gui.getRenderer((Player) sender).newUI();
|
plugin.gui.getRenderer((Player) sender).newUI();
|
||||||
} else {
|
} else {
|
||||||
sender.sendMessage(plugin.api.getLang("SubServers", "Command.Generic.Invalid-Permission").replace("$str$", "subservers.command"));
|
sender.sendMessage(plugin.api.getLang("SubServers", "Command.Generic.Invalid-Permission").replace("$str$", "subservers.command"));
|
||||||
|
@ -25,10 +25,9 @@ permissions:
|
|||||||
subservers.command:
|
subservers.command:
|
||||||
description: "Access to the SubServers Command"
|
description: "Access to the SubServers Command"
|
||||||
default: op
|
default: op
|
||||||
children:
|
subservers.teleport:
|
||||||
subservers.teleport:
|
description: "Access to SubServers' Teleport Command"
|
||||||
description: "Access to SubServers' Teleport Command"
|
default: op
|
||||||
default: op
|
|
||||||
subservers.teleport-others:
|
subservers.teleport-others:
|
||||||
description: "Access to Teleport other players using the Teleport Command"
|
description: "Access to Teleport other players using the Teleport Command"
|
||||||
default: op
|
default: op
|
||||||
|
@ -65,7 +65,7 @@ public final class SubCommand implements CommandExecutor {
|
|||||||
return CommandSpec.builder()
|
return CommandSpec.builder()
|
||||||
.description(Text.of("The SubServers Command"))
|
.description(Text.of("The SubServers Command"))
|
||||||
.executor(root)
|
.executor(root)
|
||||||
.arguments(GenericArguments.optional(GenericArguments.string(Text.of("subcommand"))), GenericArguments.optional(GenericArguments.remainingJoinedStrings(Text.of("..."))))
|
.arguments(GenericArguments.optional(GenericArguments.string(Text.of("Command"))), GenericArguments.optional(GenericArguments.remainingJoinedStrings(Text.of("..."))))
|
||||||
.child(CommandSpec.builder()
|
.child(CommandSpec.builder()
|
||||||
.description(Text.of("The SubServers Command - Help"))
|
.description(Text.of("The SubServers Command - Help"))
|
||||||
.executor(new HELP())
|
.executor(new HELP())
|
||||||
@ -150,18 +150,21 @@ public final class SubCommand implements CommandExecutor {
|
|||||||
|
|
||||||
public CommandResult execute(CommandSource sender, CommandContext args) throws CommandException {
|
public CommandResult execute(CommandSource sender, CommandContext args) throws CommandException {
|
||||||
if (canRun(sender)) {
|
if (canRun(sender)) {
|
||||||
Optional<String> subcommand = args.getOne(Text.of("subcommand"));
|
Optional<String> subcommand = args.getOne(Text.of("Command"));
|
||||||
if (subcommand.isPresent()) {
|
if (subcommand.isPresent()) {
|
||||||
sender.sendMessage(ChatColor.convertColor(plugin.api.getLang("SubServers","Command.Generic.Invalid-Subcommand").replace("$str$", subcommand.get())));
|
sender.sendMessage(ChatColor.convertColor(plugin.api.getLang("SubServers", "Command.Generic.Invalid-Subcommand").replace("$str$", subcommand.get())));
|
||||||
return CommandResult.builder().successCount(0).build();
|
return CommandResult.builder().successCount(0).build();
|
||||||
} else {
|
} else {
|
||||||
if (sender.hasPermission("subservers.interface") && sender instanceof Player && plugin.gui != null) {
|
if (plugin.gui != null && sender instanceof Player && sender.hasPermission("subservers.interface")) {
|
||||||
plugin.gui.getRenderer((Player) sender).newUI();
|
plugin.gui.getRenderer((Player) sender).newUI();
|
||||||
} else {
|
} else {
|
||||||
sender.sendMessages(printHelp());
|
sender.sendMessages(printHelp());
|
||||||
}
|
}
|
||||||
return CommandResult.builder().successCount(1).build();
|
return CommandResult.builder().successCount(1).build();
|
||||||
}
|
}
|
||||||
|
} else if (plugin.gui != null && sender instanceof Player && sender.hasPermission("subservers.interface")) {
|
||||||
|
plugin.gui.getRenderer((Player) sender).newUI();
|
||||||
|
return CommandResult.builder().successCount(1).build();
|
||||||
} else {
|
} else {
|
||||||
sender.sendMessage(ChatColor.convertColor(plugin.api.getLang("SubServers","Command.Generic.Invalid-Permission").replace("$str$", "subservers.command")));
|
sender.sendMessage(ChatColor.convertColor(plugin.api.getLang("SubServers","Command.Generic.Invalid-Permission").replace("$str$", "subservers.command")));
|
||||||
return CommandResult.builder().successCount(0).build();
|
return CommandResult.builder().successCount(0).build();
|
||||||
@ -1146,7 +1149,7 @@ public final class SubCommand implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (s.isPresent() && (p.isPresent() || sender instanceof Player)) {
|
if (s.isPresent() && (p.isPresent() || sender instanceof Player)) {
|
||||||
if (sender.hasPermission("subservers.command") || sender.hasPermission("subservers.teleport")) {
|
if (sender.hasPermission("subservers.teleport")) {
|
||||||
String name = (p.isPresent())?p.get():null;
|
String name = (p.isPresent())?p.get():null;
|
||||||
String select = s.get();
|
String select = s.get();
|
||||||
plugin.api.getServer(select, server -> {
|
plugin.api.getServer(select, server -> {
|
||||||
|
Loading…
Reference in New Issue
Block a user