|
|
@@ -4,18 +4,21 @@ import net.md_5.bungee.api.chat.ClickEvent;
|
|
|
|
import net.md_5.bungee.api.chat.TextComponent;
|
|
|
|
import net.md_5.bungee.api.chat.TextComponent;
|
|
|
|
import net.t2code.lib.Spigot.Lib.replace.Replace;
|
|
|
|
import net.t2code.lib.Spigot.Lib.replace.Replace;
|
|
|
|
import net.t2code.lib.Spigot.Lib.update.UpdateAPI;
|
|
|
|
import net.t2code.lib.Spigot.Lib.update.UpdateAPI;
|
|
|
|
import net.t2code.lib.Spigot.system.Main;
|
|
|
|
|
|
|
|
import org.bukkit.Bukkit;
|
|
|
|
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
import org.bukkit.plugin.Plugin;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.logging.Level;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class T2CodeTemplate {
|
|
|
|
public class T2CodeTemplate {
|
|
|
|
public static Long onLoadHeader(String prefix, List autor, String version, String spigot, String discord) {
|
|
|
|
public static Long onLoadHeader(String prefix, List<String> autor, String version, String spigot, String discord) {
|
|
|
|
Long long_ = Long.valueOf(System.currentTimeMillis());
|
|
|
|
return onLoadHeader(prefix, autor, version, spigot, discord, null, null);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public static Long onLoadHeader(String prefix, List<String> autor, String version, String spigot, String discord, Boolean isPremium) {
|
|
|
|
|
|
|
|
return onLoadHeader(prefix, autor, version, spigot, discord, isPremium, null);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static Long onLoadHeader(String prefix, List<String> autor, String version, String spigot, String discord, Boolean isPremium, Boolean isVerify) {
|
|
|
|
|
|
|
|
Long long_ = System.currentTimeMillis();
|
|
|
|
// send.console(prefix +" §4===================== " + prefix + " §4=====================");
|
|
|
|
// send.console(prefix +" §4===================== " + prefix + " §4=====================");
|
|
|
|
send.console(prefix + " §4 _______ §7___ §4_____ ");
|
|
|
|
send.console(prefix + " §4 _______ §7___ §4_____ ");
|
|
|
|
send.console(prefix + " §4 |__ __|§7__ \\ §4/ ____|");
|
|
|
|
send.console(prefix + " §4 |__ __|§7__ \\ §4/ ____|");
|
|
|
@@ -28,6 +31,16 @@ public class T2CodeTemplate {
|
|
|
|
send.console(prefix + " §4 §e| §2Version: §6" + version);
|
|
|
|
send.console(prefix + " §4 §e| §2Version: §6" + version);
|
|
|
|
send.console(prefix + " §4 §e| §2Spigot: §6" + spigot);
|
|
|
|
send.console(prefix + " §4 §e| §2Spigot: §6" + spigot);
|
|
|
|
send.console(prefix + " §4 §e| §2Discord: §6" + discord);
|
|
|
|
send.console(prefix + " §4 §e| §2Discord: §6" + discord);
|
|
|
|
|
|
|
|
if (isPremium != null) {
|
|
|
|
|
|
|
|
if (isPremium) {
|
|
|
|
|
|
|
|
send.console(prefix + " §4 §e| §6Premium: §2true");
|
|
|
|
|
|
|
|
} else send.console(prefix + " §4 §e| §6Premium: §4false");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (isVerify != null) {
|
|
|
|
|
|
|
|
if (isVerify) {
|
|
|
|
|
|
|
|
send.console(prefix + " §4 §e| §6Verify: §2true");
|
|
|
|
|
|
|
|
} else send.console(prefix + " §4 §e| §6Verify: §4false");
|
|
|
|
|
|
|
|
}
|
|
|
|
send.console(prefix + " §4 §e-------------------");
|
|
|
|
send.console(prefix + " §4 §e-------------------");
|
|
|
|
if (version.toLowerCase().contains("dev") || version.toLowerCase().contains("snapshot") || version.toLowerCase().contains("beta")) {
|
|
|
|
if (version.toLowerCase().contains("dev") || version.toLowerCase().contains("snapshot") || version.toLowerCase().contains("beta")) {
|
|
|
|
send.console(prefix + " §eYou are running §4" + version + " §eof " + prefix + "§e! Some features may not be working as expected. Please report all bugs here: http://dc.t2code.net §4UpdateChecker & bStats may be disabled!");
|
|
|
|
send.console(prefix + " §eYou are running §4" + version + " §eof " + prefix + "§e! Some features may not be working as expected. Please report all bugs here: http://dc.t2code.net §4UpdateChecker & bStats may be disabled!");
|
|
|
@@ -43,7 +56,7 @@ public class T2CodeTemplate {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static Long onLoadHeader(String prefix) {
|
|
|
|
public static Long onLoadHeader(String prefix) {
|
|
|
|
Long long_ = Long.valueOf(System.currentTimeMillis());
|
|
|
|
Long long_ = System.currentTimeMillis();
|
|
|
|
send.console(prefix + "§4===================== " + prefix + " §4=====================");
|
|
|
|
send.console(prefix + "§4===================== " + prefix + " §4=====================");
|
|
|
|
return long_;
|
|
|
|
return long_;
|
|
|
|
}
|
|
|
|
}
|
|
|
@@ -54,17 +67,17 @@ public class T2CodeTemplate {
|
|
|
|
|
|
|
|
|
|
|
|
public static void onLoadFooter(String prefix, Long long_, String version) {
|
|
|
|
public static void onLoadFooter(String prefix, Long long_, String version) {
|
|
|
|
onLoadSeparateStroke(prefix);
|
|
|
|
onLoadSeparateStroke(prefix);
|
|
|
|
send.console(prefix + " §2Plugin loaded successfully." + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
|
|
|
send.console(prefix + " §2Plugin loaded successfully." + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
|
|
|
|
// send.console(prefix +" §4===================== " + prefix + "§4=====================");
|
|
|
|
// send.console(prefix +" §4===================== " + prefix + "§4=====================");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void onLoadFooter(String prefix, Long long_) {
|
|
|
|
public static void onLoadFooter(String prefix, Long long_) {
|
|
|
|
onLoadSeparateStroke(prefix);
|
|
|
|
onLoadSeparateStroke(prefix);
|
|
|
|
send.console(prefix + " §2Plugin loaded successfully." + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
|
|
|
send.console(prefix + " §2Plugin loaded successfully." + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
|
|
|
|
// send.console(prefix +" §4===================== " + prefix + "§4=====================");
|
|
|
|
// send.console(prefix +" §4===================== " + prefix + "§4=====================");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void onDisable(String prefix, List autor, String version, String spigot, String discord) {
|
|
|
|
public static void onDisable(String prefix, List<String> autor, String version, String spigot, String discord) {
|
|
|
|
//send.console(prefix + "§4===================== " + prefix + " §7- §6" + version + " §4=====================");
|
|
|
|
//send.console(prefix + "§4===================== " + prefix + " §7- §6" + version + " §4=====================");
|
|
|
|
//send.console(prefix + " §2Autor: §6" + String.valueOf(autor).replace("[", "").replace("]", ""));
|
|
|
|
//send.console(prefix + " §2Autor: §6" + String.valueOf(autor).replace("[", "").replace("]", ""));
|
|
|
|
//send.console(prefix + " §2Version: §6" + version);
|
|
|
|
//send.console(prefix + " §2Version: §6" + version);
|
|
|
@@ -76,7 +89,7 @@ public class T2CodeTemplate {
|
|
|
|
send.console(prefix + " §4Plugin successfully disabled.");
|
|
|
|
send.console(prefix + " §4Plugin successfully disabled.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void sendInfo(CommandSender sender, String prefix, String spigot, String discord, List autor, String pluginVersion, String publicVersion) {
|
|
|
|
public static void sendInfo(CommandSender sender, String prefix, String spigot, String discord, List<String> autor, String pluginVersion, String publicVersion, Boolean isPremium) {
|
|
|
|
send.sender(sender, prefix + "§4======= " + prefix + " §4=======");
|
|
|
|
send.sender(sender, prefix + "§4======= " + prefix + " §4=======");
|
|
|
|
send.sender(sender, prefix + " §2Autor: §6" + String.valueOf(autor).replace("[", "").replace("]", ""));
|
|
|
|
send.sender(sender, prefix + " §2Autor: §6" + String.valueOf(autor).replace("[", "").replace("]", ""));
|
|
|
|
if (sender instanceof Player) {
|
|
|
|
if (sender instanceof Player) {
|
|
|
@@ -103,6 +116,15 @@ public class T2CodeTemplate {
|
|
|
|
send.sender(sender, prefix + " §2Discord: §6" + discord);
|
|
|
|
send.sender(sender, prefix + " §2Discord: §6" + discord);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (isPremium != null) {
|
|
|
|
|
|
|
|
if (isPremium) {
|
|
|
|
|
|
|
|
send.sender(sender, prefix + " §6Premium: §2true");
|
|
|
|
|
|
|
|
} else send.sender(sender, prefix + " §6Premium: §4false");
|
|
|
|
|
|
|
|
}
|
|
|
|
send.sender(sender, prefix + "§4======= " + prefix + " §4=======");
|
|
|
|
send.sender(sender, prefix + "§4======= " + prefix + " §4=======");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void sendInfo(CommandSender sender, String prefix, String spigot, String discord, List<String> autor, String pluginVersion, String publicVersion) {
|
|
|
|
|
|
|
|
sendInfo(sender, prefix, spigot, discord, autor, pluginVersion, publicVersion, null);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|