1.1.0_Snapshot-#1
This commit is contained in:
parent
41c2c95b36
commit
9aed0f5895
3
pom.xml
3
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>net.t2code</groupId>
|
||||
<artifactId>Alias</artifactId>
|
||||
<version>1.1.0_DEV</version>
|
||||
<version>1.1.0_Snapshot-#1</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>T2C-Alias</name>
|
||||
@ -70,7 +70,6 @@
|
||||
<groupId>net.t2code</groupId>
|
||||
<artifactId>T2CodeLib</artifactId>
|
||||
<version>12.4</version>
|
||||
<classifier>dev-1</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.t2code</groupId>
|
||||
|
@ -22,7 +22,6 @@ public class Commands {
|
||||
send.console(Util.getPrefix() + "§8-------------------------------");
|
||||
send.console(Util.getPrefix() + " §6Plugin reload...");
|
||||
send.console(Util.getPrefix() + "§8-------------------------------");
|
||||
Load.loadReload();
|
||||
Main.getPlugin().onEnable();
|
||||
if (sender instanceof Player) sender.sendMessage(SelectMessages.reloadEnd);
|
||||
send.console(Util.getPrefix() + "§8-------------------------------");
|
||||
|
@ -1,5 +1,6 @@
|
||||
package net.t2code.alias.Spigot.cmdManagement;
|
||||
|
||||
import net.t2code.alias.Spigot.Main;
|
||||
import net.t2code.alias.Spigot.config.config.SelectConfig;
|
||||
import net.t2code.alias.Spigot.config.languages.SelectMessages;
|
||||
import net.t2code.alias.Spigot.objects.AliasObject;
|
||||
@ -14,28 +15,36 @@ import net.t2code.lib.Spigot.Lib.replace.Replace;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class ExecuteAlias {
|
||||
private static final String prefix = Util.getPrefix();
|
||||
|
||||
protected static void aliasPlayer(CommandSender sender, AliasObject aliasObject, String alias) {
|
||||
protected static void aliasPlayer(CommandSender sender, AliasObject aliasObject, String alias, String[] args) {
|
||||
Player player = (Player) sender;
|
||||
|
||||
if (aliasObject.adminEnable) {
|
||||
if (player.hasPermission(aliasObject.adminPermission)) {
|
||||
if (aliasObject.adminCommandEnable) {
|
||||
aliasAdminCommand(aliasObject, player);
|
||||
aliasAdminCommand(aliasObject, player, args);
|
||||
}
|
||||
if (aliasObject.adminMessageEnable) {
|
||||
aliasAdminMessage(aliasObject, player);
|
||||
aliasAdminMessage(aliasObject, alias, player, args);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (aliasObject.permNecessary) {
|
||||
if (!(player.hasPermission("t2code.alias.use." + alias.toLowerCase()) || player.hasPermission("t2code.alias.admin"))) {
|
||||
send.player(player, SelectMessages.noPermissionForCommand.replace("[cmd]", "/" + alias.toLowerCase())
|
||||
.replace("[perm]", "t2code.alias.use." + alias.toLowerCase()));
|
||||
if (!(player.hasPermission(aliasObject.permission.replace("<alias>", alias.toLowerCase())) || player.hasPermission("t2code.alias.admin"))) {
|
||||
String npmsg;
|
||||
if (aliasObject.permissionMSG == null || aliasObject.permissionMSG.equals("")) {
|
||||
npmsg = SelectMessages.noPermissionForCommand;
|
||||
} else npmsg = aliasObject.permissionMSG;
|
||||
send.player(player, npmsg.replace("[cmd]", "/" + alias.toLowerCase())
|
||||
.replace("[perm]", aliasObject.permission.replace("<alias>", alias.toLowerCase())).replace("[alias]", alias));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -49,14 +58,14 @@ public class ExecuteAlias {
|
||||
}
|
||||
}
|
||||
if (aliasObject.commandEnable) {
|
||||
aliasCommand(aliasObject, player);
|
||||
aliasCommand(aliasObject, player, args);
|
||||
}
|
||||
if (aliasObject.messageEnable) {
|
||||
aliasMessage(aliasObject, player);
|
||||
aliasMessage(aliasObject, alias, player, args);
|
||||
}
|
||||
}
|
||||
|
||||
protected static void subAliasPlayer(CommandSender sender, SubAliasObject aliasObject, String alias) {
|
||||
protected static void subAliasPlayer(CommandSender sender, SubAliasObject aliasObject, String alias, String[] args) {
|
||||
if (!aliasObject.subAliasEnable) {
|
||||
send.sender(sender, SelectMessages.aliasDisabled);
|
||||
return;
|
||||
@ -68,19 +77,23 @@ public class ExecuteAlias {
|
||||
if (aliasObject.adminEnable) {
|
||||
if (player.hasPermission(aliasObject.adminPermission)) {
|
||||
if (aliasObject.adminCommandEnable) {
|
||||
subAliasAdminCommand(aliasObject, player);
|
||||
subAliasAdminCommand(aliasObject, player, args);
|
||||
}
|
||||
if (aliasObject.adminMessageEnable) {
|
||||
subAliasAdminMessage(aliasObject, player);
|
||||
subAliasAdminMessage(aliasObject, alias, player, args);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (aliasObject.permNecessary) {
|
||||
if (!(player.hasPermission("t2code.alias.use.subalias." + alias.toLowerCase()) || player.hasPermission("t2code.alias.admin"))) {
|
||||
send.player(player, SelectMessages.noPermissionForCommand.replace("[cmd]", "/" + alias.toLowerCase())
|
||||
.replace("[perm]", "t2code.alias.subalias.use." + alias.toLowerCase()));
|
||||
if (!(player.hasPermission(aliasObject.permission.replace("<alias>", alias.toLowerCase())) || player.hasPermission("t2code.alias.admin"))) {
|
||||
String npmsg;
|
||||
if (aliasObject.permissionMSG == null || aliasObject.permissionMSG.equals("")) {
|
||||
npmsg = SelectMessages.noPermissionForCommand;
|
||||
} else npmsg = aliasObject.permissionMSG;
|
||||
send.player(player, npmsg.replace("[cmd]", "/" + alias.toLowerCase())
|
||||
.replace("[perm]", aliasObject.permission.replace("<alias>", alias.toLowerCase())).replace("[alias]", alias));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -94,14 +107,14 @@ public class ExecuteAlias {
|
||||
}
|
||||
}
|
||||
if (aliasObject.commandEnable) {
|
||||
subAliasCommand(aliasObject, player);
|
||||
subAliasCommand(aliasObject, player, args);
|
||||
}
|
||||
if (aliasObject.messageEnable) {
|
||||
subAliasMessage(aliasObject, player);
|
||||
subAliasMessage(aliasObject, alias, player, args);
|
||||
}
|
||||
} else {
|
||||
if (aliasObject.consoleEnable) {
|
||||
subAliasConsole(aliasObject, sender);
|
||||
subAliasConsole(aliasObject, sender, args);
|
||||
} else send.sender(sender, SelectMessages.onlyForPlayer);
|
||||
}
|
||||
}
|
||||
@ -128,18 +141,25 @@ public class ExecuteAlias {
|
||||
}
|
||||
}
|
||||
|
||||
private static void subAliasConsole(SubAliasObject alias, CommandSender sender) {
|
||||
private static void subAliasConsole(SubAliasObject alias, CommandSender sender, String[] args) {
|
||||
String targetSt = "[target]";
|
||||
try {
|
||||
List<String> results = Arrays.stream(args).filter(a -> a.contains("-p:")).collect(Collectors.toList());
|
||||
targetSt = results.get(0).replace("-p:", "");
|
||||
} catch (Exception ignored) {
|
||||
|
||||
}
|
||||
if (alias.consoleCommandEnable) {
|
||||
for (String cmd : alias.consoleCommands) {
|
||||
if (alias.consoleBungeeCommand) {
|
||||
if (SelectConfig.Bungee) {
|
||||
BCommandSenderReciver.sendToBungee(sender, cmd, true);
|
||||
BCommandSenderReciver.sendToBungee(sender, cmd.replace("[target]", targetSt), true);
|
||||
} else {
|
||||
send.console(Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
|
||||
send.sender(sender, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
|
||||
}
|
||||
} else {
|
||||
Cmd.console(cmd);
|
||||
Cmd.console(cmd.replace("[target]", targetSt));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -150,11 +170,18 @@ public class ExecuteAlias {
|
||||
}
|
||||
}
|
||||
|
||||
private static void aliasAdminCommand(AliasObject alias, Player player) {
|
||||
private static void aliasAdminCommand(AliasObject alias, Player player, String[] args) {
|
||||
String targetSt = "[target]";
|
||||
try {
|
||||
List<String> results = Arrays.stream(args).filter(a -> a.contains("-p:")).collect(Collectors.toList());
|
||||
targetSt = results.get(0).replace("-p:", "");
|
||||
} catch (Exception ignored) {
|
||||
|
||||
}
|
||||
for (String cmd : alias.adminCommands) {
|
||||
if (alias.adminBungeeCommand) {
|
||||
if (SelectConfig.Bungee) {
|
||||
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()), alias.adminCommandAsConsole);
|
||||
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt), alias.adminCommandAsConsole);
|
||||
|
||||
} else {
|
||||
send.console(Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
|
||||
@ -162,19 +189,26 @@ public class ExecuteAlias {
|
||||
}
|
||||
} else {
|
||||
if (alias.adminCommandAsConsole) {
|
||||
Cmd.console(cmd.replace("[player]", player.getName()));
|
||||
Cmd.console(cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
|
||||
} else {
|
||||
Cmd.player(player, cmd.replace("[player]", player.getName()));
|
||||
Cmd.player(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void subAliasAdminCommand(SubAliasObject alias, Player player) {
|
||||
private static void subAliasAdminCommand(SubAliasObject alias, Player player, String[] args) {
|
||||
String targetSt = "[target]";
|
||||
try {
|
||||
List<String> results = Arrays.stream(args).filter(a -> a.contains("-p:")).collect(Collectors.toList());
|
||||
targetSt = results.get(0).replace("-p:", "");
|
||||
} catch (Exception ignored) {
|
||||
|
||||
}
|
||||
for (String cmd : alias.adminCommands) {
|
||||
if (alias.adminBungeeCommand) {
|
||||
if (SelectConfig.Bungee) {
|
||||
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()), alias.adminCommandAsConsole);
|
||||
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt), alias.adminCommandAsConsole);
|
||||
|
||||
} else {
|
||||
send.console(Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
|
||||
@ -182,45 +216,64 @@ public class ExecuteAlias {
|
||||
}
|
||||
} else {
|
||||
if (alias.adminCommandAsConsole) {
|
||||
Cmd.console(cmd.replace("[player]", player.getName()));
|
||||
Cmd.console(cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
|
||||
} else {
|
||||
Cmd.player(player, cmd.replace("[player]", player.getName()));
|
||||
Cmd.player(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void aliasAdminMessage(AliasObject alias, Player player) {
|
||||
for (String msg : alias.adminMessages) {
|
||||
private static void aliasAdminMessage(AliasObject aliasObject, String alias, Player player, String[] args) {
|
||||
String targetSt = "[target]";
|
||||
try {
|
||||
List<String> results = Arrays.stream(args).filter(a -> a.contains("-p:")).collect(Collectors.toList());
|
||||
targetSt = results.get(0).replace("-p:", "");
|
||||
} catch (Exception ignored) {
|
||||
|
||||
}
|
||||
for (String msg : aliasObject.adminMessages) {
|
||||
String text;
|
||||
String hover;
|
||||
if (PluginCheck.papi()) {
|
||||
text = Replace.replace(prefix, player, replacePlayer(msg, player));
|
||||
text = Replace.replace(prefix, player, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
|
||||
} else {
|
||||
text = Replace.replace(prefix, replacePlayer(msg, player));
|
||||
text = Replace.replace(prefix, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
|
||||
}
|
||||
send.player(player, text);
|
||||
}
|
||||
}
|
||||
|
||||
private static void subAliasAdminMessage(SubAliasObject alias, Player player) {
|
||||
for (String msg : alias.adminMessages) {
|
||||
private static void subAliasAdminMessage(SubAliasObject subAliasObject, String alias, Player player, String[] args) {
|
||||
String targetSt = "[target]";
|
||||
try {
|
||||
List<String> results = Arrays.stream(args).filter(a -> a.contains("-p:")).collect(Collectors.toList());
|
||||
targetSt = results.get(0).replace("-p:", "");
|
||||
} catch (Exception ignored) {
|
||||
|
||||
}
|
||||
for (String msg : subAliasObject.adminMessages) {
|
||||
String text;
|
||||
String hover;
|
||||
if (PluginCheck.papi()) {
|
||||
text = Replace.replace(prefix, player, replacePlayer(msg, player));
|
||||
text = Replace.replace(prefix, player, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
|
||||
} else {
|
||||
text = Replace.replace(prefix, replacePlayer(msg, player));
|
||||
text = Replace.replace(prefix, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
|
||||
}
|
||||
send.player(player, text);
|
||||
}
|
||||
}
|
||||
|
||||
private static void aliasCommand(AliasObject alias, Player player) {
|
||||
private static void aliasCommand(AliasObject alias, Player player, String[] args) {
|
||||
String targetSt = "[target]";
|
||||
try {
|
||||
List<String> results = Arrays.stream(args).filter(a -> a.contains("-p:")).collect(Collectors.toList());
|
||||
targetSt = results.get(0).replace("-p:", "");
|
||||
} catch (Exception ignored) {
|
||||
|
||||
}
|
||||
for (String cmd : alias.command) {
|
||||
if (alias.bungeeCommand) {
|
||||
if (SelectConfig.Bungee) {
|
||||
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()), alias.commandAsConsole);
|
||||
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt), alias.commandAsConsole);
|
||||
|
||||
} else {
|
||||
send.console(Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
|
||||
@ -228,19 +281,26 @@ public class ExecuteAlias {
|
||||
}
|
||||
} else {
|
||||
if (alias.commandAsConsole) {
|
||||
Cmd.console(cmd.replace("[player]", player.getName()));
|
||||
Cmd.console(cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
|
||||
} else {
|
||||
Cmd.player(player, cmd.replace("[player]", player.getName()));
|
||||
Cmd.player(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void subAliasCommand(SubAliasObject alias, Player player) {
|
||||
private static void subAliasCommand(SubAliasObject alias, Player player, String[] args) {
|
||||
String targetSt = "[target]";
|
||||
try {
|
||||
List<String> results = Arrays.stream(args).filter(a -> a.contains("-p:")).collect(Collectors.toList());
|
||||
targetSt = results.get(0).replace("-p:", "");
|
||||
} catch (Exception ignored) {
|
||||
|
||||
}
|
||||
for (String cmd : alias.command) {
|
||||
if (alias.bungeeCommand) {
|
||||
if (SelectConfig.Bungee) {
|
||||
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()), alias.commandAsConsole);
|
||||
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt), alias.commandAsConsole);
|
||||
|
||||
} else {
|
||||
send.console(Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
|
||||
@ -248,34 +308,49 @@ public class ExecuteAlias {
|
||||
}
|
||||
} else {
|
||||
if (alias.commandAsConsole) {
|
||||
Cmd.console(cmd.replace("[player]", player.getName()));
|
||||
Cmd.console(cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
|
||||
} else {
|
||||
Cmd.player(player, cmd.replace("[player]", player.getName()));
|
||||
Cmd.player(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void aliasMessage(AliasObject alias, Player player) {
|
||||
for (String msg : alias.messages) {
|
||||
private static void aliasMessage(AliasObject aliasObject, String alias, Player player, String[] args) {
|
||||
|
||||
String targetSt = "[target]";
|
||||
try {
|
||||
List<String> results = Arrays.stream(args).filter(a -> a.contains("-p:")).collect(Collectors.toList());
|
||||
targetSt = results.get(0).replace("-p:", "");
|
||||
} catch (Exception ignored) {
|
||||
|
||||
}
|
||||
|
||||
for (String msg : aliasObject.messages) {
|
||||
String text;
|
||||
if (PluginCheck.papi()) {
|
||||
text = Replace.replace(prefix, player, replacePlayer(msg, player));
|
||||
text = Replace.replace(prefix, player, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
|
||||
} else {
|
||||
text = Replace.replace(prefix, replacePlayer(msg, player));
|
||||
text = Replace.replace(prefix, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
|
||||
}
|
||||
send.player(player, text);
|
||||
}
|
||||
}
|
||||
|
||||
private static void subAliasMessage(SubAliasObject alias, Player player) {
|
||||
for (String msg : alias.messages) {
|
||||
private static void subAliasMessage(SubAliasObject subAliasObject, String alias, Player player, String[] args) {
|
||||
String targetSt = "[target]";
|
||||
try {
|
||||
List<String> results = Arrays.stream(args).filter(a -> a.contains("-p:")).collect(Collectors.toList());
|
||||
targetSt = results.get(0).replace("-p:", "");
|
||||
} catch (Exception ignored) {
|
||||
|
||||
}
|
||||
for (String msg : subAliasObject.messages) {
|
||||
String text;
|
||||
String hover;
|
||||
if (PluginCheck.papi()) {
|
||||
text = Replace.replace(prefix, player, replacePlayer(msg, player));
|
||||
text = Replace.replace(prefix, player, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
|
||||
} else {
|
||||
text = Replace.replace(prefix, replacePlayer(msg, player));
|
||||
text = Replace.replace(prefix, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
|
||||
}
|
||||
send.player(player, text);
|
||||
}
|
||||
|
@ -7,10 +7,17 @@ import net.t2code.alias.Spigot.objects.SubAliasObject;
|
||||
import net.t2code.alias.Util;
|
||||
import net.t2code.lib.Spigot.Lib.messages.send;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.TabCompleter;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class RegisterCommands extends Command {
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class RegisterCommands extends Command implements TabCompleter {
|
||||
private String alias;
|
||||
private String prefix = Util.getPrefix();
|
||||
|
||||
@ -31,28 +38,38 @@ public class RegisterCommands extends Command {
|
||||
send.sender(sender, SelectMessages.aliasDisabled);
|
||||
return true;
|
||||
}
|
||||
if (args.length == 0) {
|
||||
if (args.length == 0 || args.length == 1 && args[0].contains("-p:")) {
|
||||
if (sender instanceof Player) {
|
||||
ExecuteAlias.aliasPlayer(sender, alias, this.alias);
|
||||
ExecuteAlias.aliasPlayer(sender, alias, this.alias, args);
|
||||
} else {
|
||||
if (alias.consoleEnable) {
|
||||
ExecuteAlias.aliasConsole(alias, sender, prefix);
|
||||
} else send.sender(sender, SelectMessages.onlyForPlayer);
|
||||
}
|
||||
} else {
|
||||
if (!Main.allForSubAliases.contains(this.alias)) return false;
|
||||
if (!Main.allForSubAliases.contains(this.alias)) {
|
||||
return false;
|
||||
}
|
||||
for (String sals : Main.allSubAliases) {
|
||||
SubAliasObject sal = Main.subAliasHashMap.get(sals);
|
||||
if (args.length == sal.subAliasArg + 1) {
|
||||
for (String al : sal.subAliasList) {
|
||||
if (args[sal.subAliasArg].toLowerCase().equals(al)) {
|
||||
ExecuteAlias.subAliasPlayer(sender, sal, al);
|
||||
ExecuteAlias.subAliasPlayer(sender, sal, al, args);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
send.sender(sender, "<color:#ffbd17><hover:show_text:'<dark_red>TODO <blue>DEV</blue></dark_red>'>Diesen Befehl gibt es nicht</hover></color>");
|
||||
//todo
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender commandSender, Command command, String s, String[] strings) {
|
||||
return Collections.singletonList("hallodepp");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ public class AliasConfigConverter {
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
send.error(Main.getPlugin(), "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||
send.error(Main.getPlugin(), "");
|
||||
send.warning(Main.getPlugin(), "The " + config_gui.getName() + " file is converted to the new config format.");
|
||||
@ -33,4 +33,26 @@ public class AliasConfigConverter {
|
||||
send.error(Main.getPlugin(), "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||
|
||||
}
|
||||
|
||||
public static void convertAddPermission(YamlConfiguration yamlConfiguration, File config_gui, Boolean subalias) {
|
||||
if (subalias) {
|
||||
yamlConfiguration.set("Alias.Permission.Permission", "t2code.alias.use.<alias>");
|
||||
} else yamlConfiguration.set("SubAlias.Permission.Permission", "t2code.alias.use.subalias.<alias>");
|
||||
try {
|
||||
yamlConfiguration.save(config_gui);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void convertAddPermissionMSG(YamlConfiguration yamlConfiguration, File config_gui, Boolean subalias) {
|
||||
if (subalias) {
|
||||
yamlConfiguration.set("Alias.Permission.CustomNoPermissionMSG", "");
|
||||
} else yamlConfiguration.set("SubAlias.Permission.CustomNoPermissionMSG", "");
|
||||
try {
|
||||
yamlConfiguration.save(config_gui);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,8 @@ public class CreateExampleAliasConfig {
|
||||
Config.set("Alias.AliasList", Arrays.asList("aliasexample1"),yamlConfiguration);
|
||||
|
||||
Config.set("Alias.Permission.Necessary", true, yamlConfiguration);
|
||||
Config.set("Alias.Permission.Permission", "t2code.alias.use.<alias>", yamlConfiguration);
|
||||
Config.set("Alias.Permission.CustomNoPermissionMSG", "", yamlConfiguration);
|
||||
|
||||
Config.set("Alias.Cost.Enable", false,yamlConfiguration);
|
||||
Config.set("Alias.Cost.Price", 0.0,yamlConfiguration);
|
||||
@ -36,11 +38,6 @@ public class CreateExampleAliasConfig {
|
||||
|
||||
Config.set("Alias.Message.Enable", false, yamlConfiguration);
|
||||
Config.set("Alias.Message.Messages", Collections.emptyList(), yamlConfiguration);
|
||||
Config.set("Alias.Message.TextBuilder.Enable", false, yamlConfiguration);
|
||||
Config.set("Alias.Message.TextBuilder.Hover", "", yamlConfiguration);
|
||||
Config.set("Alias.Message.TextBuilder.ClickEvent.Enable", false, yamlConfiguration);
|
||||
Config.set("Alias.Message.TextBuilder.ClickEvent.Action", "", yamlConfiguration);
|
||||
Config.set("Alias.Message.TextBuilder.ClickEvent.ActionValue", "", yamlConfiguration);
|
||||
|
||||
Config.set("Alias.Admin.Enable", true, yamlConfiguration);
|
||||
Config.set("Alias.Admin.Permission", "t2code.alias.admin", yamlConfiguration);
|
||||
@ -52,11 +49,6 @@ public class CreateExampleAliasConfig {
|
||||
|
||||
Config.set("Alias.Admin.Message.Enable", false, yamlConfiguration);
|
||||
Config.set("Alias.Admin.Message.Messages", Collections.emptyList(), yamlConfiguration);
|
||||
Config.set("Alias.Admin.Message.TextBuilder.Enable", false, yamlConfiguration);
|
||||
Config.set("Alias.Admin.Message.TextBuilder.Hover", "", yamlConfiguration);
|
||||
Config.set("Alias.Admin.Message.TextBuilder.ClickEvent.Enable", false, yamlConfiguration);
|
||||
Config.set("Alias.Admin.Message.TextBuilder.ClickEvent.Action", "", yamlConfiguration);
|
||||
Config.set("Alias.Admin.Message.TextBuilder.ClickEvent.ActionValue", "", yamlConfiguration);
|
||||
|
||||
Config.set("Alias.Console.Enable", false, yamlConfiguration);
|
||||
Config.set("Alias.Console.Command.Enable", false, yamlConfiguration);
|
||||
|
@ -1,17 +1,21 @@
|
||||
package net.t2code.alias.Spigot.config.alias;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import net.t2code.alias.Spigot.Main;
|
||||
import net.t2code.alias.Spigot.config.config.SelectConfig;
|
||||
import net.t2code.alias.Spigot.system.AliasRegister;
|
||||
import net.t2code.alias.Spigot.objects.AliasObject;
|
||||
import net.t2code.alias.Util;
|
||||
import net.t2code.lib.Spigot.Lib.messages.send;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.InvalidConfigurationException;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class SelectAlias {
|
||||
private static String Prefix = Util.getPrefix();
|
||||
@ -26,21 +30,37 @@ public class SelectAlias {
|
||||
if (config_gui.getName().equals("X_aliasDeclaration_X.yml")) continue;
|
||||
|
||||
String sub = config_gui.getName().substring(config_gui.getName().length() - 4);
|
||||
YamlConfiguration yamlConfiguration;
|
||||
if (sub.equals(".yml")) {
|
||||
YamlConfiguration yamlConfiguration;
|
||||
try {
|
||||
yamlConfiguration = YamlConfiguration.loadConfiguration(config_gui);
|
||||
|
||||
} catch (Exception ex) {
|
||||
Preconditions.checkArgument(config_gui != null, "File cannot be null");
|
||||
YamlConfiguration config = new YamlConfiguration();
|
||||
config.load(config_gui);
|
||||
yamlConfiguration = config;
|
||||
} catch (FileNotFoundException var3) {
|
||||
continue;
|
||||
} catch (IOException var4) {
|
||||
Bukkit.getLogger().log(Level.SEVERE, "Cannot load " + config_gui, var4);
|
||||
continue;
|
||||
} catch (InvalidConfigurationException var5) {
|
||||
Bukkit.getLogger().log(Level.SEVERE, "Cannot load " + config_gui, var5);
|
||||
continue;
|
||||
}
|
||||
Boolean aliasEnable = yamlConfiguration.getBoolean("Alias.Enable");
|
||||
List<String> aliasList;
|
||||
if (SelectConfig.isConfigVersion < 3 && yamlConfiguration.get("Alias.AliasList") == null) {
|
||||
if (yamlConfiguration.get("Alias.AliasList") == null) {
|
||||
AliasConfigConverter.convertAliasList(yamlConfiguration, config_gui);
|
||||
}
|
||||
aliasList = yamlConfiguration.getStringList("Alias.AliasList");
|
||||
Boolean permNecessary = yamlConfiguration.getBoolean("Alias.Permission.Necessary");
|
||||
if (yamlConfiguration.get("Alias.Permission.Permission") == null) {
|
||||
AliasConfigConverter.convertAddPermission(yamlConfiguration, config_gui, false);
|
||||
}
|
||||
String permission = yamlConfiguration.getString("Alias.Permission.Permission");
|
||||
if (yamlConfiguration.get("Alias.Permission.CustomNoPermissionMSG") == null) {
|
||||
AliasConfigConverter.convertAddPermissionMSG(yamlConfiguration, config_gui, false);
|
||||
}
|
||||
String permissionMSG = yamlConfiguration.getString("Alias.Permission.CustomNoPermissionMSG");
|
||||
|
||||
Boolean costEnable = yamlConfiguration.getBoolean("Alias.Cost.Enable");
|
||||
Double costPrice = yamlConfiguration.getDouble("Alias.Cost.Price");
|
||||
@ -73,7 +93,7 @@ public class SelectAlias {
|
||||
List<String> consoleMessages = yamlConfiguration.getStringList("Alias.Console.Message.Messages");
|
||||
|
||||
Main.allAliases.addAll(aliasList);
|
||||
AliasObject alias = new AliasObject(aliasEnable, aliasList, permNecessary, costEnable, costPrice, costAllowBypass, commandEnable, commandAsConsole, bungeeCommand,
|
||||
AliasObject alias = new AliasObject(aliasEnable, aliasList, permNecessary, permission, permissionMSG, costEnable, costPrice, costAllowBypass, commandEnable, commandAsConsole, bungeeCommand,
|
||||
command, messageEnable, messages, adminEnable, adminPermission, adminCommandEnable, adminCommandAsConsole, adminBungeeCommand, adminCommands,
|
||||
adminMessageEnable, adminMessages, consoleEnable, consoleCommandEnable, consoleBungeeCommand, consoleCommands, consoleMessageEnable, consoleMessages);
|
||||
for (String al : aliasList) {
|
||||
|
@ -15,30 +15,30 @@ public class MSG {
|
||||
|
||||
// EN
|
||||
|
||||
public static String EN_OnlyForPlayer = "[prefix] &cThis command is for players only!";
|
||||
public static String EN_OnlyForPlayer = "[prefix] <red>This command is for players only!</red>";
|
||||
|
||||
public static String EN_Disabled = "Unknown command. Type ''/help'' for help.";
|
||||
|
||||
public static String EN_ReloadStart = "[prefix] &6Plugin is reloaded...";
|
||||
public static String EN_ReloadEnd = "[prefix] &2Plugin was successfully reloaded.";
|
||||
public static String EN_ReloadStart = "[prefix] <gold>Plugin is reloaded...</gold>";
|
||||
public static String EN_ReloadEnd = "[prefix] <dark_green>Plugin was successfully reloaded.</dark_green>";
|
||||
|
||||
public static String EN_NoPermissionForCommand = "[prefix] &cFor &b[cmd] &cyou lack the permission &6[perm]&c!";
|
||||
public static String EN_NoPermissionForCommand = "[prefix] <red>For <aqua>[cmd]</aqua> you lack the permission <gold>[perm]</gold>!</red>";
|
||||
|
||||
public static String EN_Buy = "[prefix] &2You have paid &6[price] &2for this command.&2.";
|
||||
public static String EN_NoMoney = "[prefix] &cYou don't have enough money for this command!";
|
||||
public static String EN_Buy = "[prefix] <dark_green>You have paid <gold>[price]</gold> for this command.</dark_green>";
|
||||
public static String EN_NoMoney = "[prefix] <red>You don't have enough money for this command!</red>";
|
||||
|
||||
|
||||
// DE
|
||||
public static String DE_OnlyForPlayer = "[prefix] &cDieser Command ist nur f[ue]r Spieler!";
|
||||
public static String DE_OnlyForPlayer = "[prefix] <red>Dieser Command ist nur f[ue]r Spieler!</red>";
|
||||
|
||||
public static String DE_Disabled = "Unknown command. Type ''/help'' for help.";
|
||||
|
||||
public static String DE_ReloadStart = "[prefix] &6Plugin wird neu geladen...";
|
||||
public static String DE_ReloadEnd = "[prefix] &2Plugin wurde erfolgreich neu geladen.";
|
||||
public static String DE_ReloadStart = "[prefix] <gold>Plugin wird neu geladen...</gold>";
|
||||
public static String DE_ReloadEnd = "[prefix] <dark_green>Plugin wurde erfolgreich neu geladen.</dark_green>";
|
||||
|
||||
public static String DE_NoPermissionForCommand = "[prefix] &cF[ue]r &b[cmd] &cfehlt dir die Permission &6[perm]&c!";
|
||||
public static String DE_NoPermissionForCommand = "[prefix] <red>F[ue]r <aqua>[cmd]</aqua> fehlt dir die Permission <gold>[perm]</gold>!</red>";
|
||||
|
||||
public static String DE_Buy = "[prefix] &2Du hast f[ue]r diesen Command &6[price] &2bezahlt.";
|
||||
public static String DE_NoMoney = "[prefix] &cDu hast nicht gen[ue]gend Geld für diesen Command!";
|
||||
public static String DE_Buy = "[prefix] <dark_green>Du hast f[ue]r diesen Command <gold>[price]</gold> bezahlt.</dark_green>";
|
||||
public static String DE_NoMoney = "[prefix] <red>Du hast nicht gen[ue]gend Geld für diesen Command!</red>";
|
||||
|
||||
}
|
||||
|
@ -44,6 +44,9 @@ public class SelectMessages {
|
||||
} else selectMSG = SelectConfig.language;
|
||||
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(msg);
|
||||
|
||||
if (yamlConfiguration.get("Plugin.Prefix") != null) {
|
||||
Util.setPrefix(replace(yamlConfiguration.getString("Plugin.Prefix")));
|
||||
}
|
||||
onlyForPlayer = replace(yamlConfiguration.getString("Plugin.OnlyForPlayer"));
|
||||
aliasDisabled = replace(yamlConfiguration.getString("Plugin.AliasDisabled"));
|
||||
reloadStart = replace(yamlConfiguration.getString("Plugin.Reload.Start"));
|
||||
|
@ -25,6 +25,8 @@ public class CreateExampleSubAliasConfig {
|
||||
Config.set("SubAlias.SubAliasFor", "aliasexample1",yamlConfiguration);
|
||||
|
||||
Config.set("SubAlias.Permission.Necessary", true, yamlConfiguration);
|
||||
Config.set("SubAlias.Permission.Permission", "t2code.alias.use.subalias.<alias>", yamlConfiguration);
|
||||
Config.set("SubAlias.Permission.CustomNoPermissionMSG", "", yamlConfiguration);
|
||||
|
||||
Config.set("SubAlias.Cost.Enable", false,yamlConfiguration);
|
||||
Config.set("SubAlias.Cost.Price", 0.0,yamlConfiguration);
|
||||
@ -37,11 +39,6 @@ public class CreateExampleSubAliasConfig {
|
||||
|
||||
Config.set("SubAlias.Message.Enable", false, yamlConfiguration);
|
||||
Config.set("SubAlias.Message.Messages", Collections.emptyList(), yamlConfiguration);
|
||||
Config.set("SubAlias.Message.TextBuilder.Enable", false, yamlConfiguration);
|
||||
Config.set("SubAlias.Message.TextBuilder.Hover", "", yamlConfiguration);
|
||||
Config.set("SubAlias.Message.TextBuilder.ClickEvent.Enable", false, yamlConfiguration);
|
||||
Config.set("SubAlias.Message.TextBuilder.ClickEvent.Action", "", yamlConfiguration);
|
||||
Config.set("SubAlias.Message.TextBuilder.ClickEvent.ActionValue", "", yamlConfiguration);
|
||||
|
||||
Config.set("SubAlias.Admin.Enable", true, yamlConfiguration);
|
||||
Config.set("SubAlias.Admin.Permission", "t2code.alias.admin", yamlConfiguration);
|
||||
@ -53,11 +50,6 @@ public class CreateExampleSubAliasConfig {
|
||||
|
||||
Config.set("SubAlias.Admin.Message.Enable", false, yamlConfiguration);
|
||||
Config.set("SubAlias.Admin.Message.Messages", Collections.emptyList(), yamlConfiguration);
|
||||
Config.set("SubAlias.Admin.Message.TextBuilder.Enable", false, yamlConfiguration);
|
||||
Config.set("SubAlias.Admin.Message.TextBuilder.Hover", "", yamlConfiguration);
|
||||
Config.set("SubAlias.Admin.Message.TextBuilder.ClickEvent.Enable", false, yamlConfiguration);
|
||||
Config.set("SubAlias.Admin.Message.TextBuilder.ClickEvent.Action", "", yamlConfiguration);
|
||||
Config.set("SubAlias.Admin.Message.TextBuilder.ClickEvent.ActionValue", "", yamlConfiguration);
|
||||
|
||||
Config.set("SubAlias.Console.Enable", false, yamlConfiguration);
|
||||
Config.set("SubAlias.Console.Command.Enable", false, yamlConfiguration);
|
||||
|
@ -1,13 +1,20 @@
|
||||
package net.t2code.alias.Spigot.config.subAlias;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import net.t2code.alias.Spigot.Main;
|
||||
import net.t2code.alias.Spigot.config.alias.AliasConfigConverter;
|
||||
import net.t2code.alias.Spigot.objects.SubAliasObject;
|
||||
import net.t2code.alias.Util;
|
||||
import net.t2code.lib.Spigot.Lib.messages.send;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.InvalidConfigurationException;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class SelectSubAlias {
|
||||
private static String Prefix = Util.getPrefix();
|
||||
@ -22,9 +29,21 @@ public class SelectSubAlias {
|
||||
if (config_gui.getName().equals("X_subAliasDeclaration_X.yml")) continue;
|
||||
String sub = config_gui.getName().substring(config_gui.getName().length() - 4);
|
||||
if (sub.equals(".yml")) {
|
||||
|
||||
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config_gui);
|
||||
|
||||
YamlConfiguration yamlConfiguration;
|
||||
try {
|
||||
Preconditions.checkArgument(config_gui != null, "File cannot be null");
|
||||
YamlConfiguration config = new YamlConfiguration();
|
||||
config.load(config_gui);
|
||||
yamlConfiguration = config;
|
||||
} catch (FileNotFoundException var3) {
|
||||
continue;
|
||||
} catch (IOException var4) {
|
||||
Bukkit.getLogger().log(Level.SEVERE, "Cannot load " + config_gui, var4);
|
||||
continue;
|
||||
} catch (InvalidConfigurationException var5) {
|
||||
Bukkit.getLogger().log(Level.SEVERE, "Cannot load " + config_gui, var5);
|
||||
continue;
|
||||
}
|
||||
Boolean aliasEnable = yamlConfiguration.getBoolean("SubAlias.Enable");
|
||||
List<String> subAliasList = yamlConfiguration.getStringList("SubAlias.SubAliasList");
|
||||
String subAliasFor = yamlConfiguration.getString("SubAlias.SubAliasFor");
|
||||
@ -38,6 +57,14 @@ public class SelectSubAlias {
|
||||
subAliasArg = args.length - 1;
|
||||
}
|
||||
Boolean permNecessary = yamlConfiguration.getBoolean("SubAlias.Permission.Necessary");
|
||||
if (yamlConfiguration.get("SubAlias.Permission.Permission") == null) {
|
||||
AliasConfigConverter.convertAddPermission(yamlConfiguration, config_gui, true);
|
||||
}
|
||||
String permission = yamlConfiguration.getString("SubAlias.Permission.Permission");
|
||||
if (yamlConfiguration.get("SubAlias.Permission.CustomNoPermissionMSG") == null) {
|
||||
AliasConfigConverter.convertAddPermissionMSG(yamlConfiguration, config_gui, true);
|
||||
}
|
||||
String permissionMSG = yamlConfiguration.getString("SubAlias.Permission.CustomNoPermissionMSG");
|
||||
|
||||
Boolean costEnable = yamlConfiguration.getBoolean("SubAlias.Cost.Enable");
|
||||
Double costPrice = yamlConfiguration.getDouble("SubAlias.Cost.Price");
|
||||
@ -69,7 +96,7 @@ public class SelectSubAlias {
|
||||
Boolean consoleMessageEnable = yamlConfiguration.getBoolean("SubAlias.Console.Message.Enable");
|
||||
List<String> consoleMessages = yamlConfiguration.getStringList("SubAlias.Console.Message.Messages");
|
||||
|
||||
SubAliasObject subAlias = new SubAliasObject(aliasEnable, subAliasList, subAliasFor, subAliasArg, permNecessary, costEnable, costPrice, costAllowBypass, commandEnable, commandAsConsole, bungeeCommand,
|
||||
SubAliasObject subAlias = new SubAliasObject(aliasEnable, subAliasList, subAliasFor, subAliasArg, permNecessary, permission, permissionMSG, costEnable, costPrice, costAllowBypass, commandEnable, commandAsConsole, bungeeCommand,
|
||||
command, messageEnable, messages, adminEnable, adminPermission, adminCommandEnable, adminCommandAsConsole, adminBungeeCommand, adminCommands,
|
||||
adminMessageEnable, adminMessages, consoleEnable, consoleCommandEnable, consoleBungeeCommand, consoleCommands, consoleMessageEnable, consoleMessages);
|
||||
for (String sal : subAliasList) {
|
||||
|
@ -7,6 +7,8 @@ public class AliasObject {
|
||||
public List<String> aliasList;
|
||||
|
||||
public Boolean permNecessary;
|
||||
public String permission;
|
||||
public String permissionMSG;
|
||||
|
||||
public Boolean costEnable;
|
||||
public Double costPrice;
|
||||
@ -38,6 +40,8 @@ public class AliasObject {
|
||||
public AliasObject(Boolean aliasEnable,
|
||||
List<String> aliasList,
|
||||
Boolean permNecessary,
|
||||
String permission,
|
||||
String permissionMSG,
|
||||
|
||||
Boolean costEnable,
|
||||
Double costPrice,
|
||||
@ -66,8 +70,10 @@ public class AliasObject {
|
||||
Boolean consoleMessageEnable,
|
||||
List<String> consoleMessages) {
|
||||
this.aliasEnable = aliasEnable;
|
||||
this.aliasList=aliasList;
|
||||
this.aliasList = aliasList;
|
||||
this.permNecessary = permNecessary;
|
||||
this.permission = permission;
|
||||
this.permissionMSG = permissionMSG;
|
||||
|
||||
this.costEnable = costEnable;
|
||||
this.costPrice = costPrice;
|
||||
|
@ -9,6 +9,8 @@ public class SubAliasObject {
|
||||
public String subAliasFor;
|
||||
|
||||
public Boolean permNecessary;
|
||||
public String permission;
|
||||
public String permissionMSG;
|
||||
|
||||
public Boolean costEnable;
|
||||
public Double costPrice;
|
||||
@ -42,6 +44,8 @@ public class SubAliasObject {
|
||||
String subAliasFor,
|
||||
Integer subAliasArg,
|
||||
Boolean permNecessary,
|
||||
String permission,
|
||||
String permissionMSG,
|
||||
|
||||
Boolean costEnable,
|
||||
Double costPrice,
|
||||
@ -74,6 +78,8 @@ public class SubAliasObject {
|
||||
this.subAliasFor = subAliasFor;
|
||||
this.subAliasArg = subAliasArg;
|
||||
this.permNecessary = permNecessary;
|
||||
this.permission = permission;
|
||||
this.permissionMSG = permissionMSG;
|
||||
|
||||
this.costEnable = costEnable;
|
||||
this.costPrice = costPrice;
|
||||
|
@ -31,4 +31,8 @@ public class Util {
|
||||
public static String getDiscord() {
|
||||
return Discord;
|
||||
}
|
||||
|
||||
public static void setPrefix(String prefix) {
|
||||
Prefix = prefix;
|
||||
}
|
||||
}
|
||||
|
@ -1,24 +1,26 @@
|
||||
####################################################################
|
||||
## To create another alias, simply copy the file ##
|
||||
## and name it what you want the aliascommand to be. ##
|
||||
## The alias command is always the filename without .yml!!! ##
|
||||
## The alias command is no longer the filename! ##
|
||||
## Multiple alias commands can now be specified in one file, ##
|
||||
## so there is no need to create multiple files! ##
|
||||
## This option is under 'Alias.AliasList' ##
|
||||
####################################################################
|
||||
|
||||
Alias:
|
||||
# Here you can disable the alias
|
||||
Enable: true
|
||||
|
||||
|
||||
# >>>>>> New 1.1 <<<<<< <<<<<<<<<<<<<<<<<<<<<
|
||||
# Specify here what the Alias commands should be for this function
|
||||
AliasList:
|
||||
- alias1
|
||||
- alias2
|
||||
|
||||
|
||||
- aliasexample1
|
||||
- aliasexample2
|
||||
Permission:
|
||||
# Here you can say if a permission is needed to use the alias#
|
||||
# Permission: t2code.alias.use.<aliasname>
|
||||
Necessary: true
|
||||
# Here you can set the permission for the alias.
|
||||
# The placeholder <alias> is the alias name.
|
||||
# If you have set multiple alias referrers in the list 'Alias.AliasList' you have a permission for each alias.
|
||||
Permission: 't2code.alias.use.<alias>'
|
||||
# Here you can set a custom No Permission message for this alias. If you want to use the default message, just leave this blank.
|
||||
CustomNoPermissionMSG: ""
|
||||
Cost:
|
||||
# Here you can say if you have to pay for the alias
|
||||
Enable: false
|
||||
@ -37,14 +39,33 @@ Alias:
|
||||
BungeeCommand: false
|
||||
# Here you can specify one or more commands to be executed.
|
||||
# Placeholder: [player] = The player who executes the alias
|
||||
Commands: []
|
||||
Commands: [ ]
|
||||
Message:
|
||||
# Here you can specify whether the player should receive a message.
|
||||
Enable: false
|
||||
# Specify here the message that the player should get.
|
||||
# Multiple lines can be used and placeholders are supported!
|
||||
# Placeholder: [player] = The player who executes the alias
|
||||
Messages: []
|
||||
#
|
||||
# You can use Minecraft custom color codes: https://minecraft.fandom.com/de/wiki/Formatierungscodes
|
||||
# You can use the hover module from T2Code:
|
||||
# You can add a hover and/or clickable feature to all messages sent to players.
|
||||
# Use /*/ to separate the message.
|
||||
# Use [nl] to set a line break in a message or hover.
|
||||
# Hover message: <message >/*/<hover>
|
||||
# Message with hover and click function: <message >/*/<hover>/*/<action>/*/<actionValue>
|
||||
# Message only with click function: <message >/*//*/<action>/*/<actionValue>
|
||||
# Action:
|
||||
# - OPEN_URL - Opens a URL under the path specified in ActionValue.
|
||||
# - OPEN_FILE - Opens a file under the path specified by ActionValue.
|
||||
# - RUN_COMMAND - Runs the command specified by ActionValue.
|
||||
# - SUGGEST_COMMAND - Inserts the string specified in ActionValue into the player text box.
|
||||
# - CHANGE_PAGE - Changes to the page number in a book specified by ActionValue.
|
||||
# - COPY_TO_CLIPBOARD - Copies the string specified by ActionValue to the player's clipboard.
|
||||
# You can also use MiniMessage:
|
||||
# Wiki: https://docs.adventure.kyori.net/minimessage/format.html
|
||||
# WebUI: https://webui.adventure.kyori.net
|
||||
Messages: [ ]
|
||||
|
||||
# Here you can specify that players with the permission () have a different function than other players.
|
||||
# For example, you can say that players should come to a certain point and players with the admin function only to the server to the position where they were before.
|
||||
@ -67,13 +88,32 @@ Alias:
|
||||
BungeeCommand: false
|
||||
# Here you can specify one or more commands to be executed.
|
||||
# Placeholder: [player] = The player who executes the alias
|
||||
Commands: []
|
||||
Commands: [ ]
|
||||
Message:
|
||||
# Here you can specify whether the player should receive a message.
|
||||
Enable: false
|
||||
# Specify here the message that the player should get.
|
||||
# Multiple lines can be used and placeholders are supported!
|
||||
# Placeholder: [player] = The player who executes the alias
|
||||
#
|
||||
# You can use Minecraft custom color codes: https://minecraft.fandom.com/de/wiki/Formatierungscodes
|
||||
# You can use the hover module from T2Code:
|
||||
# You can add a hover and/or clickable feature to all messages sent to players.
|
||||
# Use /*/ to separate the message.
|
||||
# Use [nl] to set a line break in a message or hover.
|
||||
# Hover message: <message >/*/<hover>
|
||||
# Message with hover and click function: <message >/*/<hover>/*/<action>/*/<actionValue>
|
||||
# Message only with click function: <message >/*//*/<action>/*/<actionValue>
|
||||
# Action:
|
||||
# - OPEN_URL - Opens a URL under the path specified in ActionValue.
|
||||
# - OPEN_FILE - Opens a file under the path specified by ActionValue.
|
||||
# - RUN_COMMAND - Runs the command specified by ActionValue.
|
||||
# - SUGGEST_COMMAND - Inserts the string specified in ActionValue into the player text box.
|
||||
# - CHANGE_PAGE - Changes to the page number in a book specified by ActionValue.
|
||||
# - COPY_TO_CLIPBOARD - Copies the string specified by ActionValue to the player's clipboard.
|
||||
# You can also use MiniMessage:
|
||||
# Wiki: https://docs.adventure.kyori.net/minimessage/format.html
|
||||
# WebUI: https://webui.adventure.kyori.net
|
||||
Messages: [ ]
|
||||
|
||||
Console:
|
||||
@ -91,4 +131,4 @@ Alias:
|
||||
# Here you can specify whether the player should receive a message.
|
||||
Enable: false
|
||||
# Specify here the message that the player should get.
|
||||
Messages: [ ]
|
||||
Messages: [ ]
|
@ -1,25 +1,26 @@
|
||||
####################################################################
|
||||
## To create another alias, simply copy the file ##
|
||||
## and name it what you want the aliascommand to be. ##
|
||||
## The alias command is always the filename without .yml!!! ##
|
||||
####################################################################
|
||||
#
|
||||
|
||||
SubAlias:
|
||||
# Here you can disable the alias
|
||||
Enable: true
|
||||
|
||||
|
||||
# >>>>>> New 1.1 <<<<<< <<<<<<<<<<<<<<<<<<<<<
|
||||
# Specify here what the SubAlias commands should be for this function
|
||||
SubAliasList:
|
||||
- subalias1
|
||||
# Enter here the alias command where the subalias should follow.
|
||||
# For example:
|
||||
# - aliasexample1 -> aliasexample1 <this SubAlias>
|
||||
# - aliasexample2 test -> aliasexample2 test <this SubAlias>
|
||||
SubAliasFor:
|
||||
- alias1
|
||||
|
||||
|
||||
- aliasexample1
|
||||
Permission:
|
||||
# Here you can say if a permission is needed to use the alias#
|
||||
# Permission: t2code.subalias.use.<aliasname>
|
||||
Necessary: true
|
||||
# Here you can set the permission for the alias.
|
||||
# The placeholder <alias> is the alias name.
|
||||
# If you have set multiple alias referrers in the list 'Alias.AliasList' you have a permission for each alias.
|
||||
Permission: 't2code.alias.use.subalias.<alias>'
|
||||
# Here you can set a custom No Permission message for this alias. If you want to use the default message, just leave this blank.
|
||||
CustomNoPermissionMSG: ""
|
||||
Cost:
|
||||
# Here you can say if you have to pay for the alias
|
||||
Enable: false
|
||||
@ -45,6 +46,25 @@ SubAlias:
|
||||
# Specify here the message that the player should get.
|
||||
# Multiple lines can be used and placeholders are supported!
|
||||
# Placeholder: [player] = The player who executes the alias
|
||||
#
|
||||
# You can use Minecraft custom color codes: https://minecraft.fandom.com/de/wiki/Formatierungscodes
|
||||
# You can use the hover module from T2Code:
|
||||
# You can add a hover and/or clickable feature to all messages sent to players.
|
||||
# Use /*/ to separate the message.
|
||||
# Use [nl] to set a line break in a message or hover.
|
||||
# Hover message: <message >/*/<hover>
|
||||
# Message with hover and click function: <message >/*/<hover>/*/<action>/*/<actionValue>
|
||||
# Message only with click function: <message >/*//*/<action>/*/<actionValue>
|
||||
# Action:
|
||||
# - OPEN_URL - Opens a URL under the path specified in ActionValue.
|
||||
# - OPEN_FILE - Opens a file under the path specified by ActionValue.
|
||||
# - RUN_COMMAND - Runs the command specified by ActionValue.
|
||||
# - SUGGEST_COMMAND - Inserts the string specified in ActionValue into the player text box.
|
||||
# - CHANGE_PAGE - Changes to the page number in a book specified by ActionValue.
|
||||
# - COPY_TO_CLIPBOARD - Copies the string specified by ActionValue to the player's clipboard.
|
||||
# You can also use MiniMessage:
|
||||
# Wiki: https://docs.adventure.kyori.net/minimessage/format.html
|
||||
# WebUI: https://webui.adventure.kyori.net
|
||||
Messages: []
|
||||
|
||||
# Here you can specify that players with the permission () have a different function than other players.
|
||||
@ -75,6 +95,25 @@ SubAlias:
|
||||
# Specify here the message that the player should get.
|
||||
# Multiple lines can be used and placeholders are supported!
|
||||
# Placeholder: [player] = The player who executes the alias
|
||||
#
|
||||
# You can use Minecraft custom color codes: https://minecraft.fandom.com/de/wiki/Formatierungscodes
|
||||
# You can use the hover module from T2Code:
|
||||
# You can add a hover and/or clickable feature to all messages sent to players.
|
||||
# Use /*/ to separate the message.
|
||||
# Use [nl] to set a line break in a message or hover.
|
||||
# Hover message: <message >/*/<hover>
|
||||
# Message with hover and click function: <message >/*/<hover>/*/<action>/*/<actionValue>
|
||||
# Message only with click function: <message >/*//*/<action>/*/<actionValue>
|
||||
# Action:
|
||||
# - OPEN_URL - Opens a URL under the path specified in ActionValue.
|
||||
# - OPEN_FILE - Opens a file under the path specified by ActionValue.
|
||||
# - RUN_COMMAND - Runs the command specified by ActionValue.
|
||||
# - SUGGEST_COMMAND - Inserts the string specified in ActionValue into the player text box.
|
||||
# - CHANGE_PAGE - Changes to the page number in a book specified by ActionValue.
|
||||
# - COPY_TO_CLIPBOARD - Copies the string specified by ActionValue to the player's clipboard.
|
||||
# You can also use MiniMessage:
|
||||
# Wiki: https://docs.adventure.kyori.net/minimessage/format.html
|
||||
# WebUI: https://webui.adventure.kyori.net
|
||||
Messages: [ ]
|
||||
|
||||
Console:
|
||||
@ -92,4 +131,4 @@ SubAlias:
|
||||
# Here you can specify whether the player should receive a message.
|
||||
Enable: false
|
||||
# Specify here the message that the player should get.
|
||||
Messages: [ ]
|
||||
Messages: [ ]
|
Loading…
Reference in New Issue
Block a user