valueEntry : map.get(entryValues.getKey()).entrySet()) {
- valueBuilder.appendField(valueEntry.getKey(), valueEntry.getValue());
- allSkipped = false;
- }
- if (!allSkipped) {
- reallyAllSkipped = false;
- valuesBuilder.appendField(entryValues.getKey(), valueBuilder.build());
- }
- }
- if (reallyAllSkipped) {
- // Null = skip the chart
- return null;
- }
- return new JsonObjectBuilder().appendField("values", valuesBuilder.build()).build();
- }
- }
-
- /**
- * An extremely simple JSON builder.
- *
- * While this class is neither feature-rich nor the most performant one, it's sufficient enough
- * for its use-case.
- */
- public static class JsonObjectBuilder {
-
- private StringBuilder builder = new StringBuilder();
-
- private boolean hasAtLeastOneField = false;
-
- public JsonObjectBuilder() {
- builder.append("{");
- }
-
- /**
- * Appends a null field to the JSON.
- *
- * @param key The key of the field.
- * @return A reference to this object.
- */
- public JsonObjectBuilder appendNull(String key) {
- appendFieldUnescaped(key, "null");
- return this;
- }
-
- /**
- * Appends a string field to the JSON.
- *
- * @param key The key of the field.
- * @param value The value of the field.
- * @return A reference to this object.
- */
- public JsonObjectBuilder appendField(String key, String value) {
- if (value == null) {
- throw new IllegalArgumentException("JSON value must not be null");
- }
- appendFieldUnescaped(key, "\"" + escape(value) + "\"");
- return this;
- }
-
- /**
- * Appends an integer field to the JSON.
- *
- * @param key The key of the field.
- * @param value The value of the field.
- * @return A reference to this object.
- */
- public JsonObjectBuilder appendField(String key, int value) {
- appendFieldUnescaped(key, String.valueOf(value));
- return this;
- }
-
- /**
- * Appends an object to the JSON.
- *
- * @param key The key of the field.
- * @param object The object.
- * @return A reference to this object.
- */
- public JsonObjectBuilder appendField(String key, JsonObject object) {
- if (object == null) {
- throw new IllegalArgumentException("JSON object must not be null");
- }
- appendFieldUnescaped(key, object.toString());
- return this;
- }
-
- /**
- * Appends a string array to the JSON.
- *
- * @param key The key of the field.
- * @param values The string array.
- * @return A reference to this object.
- */
- public JsonObjectBuilder appendField(String key, String[] values) {
- if (values == null) {
- throw new IllegalArgumentException("JSON values must not be null");
- }
- String escapedValues =
- Arrays.stream(values)
- .map(value -> "\"" + escape(value) + "\"")
- .collect(Collectors.joining(","));
- appendFieldUnescaped(key, "[" + escapedValues + "]");
- return this;
- }
-
- /**
- * Appends an integer array to the JSON.
- *
- * @param key The key of the field.
- * @param values The integer array.
- * @return A reference to this object.
- */
- public JsonObjectBuilder appendField(String key, int[] values) {
- if (values == null) {
- throw new IllegalArgumentException("JSON values must not be null");
- }
- String escapedValues =
- Arrays.stream(values).mapToObj(String::valueOf).collect(Collectors.joining(","));
- appendFieldUnescaped(key, "[" + escapedValues + "]");
- return this;
- }
-
- /**
- * Appends an object array to the JSON.
- *
- * @param key The key of the field.
- * @param values The integer array.
- * @return A reference to this object.
- */
- public JsonObjectBuilder appendField(String key, JsonObject[] values) {
- if (values == null) {
- throw new IllegalArgumentException("JSON values must not be null");
- }
- String escapedValues =
- Arrays.stream(values).map(JsonObject::toString).collect(Collectors.joining(","));
- appendFieldUnescaped(key, "[" + escapedValues + "]");
- return this;
- }
-
- /**
- * Appends a field to the object.
- *
- * @param key The key of the field.
- * @param escapedValue The escaped value of the field.
- */
- private void appendFieldUnescaped(String key, String escapedValue) {
- if (builder == null) {
- throw new IllegalStateException("JSON has already been built");
- }
- if (key == null) {
- throw new IllegalArgumentException("JSON key must not be null");
- }
- if (hasAtLeastOneField) {
- builder.append(",");
- }
- builder.append("\"").append(escape(key)).append("\":").append(escapedValue);
- hasAtLeastOneField = true;
- }
-
- /**
- * Builds the JSON string and invalidates this builder.
- *
- * @return The built JSON string.
- */
- public JsonObject build() {
- if (builder == null) {
- throw new IllegalStateException("JSON has already been built");
- }
- JsonObject object = new JsonObject(builder.append("}").toString());
- builder = null;
- return object;
- }
-
- /**
- * Escapes the given string like stated in https://www.ietf.org/rfc/rfc4627.txt.
- *
- *
This method escapes only the necessary characters '"', '\'. and '\u0000' - '\u001F'.
- * Compact escapes are not used (e.g., '\n' is escaped as "\u000a" and not as "\n").
- *
- * @param value The value to escape.
- * @return The escaped value.
- */
- private static String escape(String value) {
- final StringBuilder builder = new StringBuilder();
- for (int i = 0; i < value.length(); i++) {
- char c = value.charAt(i);
- if (c == '"') {
- builder.append("\\\"");
- } else if (c == '\\') {
- builder.append("\\\\");
- } else if (c <= '\u000F') {
- builder.append("\\u000").append(Integer.toHexString(c));
- } else if (c <= '\u001F') {
- builder.append("\\u00").append(Integer.toHexString(c));
- } else {
- builder.append(c);
- }
- }
- return builder.toString();
- }
-
- /**
- * A super simple representation of a JSON object.
- *
- *
This class only exists to make methods of the {@link JsonObjectBuilder} type-safe and not
- * allow a raw string inputs for methods like {@link JsonObjectBuilder#appendField(String,
- * JsonObject)}.
- */
- public static class JsonObject {
-
- private final String value;
-
- private JsonObject(String value) {
- this.value = value;
- }
-
- @Override
- public String toString() {
- return value;
- }
- }
- }
-}
diff --git a/src/main/java/net/t2code/alias/Spigot/Main.java b/src/main/java/net/t2code/alias/Spigot/Main.java
index 3102ee4..d0df49a 100644
--- a/src/main/java/net/t2code/alias/Spigot/Main.java
+++ b/src/main/java/net/t2code/alias/Spigot/Main.java
@@ -4,7 +4,7 @@ import net.t2code.alias.Spigot.objects.AliasObject;
import net.t2code.alias.Spigot.objects.SubAliasObject;
import net.t2code.alias.Spigot.system.Load;
import net.t2code.alias.Util;
-import net.t2code.lib.Spigot.Lib.messages.T2CodeTemplate;
+import net.t2code.t2codelib.SPIGOT.api.messages.T2Ctemplate;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
@@ -44,7 +44,7 @@ public final class Main extends JavaPlugin {
aliasHashMap.clear();
allAliases.clear();
if (Bukkit.getPluginManager().getPlugin("T2CodeLib") == null) return;
- T2CodeTemplate.onDisable(Util.getPrefix(), autor, version, Util.getSpigot(), Util.getDiscord());
+ T2Ctemplate.onDisable(Util.getPrefix(), autor, version, Util.getSpigot(), Util.getDiscord());
}
public static Boolean pluginNotFound(String pl, Integer spigotID, String ver) {
diff --git a/src/main/java/net/t2code/alias/Spigot/cmdManagement/AliasCmdExecuter.java b/src/main/java/net/t2code/alias/Spigot/cmdManagement/AliasCmdExecuter.java
index b9ddd88..50a33ac 100644
--- a/src/main/java/net/t2code/alias/Spigot/cmdManagement/AliasCmdExecuter.java
+++ b/src/main/java/net/t2code/alias/Spigot/cmdManagement/AliasCmdExecuter.java
@@ -1,8 +1,7 @@
package net.t2code.alias.Spigot.cmdManagement;
-import net.t2code.alias.Spigot.Main;
import net.t2code.alias.Spigot.config.languages.SelectMessages;
-import net.t2code.lib.Spigot.Lib.messages.send;
+import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
@@ -10,7 +9,6 @@ import org.bukkit.command.TabCompleter;
import org.bukkit.entity.Player;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
@@ -25,7 +23,7 @@ public class AliasCmdExecuter implements CommandExecutor, TabCompleter {
// Command
if (sender.hasPermission("t2code.alias.command.info")) {
Commands.info(sender);
- } else send.sender(sender, SelectMessages.noPermissionForCommand.replace("[cmd]", "/t2code-alias info")
+ } else T2Csend.sender(sender, SelectMessages.noPermissionForCommand.replace("[cmd]", "/t2code-alias info")
.replace("[perm]", "t2code.alias.command.info"));
} else {
switch (args[0].toLowerCase()) {
@@ -33,7 +31,7 @@ public class AliasCmdExecuter implements CommandExecutor, TabCompleter {
case "rl":
if (sender.hasPermission("t2code.alias.command.reload") || sender.isOp()) {
Commands.reload(sender);
- } else send.sender(sender, SelectMessages.noPermissionForCommand.replace("[cmd]", "/t2code-alias reload")
+ } else T2Csend.sender(sender, SelectMessages.noPermissionForCommand.replace("[cmd]", "/t2code-alias reload")
.replace("[perm]", "t2code.alias.command.reload"));
break;
case "info":
@@ -41,7 +39,7 @@ public class AliasCmdExecuter implements CommandExecutor, TabCompleter {
case "version":
if (sender.hasPermission("t2code.alias.command.info")) {
Commands.info(sender);
- } else send.sender(sender, SelectMessages.noPermissionForCommand.replace("[cmd]", "/t2code-alias info")
+ } else T2Csend.sender(sender, SelectMessages.noPermissionForCommand.replace("[cmd]", "/t2code-alias info")
.replace("[perm]", "t2code.alias.command.info"));
break;
diff --git a/src/main/java/net/t2code/alias/Spigot/cmdManagement/Commands.java b/src/main/java/net/t2code/alias/Spigot/cmdManagement/Commands.java
index decb4bc..e1505f9 100644
--- a/src/main/java/net/t2code/alias/Spigot/cmdManagement/Commands.java
+++ b/src/main/java/net/t2code/alias/Spigot/cmdManagement/Commands.java
@@ -2,30 +2,26 @@ package net.t2code.alias.Spigot.cmdManagement;
import net.t2code.alias.Spigot.Main;
import net.t2code.alias.Spigot.config.languages.SelectMessages;
-import net.t2code.alias.Spigot.system.Load;
import net.t2code.alias.Util;
-import net.t2code.lib.Spigot.Lib.messages.T2CodeTemplate;
-import net.t2code.lib.Spigot.Lib.messages.send;
-import net.t2code.lib.Spigot.Lib.update.UpdateAPI;
-import org.bukkit.Bukkit;
+import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
+import net.t2code.t2codelib.SPIGOT.api.messages.T2Ctemplate;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Commands {
public static void info(CommandSender sender) {
- T2CodeTemplate.sendInfo(sender, Util.getPrefix(), Util.getSpigot(), Util.getDiscord(), Main.getAutor(), Main.getVersion(),
- UpdateAPI.PluginVersionen.get(Main.getPlugin().getName()).publicVersion);
+ T2Ctemplate.sendInfo(sender,Main.getPlugin(),Util.getSpigotID(),Util.getDiscord(),Util.getInfoText());
}
public static void reload(CommandSender sender) {
if (sender instanceof Player) sender.sendMessage(SelectMessages.reloadStart);
- send.console(Util.getPrefix() + "§8-------------------------------");
- send.console(Util.getPrefix() + " §6Plugin reload...");
- send.console(Util.getPrefix() + "§8-------------------------------");
+ T2Csend.console(Util.getPrefix() + "§8-------------------------------");
+ T2Csend.console(Util.getPrefix() + " §6Plugin reload...");
+ T2Csend.console(Util.getPrefix() + "§8-------------------------------");
Main.getPlugin().onEnable();
if (sender instanceof Player) sender.sendMessage(SelectMessages.reloadEnd);
- send.console(Util.getPrefix() + "§8-------------------------------");
- send.console(Util.getPrefix() + " §2Plugin successfully reloaded.");
- send.console(Util.getPrefix() + "§8-------------------------------");
+ T2Csend.console(Util.getPrefix() + "§8-------------------------------");
+ T2Csend.console(Util.getPrefix() + " §2Plugin successfully reloaded.");
+ T2Csend.console(Util.getPrefix() + "§8-------------------------------");
}
}
diff --git a/src/main/java/net/t2code/alias/Spigot/cmdManagement/ExecuteAlias.java b/src/main/java/net/t2code/alias/Spigot/cmdManagement/ExecuteAlias.java
index fb362bf..7b837d6 100644
--- a/src/main/java/net/t2code/alias/Spigot/cmdManagement/ExecuteAlias.java
+++ b/src/main/java/net/t2code/alias/Spigot/cmdManagement/ExecuteAlias.java
@@ -1,17 +1,16 @@
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;
import net.t2code.alias.Spigot.objects.SubAliasObject;
import net.t2code.alias.Spigot.system.BCommandSenderReciver;
import net.t2code.alias.Util;
-import net.t2code.lib.Spigot.Lib.commands.Cmd;
-import net.t2code.lib.Spigot.Lib.eco.Eco;
-import net.t2code.lib.Spigot.Lib.messages.send;
-import net.t2code.lib.Spigot.Lib.plugins.PluginCheck;
-import net.t2code.lib.Spigot.Lib.replace.Replace;
+import net.t2code.t2codelib.SPIGOT.api.commands.T2Ccmd;
+import net.t2code.t2codelib.SPIGOT.api.eco.T2Ceco;
+import net.t2code.t2codelib.SPIGOT.api.messages.T2Creplace;
+import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
+import net.t2code.t2codelib.SPIGOT.api.plugins.T2CpluginCheck;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -43,18 +42,18 @@ public class ExecuteAlias {
if (aliasObject.permissionMSG == null || aliasObject.permissionMSG.equals("")) {
npmsg = SelectMessages.noPermissionForCommand;
} else npmsg = aliasObject.permissionMSG;
- send.player(player, npmsg.replace("[cmd]", "/" + alias.toLowerCase())
+ T2Csend.player(player, npmsg.replace("[cmd]", "/" + alias.toLowerCase())
.replace("[perm]", aliasObject.permission.replace("", alias.toLowerCase())).replace("[alias]", alias));
return;
}
}
if (aliasObject.costEnable) {
if (!(aliasObject.costAllowBypass && player.hasPermission("t2code.alias.buy.bypass"))) {
- if (!Eco.moneyRemove(prefix, player, aliasObject.costPrice)) {
- send.player(player, SelectMessages.noMoney);
+ if (!T2Ceco.moneyRemove(prefix, player, aliasObject.costPrice)) {
+ T2Csend.player(player, SelectMessages.noMoney);
return;
}
- if (SelectConfig.buyMessage) send.player(player, SelectMessages.buy.replace("[price]", aliasObject.costPrice.toString()));
+ if (SelectConfig.buyMessage) T2Csend.player(player, SelectMessages.buy.replace("[price]", aliasObject.costPrice.toString()));
}
}
if (aliasObject.commandEnable) {
@@ -67,7 +66,7 @@ public class ExecuteAlias {
protected static void subAliasPlayer(CommandSender sender, SubAliasObject aliasObject, String alias, String[] args) {
if (!aliasObject.subAliasEnable) {
- send.sender(sender, SelectMessages.aliasDisabled);
+ T2Csend.sender(sender, SelectMessages.aliasDisabled);
return;
}
@@ -92,18 +91,18 @@ public class ExecuteAlias {
if (aliasObject.permissionMSG == null || aliasObject.permissionMSG.equals("")) {
npmsg = SelectMessages.noPermissionForCommand;
} else npmsg = aliasObject.permissionMSG;
- send.player(player, npmsg.replace("[cmd]", "/" + alias.toLowerCase())
+ T2Csend.player(player, npmsg.replace("[cmd]", "/" + alias.toLowerCase())
.replace("[perm]", aliasObject.permission.replace("", alias.toLowerCase())).replace("[alias]", alias));
return;
}
}
if (aliasObject.costEnable) {
if (!(aliasObject.costAllowBypass && player.hasPermission("t2code.alias.buy.bypass"))) {
- if (!Eco.moneyRemove(prefix, player, aliasObject.costPrice)) {
- send.player(player, SelectMessages.noMoney);
+ if (!T2Ceco.moneyRemove(prefix, player, aliasObject.costPrice)) {
+ T2Csend.player(player, SelectMessages.noMoney);
return;
}
- if (SelectConfig.buyMessage) send.player(player, SelectMessages.buy.replace("[price]", aliasObject.costPrice.toString()));
+ if (SelectConfig.buyMessage) T2Csend.player(player, SelectMessages.buy.replace("[price]", aliasObject.costPrice.toString()));
}
}
if (aliasObject.commandEnable) {
@@ -115,7 +114,7 @@ public class ExecuteAlias {
} else {
if (aliasObject.consoleEnable) {
subAliasConsole(aliasObject, sender, args);
- } else send.sender(sender, SelectMessages.onlyForPlayer);
+ } else T2Csend.sender(sender, SelectMessages.onlyForPlayer);
}
}
@@ -126,17 +125,17 @@ public class ExecuteAlias {
if (SelectConfig.Bungee) {
BCommandSenderReciver.sendToBungee(sender, cmd, 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.");
+ T2Csend.console(Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
+ T2Csend.sender(sender, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
}
} else {
- Cmd.console(cmd);
+ T2Ccmd.console(cmd);
}
}
}
if (alias.consoleMessageEnable) {
for (String msg : alias.consoleMessages) {
- send.console(Replace.replace(prefix, msg));
+ T2Csend.console(T2Creplace.replace(prefix, msg));
}
}
}
@@ -155,17 +154,17 @@ public class ExecuteAlias {
if (SelectConfig.Bungee) {
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.");
+ T2Csend.console(Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
+ T2Csend.sender(sender, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
}
} else {
- Cmd.console(cmd.replace("[target]", targetSt));
+ T2Ccmd.console(cmd.replace("[target]", targetSt));
}
}
}
if (alias.consoleMessageEnable) {
for (String msg : alias.consoleMessages) {
- send.console(Replace.replace(prefix, msg));
+ T2Csend.console(T2Creplace.replace(prefix, msg));
}
}
}
@@ -184,14 +183,14 @@ public class ExecuteAlias {
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.");
- send.player(player, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
+ T2Csend.console(Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
+ T2Csend.player(player, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
}
} else {
if (alias.adminCommandAsConsole) {
- Cmd.console(cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
+ T2Ccmd.console(cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
} else {
- Cmd.player(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
+ T2Ccmd.player(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
}
}
}
@@ -211,14 +210,14 @@ public class ExecuteAlias {
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.");
- send.player(player, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
+ T2Csend.console(Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
+ T2Csend.player(player, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
}
} else {
if (alias.adminCommandAsConsole) {
- Cmd.console(cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
+ T2Ccmd.console(cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
} else {
- Cmd.player(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
+ T2Ccmd.player(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
}
}
}
@@ -234,12 +233,12 @@ public class ExecuteAlias {
}
for (String msg : aliasObject.adminMessages) {
String text;
- if (PluginCheck.papi()) {
- text = Replace.replace(prefix, player, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
+ if (T2CpluginCheck.papi()) {
+ text = T2Creplace.replace(prefix, player, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
} else {
- text = Replace.replace(prefix, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
+ text = T2Creplace.replace(prefix, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
}
- send.player(player, text);
+ T2Csend.player(player, text);
}
}
@@ -253,12 +252,12 @@ public class ExecuteAlias {
}
for (String msg : subAliasObject.adminMessages) {
String text;
- if (PluginCheck.papi()) {
- text = Replace.replace(prefix, player, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
+ if (T2CpluginCheck.papi()) {
+ text = T2Creplace.replace(prefix, player, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
} else {
- text = Replace.replace(prefix, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
+ text = T2Creplace.replace(prefix, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
}
- send.player(player, text);
+ T2Csend.player(player, text);
}
}
@@ -276,14 +275,14 @@ public class ExecuteAlias {
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.");
- send.player(player, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
+ T2Csend.console(Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
+ T2Csend.player(player, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
}
} else {
if (alias.commandAsConsole) {
- Cmd.console(cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
+ T2Ccmd.console(cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
} else {
- Cmd.player(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
+ T2Ccmd.player(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
}
}
}
@@ -303,14 +302,14 @@ public class ExecuteAlias {
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.");
- send.player(player, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
+ T2Csend.console(Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
+ T2Csend.player(player, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
}
} else {
if (alias.commandAsConsole) {
- Cmd.console(cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
+ T2Ccmd.console(cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
} else {
- Cmd.player(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
+ T2Ccmd.player(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt));
}
}
}
@@ -328,12 +327,12 @@ public class ExecuteAlias {
for (String msg : aliasObject.messages) {
String text;
- if (PluginCheck.papi()) {
- text = Replace.replace(prefix, player, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
+ if (T2CpluginCheck.papi()) {
+ text = T2Creplace.replace(prefix, player, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
} else {
- text = Replace.replace(prefix, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
+ text = T2Creplace.replace(prefix, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
}
- send.player(player, text);
+ T2Csend.player(player, text);
}
}
@@ -347,12 +346,12 @@ public class ExecuteAlias {
}
for (String msg : subAliasObject.messages) {
String text;
- if (PluginCheck.papi()) {
- text = Replace.replace(prefix, player, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
+ if (T2CpluginCheck.papi()) {
+ text = T2Creplace.replace(prefix, player, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
} else {
- text = Replace.replace(prefix, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
+ text = T2Creplace.replace(prefix, replacePlayer(msg, player)).replace("[target]", targetSt).replace("[alias]", alias);
}
- send.player(player, text);
+ T2Csend.player(player, text);
}
}
diff --git a/src/main/java/net/t2code/alias/Spigot/cmdManagement/RegisterCommands.java b/src/main/java/net/t2code/alias/Spigot/cmdManagement/RegisterCommands.java
index 65f0b03..0786c95 100644
--- a/src/main/java/net/t2code/alias/Spigot/cmdManagement/RegisterCommands.java
+++ b/src/main/java/net/t2code/alias/Spigot/cmdManagement/RegisterCommands.java
@@ -5,19 +5,17 @@ import net.t2code.alias.Spigot.config.languages.SelectMessages;
import net.t2code.alias.Spigot.objects.AliasObject;
import net.t2code.alias.Spigot.objects.SubAliasObject;
import net.t2code.alias.Util;
-import net.t2code.lib.Spigot.Lib.messages.send;
+import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
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;
-import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
-public class RegisterCommands extends Command implements TabCompleter {
+public class RegisterCommands extends Command {
private String alias;
private String prefix = Util.getPrefix();
@@ -31,11 +29,11 @@ public class RegisterCommands extends Command implements TabCompleter {
AliasObject alias = Main.aliasHashMap.get(this.alias);
if (alias == null) {
- send.error(Main.getPlugin(), "The alias " + this.alias + " does not exist.");
+ T2Csend.error(Main.getPlugin(), "The alias " + this.alias + " does not exist.");
return false;
}
if (!alias.aliasEnable) {
- send.sender(sender, SelectMessages.aliasDisabled);
+ T2Csend.sender(sender, SelectMessages.aliasDisabled);
return true;
}
if (args.length == 0 || args.length == 1 && args[0].contains("-p:")) {
@@ -44,7 +42,7 @@ public class RegisterCommands extends Command implements TabCompleter {
} else {
if (alias.consoleEnable) {
ExecuteAlias.aliasConsole(alias, sender, prefix);
- } else send.sender(sender, SelectMessages.onlyForPlayer);
+ } else T2Csend.sender(sender, SelectMessages.onlyForPlayer);
}
} else {
if (!Main.allForSubAliases.contains(this.alias)) {
@@ -61,15 +59,9 @@ public class RegisterCommands extends Command implements TabCompleter {
}
}
}
- send.sender(sender, "TODO DEV'>Diesen Befehl gibt es nicht");
- //todo
+ T2Csend.sender(sender, SelectMessages.noSubCommand);
}
return true;
}
-
- @Override
- public List onTabComplete(CommandSender commandSender, Command command, String s, String[] strings) {
- return Collections.singletonList("hallodepp");
- }
}
diff --git a/src/main/java/net/t2code/alias/Spigot/cmdManagement/TabEvent.java b/src/main/java/net/t2code/alias/Spigot/cmdManagement/TabEvent.java
index dcc125d..e01dfd4 100644
--- a/src/main/java/net/t2code/alias/Spigot/cmdManagement/TabEvent.java
+++ b/src/main/java/net/t2code/alias/Spigot/cmdManagement/TabEvent.java
@@ -2,7 +2,7 @@ package net.t2code.alias.Spigot.cmdManagement;
import net.t2code.alias.Spigot.Main;
import net.t2code.alias.Spigot.objects.SubAliasObject;
-import net.t2code.lib.Spigot.Lib.commands.Tab;
+import net.t2code.t2codelib.SPIGOT.api.commands.T2Ctab;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.server.TabCompleteEvent;
@@ -36,7 +36,7 @@ public class TabEvent implements Listener {
int arg = aliasObject.subAliasArg;
if (args.length - 1 == arg) {
for (String command : aliasObject.subAliasList) {
- if (Tab.hasPermission(e.getSender(), arg1.get(command)) && Tab.passend(command, args[arg])) {
+ if (T2Ctab.hasPermission(e.getSender(), arg1.get(command)) && T2Ctab.passend(command, args[arg])) {
list.add(command);
}
}
diff --git a/src/main/java/net/t2code/alias/Spigot/config/alias/AliasConfigConverter.java b/src/main/java/net/t2code/alias/Spigot/config/alias/AliasConfigConverter.java
index 2056e2c..17cbc50 100644
--- a/src/main/java/net/t2code/alias/Spigot/config/alias/AliasConfigConverter.java
+++ b/src/main/java/net/t2code/alias/Spigot/config/alias/AliasConfigConverter.java
@@ -1,7 +1,7 @@
package net.t2code.alias.Spigot.config.alias;
import net.t2code.alias.Spigot.Main;
-import net.t2code.lib.Spigot.Lib.messages.send;
+import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.File;
@@ -24,13 +24,13 @@ public class AliasConfigConverter {
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.");
- send.warning(Main.getPlugin(), "The alias is no longer the filename, this is now adjustable in the file under 'Alias.AliasList'!");
- send.warning(Main.getPlugin(), "This allows a function to have multiple alias commands without creating multiple files!");
- send.error(Main.getPlugin(), "");
- send.error(Main.getPlugin(), "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
+ T2Csend.error(Main.getPlugin(), "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
+ T2Csend.error(Main.getPlugin(), "");
+ T2Csend.warning(Main.getPlugin(), "The " + config_gui.getName() + " file is converted to the new config format.");
+ T2Csend.warning(Main.getPlugin(), "The alias is no longer the filename, this is now adjustable in the file under 'Alias.AliasList'!");
+ T2Csend.warning(Main.getPlugin(), "This allows a function to have multiple alias commands without creating multiple files!");
+ T2Csend.error(Main.getPlugin(), "");
+ T2Csend.error(Main.getPlugin(), "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
}
diff --git a/src/main/java/net/t2code/alias/Spigot/config/alias/CreateExampleAliasConfig.java b/src/main/java/net/t2code/alias/Spigot/config/alias/CreateExampleAliasConfig.java
index 8d12614..47fb078 100644
--- a/src/main/java/net/t2code/alias/Spigot/config/alias/CreateExampleAliasConfig.java
+++ b/src/main/java/net/t2code/alias/Spigot/config/alias/CreateExampleAliasConfig.java
@@ -2,8 +2,8 @@ package net.t2code.alias.Spigot.config.alias;
import net.t2code.alias.Spigot.Main;
import net.t2code.alias.Util;
-import net.t2code.lib.Spigot.Lib.messages.send;
-import net.t2code.lib.Spigot.Lib.yamlConfiguration.Config;
+import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
+import net.t2code.t2codelib.SPIGOT.api.yaml.T2Cconfig;
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.File;
@@ -15,52 +15,52 @@ public class CreateExampleAliasConfig {
public static void configCreate() {
long long_ = System.currentTimeMillis();
- send.console(Util.getPrefix() + " §4Alias/aliasexample.yml are created...");
+ T2Csend.console(Util.getPrefix() + " §4Alias/aliasexample.yml are created...");
File config = new File(Main.getPath(), "Alias/aliasexample.yml");
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
- Config.set("Alias.Enable", true, yamlConfiguration);
- Config.set("Alias.AliasList", Arrays.asList("aliasexample1"),yamlConfiguration);
+ T2Cconfig.set("Alias.Enable", true, yamlConfiguration);
+ T2Cconfig.set("Alias.AliasList", Arrays.asList("aliasexample1"),yamlConfiguration);
- Config.set("Alias.Permission.Necessary", true, yamlConfiguration);
- Config.set("Alias.Permission.Permission", "t2code.alias.use.", yamlConfiguration);
- Config.set("Alias.Permission.CustomNoPermissionMSG", "", yamlConfiguration);
+ T2Cconfig.set("Alias.Permission.Necessary", true, yamlConfiguration);
+ T2Cconfig.set("Alias.Permission.Permission", "t2code.alias.use.", yamlConfiguration);
+ T2Cconfig.set("Alias.Permission.CustomNoPermissionMSG", "", yamlConfiguration);
- Config.set("Alias.Cost.Enable", false,yamlConfiguration);
- Config.set("Alias.Cost.Price", 0.0,yamlConfiguration);
- Config.set("Alias.Cost.AllowByPass", true,yamlConfiguration);
+ T2Cconfig.set("Alias.Cost.Enable", false,yamlConfiguration);
+ T2Cconfig.set("Alias.Cost.Price", 0.0,yamlConfiguration);
+ T2Cconfig.set("Alias.Cost.AllowByPass", true,yamlConfiguration);
- Config.set("Alias.Command.Enable", true, yamlConfiguration);
- Config.set("Alias.Command.CommandAsConsole", true, yamlConfiguration);
- Config.set("Alias.Command.BungeeCommand", false, yamlConfiguration);
- Config.set("Alias.Command.Commands", Collections.singletonList("say hi"), yamlConfiguration);
+ T2Cconfig.set("Alias.Command.Enable", true, yamlConfiguration);
+ T2Cconfig.set("Alias.Command.CommandAsConsole", true, yamlConfiguration);
+ T2Cconfig.set("Alias.Command.BungeeCommand", false, yamlConfiguration);
+ T2Cconfig.set("Alias.Command.Commands", Collections.singletonList("say hi"), yamlConfiguration);
- Config.set("Alias.Message.Enable", false, yamlConfiguration);
- Config.set("Alias.Message.Messages", Collections.emptyList(), yamlConfiguration);
+ T2Cconfig.set("Alias.Message.Enable", false, yamlConfiguration);
+ T2Cconfig.set("Alias.Message.Messages", Collections.emptyList(), yamlConfiguration);
- Config.set("Alias.Admin.Enable", true, yamlConfiguration);
- Config.set("Alias.Admin.Permission", "t2code.alias.admin", yamlConfiguration);
+ T2Cconfig.set("Alias.Admin.Enable", true, yamlConfiguration);
+ T2Cconfig.set("Alias.Admin.Permission", "t2code.alias.admin", yamlConfiguration);
- Config.set("Alias.Admin.Command.Enable", true, yamlConfiguration);
- Config.set("Alias.Admin.Command.CommandAsConsole", true, yamlConfiguration);
- Config.set("Alias.Admin.Command.BungeeCommand", false, yamlConfiguration);
- Config.set("Alias.Admin.Command.Commands", Collections.singletonList("say hi"), yamlConfiguration);
+ T2Cconfig.set("Alias.Admin.Command.Enable", true, yamlConfiguration);
+ T2Cconfig.set("Alias.Admin.Command.CommandAsConsole", true, yamlConfiguration);
+ T2Cconfig.set("Alias.Admin.Command.BungeeCommand", false, yamlConfiguration);
+ T2Cconfig.set("Alias.Admin.Command.Commands", Collections.singletonList("say hi"), yamlConfiguration);
- Config.set("Alias.Admin.Message.Enable", false, yamlConfiguration);
- Config.set("Alias.Admin.Message.Messages", Collections.emptyList(), yamlConfiguration);
+ T2Cconfig.set("Alias.Admin.Message.Enable", false, yamlConfiguration);
+ T2Cconfig.set("Alias.Admin.Message.Messages", Collections.emptyList(), yamlConfiguration);
- Config.set("Alias.Console.Enable", false, yamlConfiguration);
- Config.set("Alias.Console.Command.Enable", false, yamlConfiguration);
- Config.set("Alias.Console.Command.BungeeCommand", false, yamlConfiguration);
- Config.set("Alias.Console.Command.Commands", Collections.emptyList(), yamlConfiguration);
- Config.set("Alias.Console.Message.Enable", false, yamlConfiguration);
- Config.set("Alias.Console.Message.Messages", Collections.emptyList(), yamlConfiguration);
+ T2Cconfig.set("Alias.Console.Enable", false, yamlConfiguration);
+ T2Cconfig.set("Alias.Console.Command.Enable", false, yamlConfiguration);
+ T2Cconfig.set("Alias.Console.Command.BungeeCommand", false, yamlConfiguration);
+ T2Cconfig.set("Alias.Console.Command.Commands", Collections.emptyList(), yamlConfiguration);
+ T2Cconfig.set("Alias.Console.Message.Enable", false, yamlConfiguration);
+ T2Cconfig.set("Alias.Console.Message.Messages", Collections.emptyList(), yamlConfiguration);
try {
yamlConfiguration.save(config);
} catch (IOException e) {
e.printStackTrace();
}
- send.console(Util.getPrefix() + " §2Alias/aliasexample.yml were successfully created." + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
+ T2Csend.console(Util.getPrefix() + " §2Alias/aliasexample.yml were successfully created." + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
}
}
diff --git a/src/main/java/net/t2code/alias/Spigot/config/alias/SelectAlias.java b/src/main/java/net/t2code/alias/Spigot/config/alias/SelectAlias.java
index 62ce1b5..60fe082 100644
--- a/src/main/java/net/t2code/alias/Spigot/config/alias/SelectAlias.java
+++ b/src/main/java/net/t2code/alias/Spigot/config/alias/SelectAlias.java
@@ -2,11 +2,10 @@ 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 net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
import org.bukkit.Bukkit;
import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.YamlConfiguration;
@@ -99,7 +98,7 @@ public class SelectAlias {
for (String al : aliasList) {
Main.aliasHashMap.put(al, alias);
}
- send.console(Prefix + " §aAlias file §e" + config_gui.getName() + " §awas loaded");
+ T2Csend.console(Prefix + " §aAlias file §e" + config_gui.getName() + " §awas loaded");
}
}
AliasRegister.onRegister();
diff --git a/src/main/java/net/t2code/alias/Spigot/config/config/CreateConfig.java b/src/main/java/net/t2code/alias/Spigot/config/config/CreateConfig.java
index c8f0c07..2d41c97 100644
--- a/src/main/java/net/t2code/alias/Spigot/config/config/CreateConfig.java
+++ b/src/main/java/net/t2code/alias/Spigot/config/config/CreateConfig.java
@@ -2,8 +2,8 @@ package net.t2code.alias.Spigot.config.config;
import net.t2code.alias.Spigot.Main;
import net.t2code.alias.Util;
-import net.t2code.lib.Spigot.Lib.messages.send;
-import net.t2code.lib.Spigot.Lib.yamlConfiguration.Config;
+import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
+import net.t2code.t2codelib.SPIGOT.api.yaml.T2Cconfig;
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.File;
@@ -15,25 +15,25 @@ public class CreateConfig {
public static void configCreate() {
long long_ = System.currentTimeMillis();
if (new File(Main.getPath(), "config.yml").exists()) {
- if (Main.getPlugin().getConfig().getBoolean("Plugin.Debug")) send.console(Util.getPrefix() + " §5DEBUG: §6" + " §4config.yml are created / updated...");
- } else send.console(Util.getPrefix() + " §4config.yml are created...");
+ if (Main.getPlugin().getConfig().getBoolean("Plugin.Debug")) T2Csend.console(Util.getPrefix() + " §5DEBUG: §6" + " §4config.yml are created / updated...");
+ } else T2Csend.console(Util.getPrefix() + " §4config.yml are created...");
File config = new File(Main.getPath(), "config.yml");
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
- Config.set("Plugin.language", "english", yamlConfiguration);
+ T2Cconfig.set("Plugin.language", "english", yamlConfiguration);
- Config.set("BungeeCord.Enable", false, yamlConfiguration);
- Config.set("BungeeCord.ThisServer", "server", yamlConfiguration);
+ T2Cconfig.set("BungeeCord.Enable", false, yamlConfiguration);
+ T2Cconfig.set("BungeeCord.ThisServer", "server", yamlConfiguration);
- Config.set("Buy.Message", true, yamlConfiguration);
- Config.set("SubAlias.TabComplete", true, yamlConfiguration);
+ T2Cconfig.set("Buy.Message", true, yamlConfiguration);
+ T2Cconfig.set("SubAlias.TabComplete", true, yamlConfiguration);
try {
yamlConfiguration.save(config);
} catch (IOException e) {
e.printStackTrace();
}
- send.console(Util.getPrefix() + " §2config.yml were successfully created / updated." + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
+ T2Csend.console(Util.getPrefix() + " §2config.yml were successfully created / updated." + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
}
}
diff --git a/src/main/java/net/t2code/alias/Spigot/config/languages/LanguagesCreate.java b/src/main/java/net/t2code/alias/Spigot/config/languages/LanguagesCreate.java
index 2a17351..1bb0c02 100644
--- a/src/main/java/net/t2code/alias/Spigot/config/languages/LanguagesCreate.java
+++ b/src/main/java/net/t2code/alias/Spigot/config/languages/LanguagesCreate.java
@@ -2,10 +2,9 @@ package net.t2code.alias.Spigot.config.languages;
import net.t2code.alias.Spigot.Main;
import net.t2code.alias.Util;
-import net.t2code.lib.Spigot.Lib.messages.send;
-import net.t2code.lib.Spigot.Lib.yamlConfiguration.Config;
+import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
+import net.t2code.t2codelib.SPIGOT.api.yaml.T2Cconfig;
import org.bukkit.configuration.file.YamlConfiguration;
-import org.bukkit.plugin.Plugin;
import java.io.File;
import java.io.IOException;
@@ -13,7 +12,7 @@ import java.io.IOException;
public class LanguagesCreate {
public static void langCreate() {
- send.debug(Main.getPlugin(),"§4Language files are created / updated...");
+ T2Csend.debug(Main.getPlugin(),"§4Language files are created / updated...");
long long_ = System.currentTimeMillis();
/**
@@ -25,19 +24,20 @@ public class LanguagesCreate {
File messagesEN = new File(Main.getPath(), "languages/english_messages.yml");
YamlConfiguration yamlConfigurationEN = YamlConfiguration.loadConfiguration(messagesEN);
- Config.set("Plugin.OnlyForPlayer", MSG.EN_OnlyForPlayer, yamlConfigurationEN);
- Config.set("Plugin.AliasDisabled", MSG.EN_Disabled, yamlConfigurationEN);
- Config.set("Plugin.Reload.Start", MSG.EN_ReloadStart, yamlConfigurationEN);
- Config.set("Plugin.Reload.End", MSG.EN_ReloadEnd, yamlConfigurationEN);
- Config.set("Plugin.ForCommand", MSG.EN_NoPermissionForCommand, yamlConfigurationEN);
+ T2Cconfig.set("Plugin.OnlyForPlayer", MSG.EN_OnlyForPlayer, yamlConfigurationEN);
+ T2Cconfig.set("Plugin.AliasDisabled", MSG.EN_Disabled, yamlConfigurationEN);
+ T2Cconfig.set("Plugin.Reload.Start", MSG.EN_ReloadStart, yamlConfigurationEN);
+ T2Cconfig.set("Plugin.Reload.End", MSG.EN_ReloadEnd, yamlConfigurationEN);
+ T2Cconfig.set("Plugin.ForCommand", MSG.EN_NoPermissionForCommand, yamlConfigurationEN);
+ T2Cconfig.set("Plugin.NoSubCommand", MSG.EN_NoSubCommand, yamlConfigurationEN);
- Config. set("Cost.Buy", MSG.EN_Buy, yamlConfigurationEN);
- Config.set("Cost.NoMoney", MSG.EN_NoMoney, yamlConfigurationEN);
+ T2Cconfig. set("Cost.Buy", MSG.EN_Buy, yamlConfigurationEN);
+ T2Cconfig.set("Cost.NoMoney", MSG.EN_NoMoney, yamlConfigurationEN);
try {
yamlConfigurationEN.save(messagesEN);
} catch (IOException e) {
- send.warning(Main.getPlugin(),e.getMessage());
+ T2Csend.warning(Main.getPlugin(),e.getMessage());
e.printStackTrace();
}
@@ -51,24 +51,25 @@ public class LanguagesCreate {
File messagesDE = new File(Main.getPath(), "languages/german_messages.yml");
YamlConfiguration yamlConfigurationDE = YamlConfiguration.loadConfiguration(messagesDE);
- Config.set("Plugin.OnlyForPlayer", MSG.DE_OnlyForPlayer, yamlConfigurationDE);
- Config.set("Plugin.AliasDisabled", MSG.DE_Disabled, yamlConfigurationDE);
- Config.set("Plugin.Reload.Start", MSG.DE_ReloadStart, yamlConfigurationDE);
- Config.set("Plugin.Reload.End", MSG.DE_ReloadEnd, yamlConfigurationDE);
- Config.set("Plugin.ForCommand", MSG.DE_NoPermissionForCommand, yamlConfigurationDE);
+ T2Cconfig.set("Plugin.OnlyForPlayer", MSG.DE_OnlyForPlayer, yamlConfigurationDE);
+ T2Cconfig.set("Plugin.AliasDisabled", MSG.DE_Disabled, yamlConfigurationDE);
+ T2Cconfig.set("Plugin.Reload.Start", MSG.DE_ReloadStart, yamlConfigurationDE);
+ T2Cconfig.set("Plugin.Reload.End", MSG.DE_ReloadEnd, yamlConfigurationDE);
+ T2Cconfig.set("Plugin.ForCommand", MSG.DE_NoPermissionForCommand, yamlConfigurationDE);
+ T2Cconfig.set("Plugin.NoSubCommand", MSG.DE_NoSubCommand, yamlConfigurationDE);
- Config.set("Cost.Buy", MSG.DE_Buy, yamlConfigurationDE);
- Config.set("Cost.NoMoney", MSG.DE_NoMoney, yamlConfigurationDE);
+ T2Cconfig.set("Cost.Buy", MSG.DE_Buy, yamlConfigurationDE);
+ T2Cconfig.set("Cost.NoMoney", MSG.DE_NoMoney, yamlConfigurationDE);
try {
yamlConfigurationDE.save(messagesDE);
} catch (IOException e) {
- send.warning(Main.getPlugin(),e.getMessage());
+ T2Csend.warning(Main.getPlugin(),e.getMessage());
e.printStackTrace();
}
- send.console(Util.getPrefix() + " §2Language files were successfully created / updated." + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
+ T2Csend.console(Util.getPrefix() + " §2Language files were successfully created / updated." + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
}
}
diff --git a/src/main/java/net/t2code/alias/Spigot/config/languages/MSG.java b/src/main/java/net/t2code/alias/Spigot/config/languages/MSG.java
index 4f53d5d..7b1e928 100644
--- a/src/main/java/net/t2code/alias/Spigot/config/languages/MSG.java
+++ b/src/main/java/net/t2code/alias/Spigot/config/languages/MSG.java
@@ -26,6 +26,7 @@ public class MSG {
public static String EN_Buy = "[prefix] You have paid [price] for this command.";
public static String EN_NoMoney = "[prefix] You don't have enough money for this command!";
+ public static String EN_NoSubCommand = "[prefix] This command does not exist!";
// DE
@@ -41,4 +42,6 @@ public class MSG {
public static String DE_Buy = "[prefix] Du hast f[ue]r diesen Command [price] bezahlt.";
public static String DE_NoMoney = "[prefix] Du hast nicht gen[ue]gend Geld für diesen Command!";
+ public static String DE_NoSubCommand = "[prefix] Diesen Befehl gibt es nicht!";
+
}
diff --git a/src/main/java/net/t2code/alias/Spigot/config/languages/SelectMessages.java b/src/main/java/net/t2code/alias/Spigot/config/languages/SelectMessages.java
index 837a7da..737a39d 100644
--- a/src/main/java/net/t2code/alias/Spigot/config/languages/SelectMessages.java
+++ b/src/main/java/net/t2code/alias/Spigot/config/languages/SelectMessages.java
@@ -3,9 +3,8 @@ package net.t2code.alias.Spigot.config.languages;
import net.t2code.alias.Spigot.Main;
import net.t2code.alias.Spigot.config.config.SelectConfig;
import net.t2code.alias.Util;
-import net.t2code.lib.Spigot.Lib.messages.send;
-import net.t2code.lib.Spigot.Lib.replace.Replace;
-import net.t2code.lib.Spigot.Lib.yamlConfiguration.Config;
+import net.t2code.t2codelib.SPIGOT.api.messages.T2Creplace;
+import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.File;
@@ -18,6 +17,7 @@ public class SelectMessages {
public static String reloadEnd;
public static String noPermissionForCommand;
+ public static String noSubCommand;
public static String aliasDisabled;
public static String buy;
@@ -26,19 +26,19 @@ public class SelectMessages {
public static void onSelect(String Prefix) {
- send.debug(Main.getPlugin(), "§4Select language...");
+ T2Csend.debug(Main.getPlugin(), "§4Select language...");
long long_ = System.currentTimeMillis();
File msg;
msg = new File(Main.getPath(), "languages/" + SelectConfig.language + "_messages.yml");
if (!msg.isFile()) {
- send.console(Prefix);
- send.console(Prefix + " §4!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
- send.console(Prefix + " §4The selected §c" + SelectConfig.language + " §4language file was not found.");
- send.console(Prefix + " §6The default language §eEnglish §6is used!");
- send.console(Prefix + " §4!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
- send.console(Prefix);
+ T2Csend.console(Prefix);
+ T2Csend.console(Prefix + " §4!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
+ T2Csend.console(Prefix + " §4The selected §c" + SelectConfig.language + " §4language file was not found.");
+ T2Csend.console(Prefix + " §6The default language §eEnglish §6is used!");
+ T2Csend.console(Prefix + " §4!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
+ T2Csend.console(Prefix);
msg = new File(Main.getPath(), "languages/" + "english_messages.yml");
selectMSG = "english";
} else selectMSG = SelectConfig.language;
@@ -52,13 +52,14 @@ public class SelectMessages {
reloadStart = replace(yamlConfiguration.getString("Plugin.Reload.Start"));
reloadEnd = replace(yamlConfiguration.getString("Plugin.Reload.End"));
noPermissionForCommand = replace(yamlConfiguration.getString("Plugin.ForCommand"));
+ noSubCommand = replace(yamlConfiguration.getString("Plugin.NoSubCommand"));
buy = replace(yamlConfiguration.getString("Cost.Buy"));
noMoney = replace(yamlConfiguration.getString("Cost.NoMoney"));
- send.console(Prefix + " §2Language successfully selected to: §6" + selectMSG + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
+ T2Csend.console(Prefix + " §2Language successfully selected to: §6" + selectMSG + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
}
private static String replace(String text) {
- return Replace.replace(Util.getPrefix(), text);
+ return T2Creplace.replace(Util.getPrefix(), text);
}
}
diff --git a/src/main/java/net/t2code/alias/Spigot/config/subAlias/CreateExampleSubAliasConfig.java b/src/main/java/net/t2code/alias/Spigot/config/subAlias/CreateExampleSubAliasConfig.java
index 563932d..dd3e4ce 100644
--- a/src/main/java/net/t2code/alias/Spigot/config/subAlias/CreateExampleSubAliasConfig.java
+++ b/src/main/java/net/t2code/alias/Spigot/config/subAlias/CreateExampleSubAliasConfig.java
@@ -2,8 +2,8 @@ package net.t2code.alias.Spigot.config.subAlias;
import net.t2code.alias.Spigot.Main;
import net.t2code.alias.Util;
-import net.t2code.lib.Spigot.Lib.messages.send;
-import net.t2code.lib.Spigot.Lib.yamlConfiguration.Config;
+import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
+import net.t2code.t2codelib.SPIGOT.api.yaml.T2Cconfig;
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.File;
@@ -15,53 +15,53 @@ public class CreateExampleSubAliasConfig {
public static void configCreate() {
long long_ = System.currentTimeMillis();
- send.console(Util.getPrefix() + " §4SubAlias/aliasexample.yml are created...");
+ T2Csend.console(Util.getPrefix() + " §4SubAlias/aliasexample.yml are created...");
File config = new File(Main.getPath(), "SubAlias/aliasexample.yml");
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
- Config.set("SubAlias.Enable", true, yamlConfiguration);
- Config.set("SubAlias.SubAliasList", Arrays.asList("test"),yamlConfiguration);
- Config.set("SubAlias.SubAliasFor", "aliasexample1",yamlConfiguration);
+ T2Cconfig.set("SubAlias.Enable", true, yamlConfiguration);
+ T2Cconfig.set("SubAlias.SubAliasList", Arrays.asList("test"), yamlConfiguration);
+ T2Cconfig.set("SubAlias.SubAliasFor", "aliasexample1", yamlConfiguration);
- Config.set("SubAlias.Permission.Necessary", true, yamlConfiguration);
- Config.set("SubAlias.Permission.Permission", "t2code.alias.use.subalias.", yamlConfiguration);
- Config.set("SubAlias.Permission.CustomNoPermissionMSG", "", yamlConfiguration);
+ T2Cconfig.set("SubAlias.Permission.Necessary", true, yamlConfiguration);
+ T2Cconfig.set("SubAlias.Permission.Permission", "t2code.alias.use.subalias.", yamlConfiguration);
+ T2Cconfig.set("SubAlias.Permission.CustomNoPermissionMSG", "", yamlConfiguration);
- Config.set("SubAlias.Cost.Enable", false,yamlConfiguration);
- Config.set("SubAlias.Cost.Price", 0.0,yamlConfiguration);
- Config.set("SubAlias.Cost.AllowByPass", true,yamlConfiguration);
+ T2Cconfig.set("SubAlias.Cost.Enable", false, yamlConfiguration);
+ T2Cconfig.set("SubAlias.Cost.Price", 0.0, yamlConfiguration);
+ T2Cconfig.set("SubAlias.Cost.AllowByPass", true, yamlConfiguration);
- Config.set("SubAlias.Command.Enable", true, yamlConfiguration);
- Config.set("SubAlias.Command.CommandAsConsole", true, yamlConfiguration);
- Config.set("SubAlias.Command.BungeeCommand", false, yamlConfiguration);
- Config.set("SubAlias.Command.Commands", Collections.singletonList("say hi"), yamlConfiguration);
+ T2Cconfig.set("SubAlias.Command.Enable", true, yamlConfiguration);
+ T2Cconfig.set("SubAlias.Command.CommandAsConsole", true, yamlConfiguration);
+ T2Cconfig.set("SubAlias.Command.BungeeCommand", false, yamlConfiguration);
+ T2Cconfig.set("SubAlias.Command.Commands", Collections.singletonList("say hi"), yamlConfiguration);
- Config.set("SubAlias.Message.Enable", false, yamlConfiguration);
- Config.set("SubAlias.Message.Messages", Collections.emptyList(), yamlConfiguration);
+ T2Cconfig.set("SubAlias.Message.Enable", false, yamlConfiguration);
+ T2Cconfig.set("SubAlias.Message.Messages", Collections.emptyList(), yamlConfiguration);
- Config.set("SubAlias.Admin.Enable", true, yamlConfiguration);
- Config.set("SubAlias.Admin.Permission", "t2code.alias.admin", yamlConfiguration);
+ T2Cconfig.set("SubAlias.Admin.Enable", true, yamlConfiguration);
+ T2Cconfig.set("SubAlias.Admin.Permission", "t2code.alias.admin", yamlConfiguration);
- Config.set("SubAlias.Admin.Command.Enable", true, yamlConfiguration);
- Config.set("SubAlias.Admin.Command.CommandAsConsole", true, yamlConfiguration);
- Config.set("SubAlias.Admin.Command.BungeeCommand", false, yamlConfiguration);
- Config.set("SubAlias.Admin.Command.Commands", Collections.singletonList("say subalias hi"), yamlConfiguration);
+ T2Cconfig.set("SubAlias.Admin.Command.Enable", true, yamlConfiguration);
+ T2Cconfig.set("SubAlias.Admin.Command.CommandAsConsole", true, yamlConfiguration);
+ T2Cconfig.set("SubAlias.Admin.Command.BungeeCommand", false, yamlConfiguration);
+ T2Cconfig.set("SubAlias.Admin.Command.Commands", Collections.singletonList("say subalias hi"), yamlConfiguration);
- Config.set("SubAlias.Admin.Message.Enable", false, yamlConfiguration);
- Config.set("SubAlias.Admin.Message.Messages", Collections.emptyList(), yamlConfiguration);
+ T2Cconfig.set("SubAlias.Admin.Message.Enable", false, yamlConfiguration);
+ T2Cconfig.set("SubAlias.Admin.Message.Messages", Collections.emptyList(), yamlConfiguration);
- Config.set("SubAlias.Console.Enable", false, yamlConfiguration);
- Config.set("SubAlias.Console.Command.Enable", false, yamlConfiguration);
- Config.set("SubAlias.Console.Command.BungeeCommand", false, yamlConfiguration);
- Config.set("SubAlias.Console.Command.Commands", Collections.emptyList(), yamlConfiguration);
- Config.set("SubAlias.Console.Message.Enable", false, yamlConfiguration);
- Config.set("SubAlias.Console.Message.Messages", Collections.emptyList(), yamlConfiguration);
+ T2Cconfig.set("SubAlias.Console.Enable", false, yamlConfiguration);
+ T2Cconfig.set("SubAlias.Console.Command.Enable", false, yamlConfiguration);
+ T2Cconfig.set("SubAlias.Console.Command.BungeeCommand", false, yamlConfiguration);
+ T2Cconfig.set("SubAlias.Console.Command.Commands", Collections.emptyList(), yamlConfiguration);
+ T2Cconfig.set("SubAlias.Console.Message.Enable", false, yamlConfiguration);
+ T2Cconfig.set("SubAlias.Console.Message.Messages", Collections.emptyList(), yamlConfiguration);
try {
yamlConfiguration.save(config);
} catch (IOException e) {
e.printStackTrace();
}
- send.console(Util.getPrefix() + " §2Alias/aliasexample.yml were successfully created." + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
+ T2Csend.console(Util.getPrefix() + " §2Alias/aliasexample.yml were successfully created." + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
}
}
diff --git a/src/main/java/net/t2code/alias/Spigot/config/subAlias/SelectSubAlias.java b/src/main/java/net/t2code/alias/Spigot/config/subAlias/SelectSubAlias.java
index dc343f5..f8807cf 100644
--- a/src/main/java/net/t2code/alias/Spigot/config/subAlias/SelectSubAlias.java
+++ b/src/main/java/net/t2code/alias/Spigot/config/subAlias/SelectSubAlias.java
@@ -5,7 +5,7 @@ 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 net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
import org.bukkit.Bukkit;
import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.YamlConfiguration;
@@ -51,7 +51,7 @@ public class SelectSubAlias {
if (subAliasFor != null) {
String[] imp = subAliasFor.split(" ");
if (!Main.allAliases.contains(imp[0])) {
- send.error(Main.getPlugin(), "The alias " + imp[0] + " in the file " + config_gui.getName() + " does not exist!");
+ T2Csend.error(Main.getPlugin(), "The alias " + imp[0] + " in the file " + config_gui.getName() + " does not exist!");
}
String[] args = subAliasFor.split(" ");
subAliasArg = args.length - 1;
@@ -104,7 +104,7 @@ public class SelectSubAlias {
}
Main.allSubAliases.addAll(subAliasList);
Main.allForSubAliases.add(subAliasFor);
- send.console(Prefix + " §aSubAlias file §e" + config_gui.getName() + " §awas loaded");
+ T2Csend.console(Prefix + " §aSubAlias file §e" + config_gui.getName() + " §awas loaded");
}
}
}
diff --git a/src/main/java/net/t2code/alias/Spigot/system/AliasRegister.java b/src/main/java/net/t2code/alias/Spigot/system/AliasRegister.java
index 6356bdf..c6692f8 100644
--- a/src/main/java/net/t2code/alias/Spigot/system/AliasRegister.java
+++ b/src/main/java/net/t2code/alias/Spigot/system/AliasRegister.java
@@ -1,13 +1,10 @@
package net.t2code.alias.Spigot.system;
import net.t2code.alias.Spigot.Main;
-import net.t2code.alias.Spigot.cmdManagement.AliasCmdExecuter;
import net.t2code.alias.Spigot.cmdManagement.RegisterCommands;
-import net.t2code.lib.Spigot.Lib.messages.send;
-import net.t2code.lib.Spigot.Lib.minecraftVersion.NMSVersion;
+import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandMap;
-import org.bukkit.plugin.Plugin;
import java.lang.reflect.Field;
@@ -26,7 +23,7 @@ public class AliasRegister {
e.printStackTrace();
}
}
- } else send.warning(Main.getPlugin(), " §4AliasHashmap is null! - " + alias);
+ } else T2Csend.warning(Main.getPlugin(), " §4AliasHashmap is null! - " + alias);
}
}
}
diff --git a/src/main/java/net/t2code/alias/Spigot/system/AliasRegisterPermissions.java b/src/main/java/net/t2code/alias/Spigot/system/AliasRegisterPermissions.java
index b80ad84..880a003 100644
--- a/src/main/java/net/t2code/alias/Spigot/system/AliasRegisterPermissions.java
+++ b/src/main/java/net/t2code/alias/Spigot/system/AliasRegisterPermissions.java
@@ -1,7 +1,7 @@
package net.t2code.alias.Spigot.system;
import net.t2code.alias.Spigot.Main;
-import net.t2code.lib.Spigot.Lib.register.Register;
+import net.t2code.t2codelib.SPIGOT.api.register.T2Cregister;
import org.bukkit.Bukkit;
public class AliasRegisterPermissions {
@@ -9,7 +9,7 @@ public class AliasRegisterPermissions {
public static void onPermRegister() {
for (String alias : Main.allAliases){
if (Bukkit.getPluginManager().getPermission("t2code.alias.use." + alias.toLowerCase()) == null) {
- Register.permission("t2code.alias.use." + alias.toLowerCase(), Main.getPlugin());
+ T2Cregister.permission("t2code.alias.use." + alias.toLowerCase(), Main.getPlugin());
}
}
}
diff --git a/src/main/java/net/t2code/alias/Spigot/system/BCommandSenderReciver.java b/src/main/java/net/t2code/alias/Spigot/system/BCommandSenderReciver.java
index e05f0c2..1a96c1a 100644
--- a/src/main/java/net/t2code/alias/Spigot/system/BCommandSenderReciver.java
+++ b/src/main/java/net/t2code/alias/Spigot/system/BCommandSenderReciver.java
@@ -30,10 +30,10 @@ public class BCommandSenderReciver {
}
if (sender instanceof Player) {
Player player = (Player) sender;
- player.sendPluginMessage(Main.getPlugin(), "t2codealias:bungee", stream.toByteArray());
+ player.sendPluginMessage(Main.getPlugin(), "t2c:alias", stream.toByteArray());
}else {
for(Player player : Bukkit.getOnlinePlayers()){
- player.sendPluginMessage(Main.getPlugin(), "t2codealias:bungee", stream.toByteArray());
+ player.sendPluginMessage(Main.getPlugin(), "t2c:alias", stream.toByteArray());
return;
}
}
diff --git a/src/main/java/net/t2code/alias/Spigot/system/JoinEvent.java b/src/main/java/net/t2code/alias/Spigot/system/JoinEvent.java
index 8fb3926..6da3412 100644
--- a/src/main/java/net/t2code/alias/Spigot/system/JoinEvent.java
+++ b/src/main/java/net/t2code/alias/Spigot/system/JoinEvent.java
@@ -4,19 +4,15 @@ package net.t2code.alias.Spigot.system;
import net.t2code.alias.Spigot.Main;
import net.t2code.alias.Util;
-import net.t2code.lib.Spigot.Lib.messages.send;
-import net.t2code.lib.Spigot.Lib.update.UpdateAPI;
-import net.t2code.lib.Spigot.system.config.SelectLibConfig;
-import org.bukkit.entity.Player;
+import net.t2code.t2codelib.SPIGOT.api.update.T2CupdateAPI;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerLoginEvent;
-import org.bukkit.scheduler.BukkitRunnable;
public class JoinEvent implements Listener {
@EventHandler
public void onJoinEvent(PlayerLoginEvent event) {
- UpdateAPI.join(Main.getPlugin(),Util.getPrefix(), "t2code.alias.updatemsg", event.getPlayer(), Util.getSpigot(), Util.getDiscord());
+ T2CupdateAPI.join(Main.getPlugin(),Util.getPrefix(), "t2code.alias.updatemsg", event.getPlayer(), Util.getSpigotID(), Util.getDiscord());
}
}
\ No newline at end of file
diff --git a/src/main/java/net/t2code/alias/Spigot/system/Load.java b/src/main/java/net/t2code/alias/Spigot/system/Load.java
index c9e2ada..8fae57c 100644
--- a/src/main/java/net/t2code/alias/Spigot/system/Load.java
+++ b/src/main/java/net/t2code/alias/Spigot/system/Load.java
@@ -11,13 +11,10 @@ import net.t2code.alias.Spigot.config.languages.SelectMessages;
import net.t2code.alias.Spigot.config.subAlias.CreateExampleSubAliasConfig;
import net.t2code.alias.Spigot.config.subAlias.SelectSubAlias;
import net.t2code.alias.Util;
-import net.t2code.lib.Spigot.Lib.messages.T2CodeTemplate;
-import net.t2code.lib.Spigot.Lib.messages.send;
-import net.t2code.lib.Spigot.Lib.register.Register;
-import net.t2code.lib.Spigot.Lib.update.UpdateAPI;
+import net.t2code.t2codelib.SPIGOT.api.messages.T2Ctemplate;
+import net.t2code.t2codelib.SPIGOT.api.register.T2Cregister;
+import net.t2code.t2codelib.SPIGOT.api.update.T2CupdateAPI;
import org.bukkit.Bukkit;
-import org.bukkit.plugin.Plugin;
-
import java.io.File;
import java.util.List;
@@ -26,13 +23,13 @@ public class Load {
private static Main plugin = Main.getPlugin();
public static void onLoad(String prefix, List autor, String version, String spigot, int spigotID, String discord, int bstatsID) {
- Long long_ = T2CodeTemplate.onLoadHeader(prefix, autor, version, spigot, discord);
+ Long long_ = T2Ctemplate.onLoadHeader(prefix, autor, version, spigot, discord);
plugin.getCommand("t2code-alias").setExecutor(new AliasCmdExecuter());
loadReload();
- UpdateAPI.onUpdateCheck(plugin, prefix, spigot, spigotID, discord);
+ T2CupdateAPI.onUpdateCheck(plugin, prefix, spigotID, discord);
Bukkit.getServer().getPluginManager().registerEvents(new JoinEvent(), plugin);
- T2CodeTemplate.onLoadFooter(prefix, long_, version);
+ T2Ctemplate.onLoadFooter(prefix, long_, version);
Metrics.Bstats(plugin, bstatsID);
}
@@ -63,13 +60,13 @@ public class Load {
LanguagesCreate.langCreate();
SelectConfig.onSelect();
SelectMessages.onSelect(Util.getPrefix());
- T2CodeTemplate.onLoadSeparateStroke(Util.getPrefix());
+ T2Ctemplate.onLoadSeparateStroke(Util.getPrefix());
SelectAlias.onSelect();
- T2CodeTemplate.onLoadSeparateStroke(Util.getPrefix());
+ T2Ctemplate.onLoadSeparateStroke(Util.getPrefix());
SelectSubAlias.onSelect();
SelectConfig.setConfigVersion();
if (SelectConfig.subAliasTab) {
- Register.listener(new TabEvent(), plugin);
+ T2Cregister.listener(new TabEvent(), plugin);
}
if (SelectConfig.Bungee) {
diff --git a/src/main/java/net/t2code/alias/Util.java b/src/main/java/net/t2code/alias/Util.java
index 6a533fe..4c6d2e3 100644
--- a/src/main/java/net/t2code/alias/Util.java
+++ b/src/main/java/net/t2code/alias/Util.java
@@ -1,38 +1,39 @@
package net.t2code.alias;
public class Util {
- private static String requiredT2CodeLibVersion = "12.5";
- private static String Prefix = "§8[§4T2Code§7-§aAlias§8]";
- private static Integer SpigotID = 96389;
- private static Integer BstatsID = 12517;
- private static String Spigot = "https://www.spigotmc.org/resources/" + SpigotID;
- private static String Discord = "http://dc.t2code.net";
+
+
+ public static String getInfoText() {
+ return "";
+ }
public static String getRequiredT2CodeLibVersion() {
- return requiredT2CodeLibVersion;
+ return "13.0";
}
public static String getPrefix() {
- return Prefix;
+ return prefix;
}
public static Integer getSpigotID() {
- return SpigotID;
+ return 96389;
}
public static Integer getBstatsID() {
- return BstatsID;
+ return 12517;
}
public static String getSpigot() {
- return Spigot;
+ return "https://www.spigotmc.org/resources/" + getSpigotID();
}
public static String getDiscord() {
- return Discord;
+ return "http://dc.t2code.net";
}
- public static void setPrefix(String prefix) {
- Prefix = prefix;
+ public static void setPrefix(String pr) {
+ prefix = pr;
}
+
+ private static String prefix = "§8[§4T2Code§7-§aAlias§8]";
}
diff --git a/src/main/resources/bungee.yml b/src/main/resources/bungee.yml
deleted file mode 100644
index e5345e8..0000000
--- a/src/main/resources/bungee.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-name: T2C-Alias
-version: ${project.version}
-main: net.t2code.alias.Bungee.BMain
-description: T2Code Alias Plugin
-author: JaTiTV
-softdepends: [T2CodeLib]