Minor change for premium plugins from T2Code
This commit is contained in:
JaTiTV 2022-01-16 06:56:58 +01:00
parent ac9972601c
commit a50f779b16
6 changed files with 31 additions and 13 deletions

View File

@ -1,7 +1,7 @@
<component name="ArtifactManager"> <component name="ArtifactManager">
<artifact type="jar" name="T2CodeLib_10.3"> <artifact type="jar" name="T2CodeLib_10.4">
<output-path>$PROJECT_DIR$/../../Plugins/T2CodeLib/.jar</output-path> <output-path>$PROJECT_DIR$/../../Plugins/T2CodeLib/.jar</output-path>
<root id="archive" name="T2CodeLib_10.3.jar"> <root id="archive" name="T2CodeLib_10.4.jar">
<element id="module-output" name="T2CodeLib" /> <element id="module-output" name="T2CodeLib" />
</root> </root>
</artifact> </artifact>

View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId> <groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId> <artifactId>T2CodeLib</artifactId>
<version>10.3</version> <version>10.4</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>T2CodeLib</name> <name>T2CodeLib</name>

View File

@ -14,8 +14,12 @@ import java.util.List;
import java.util.logging.Level; 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);
}
public static Long onLoadHeader(String prefix, List<String> autor, String version, String spigot, String discord, Boolean isPremium) {
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 +32,11 @@ 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");
}
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 +52,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 +63,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 +85,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 +112,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);
}
} }

View File

@ -1,5 +1,5 @@
name: T2CodeLib name: T2CodeLib
version: 10.3 version: 10.4
main: net.t2code.lib.Bungee.BMain main: net.t2code.lib.Bungee.BMain
author: JaTiTV, Jkobs author: JaTiTV, Jkobs
description: Libarie from T2Code Plugins description: Libarie from T2Code Plugins

View File

@ -1,5 +1,5 @@
name: T2CodeLib name: T2CodeLib
version: 10.3 version: 10.4
main: net.t2code.lib.Spigot.system.Main main: net.t2code.lib.Spigot.system.Main
api-version: 1.13 api-version: 1.13
prefix: T2CodeLib prefix: T2CodeLib