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">
<artifact type="jar" name="T2CodeLib_10.3">
<artifact type="jar" name="T2CodeLib_10.4">
<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" />
</root>
</artifact>

View File

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

View File

@ -14,8 +14,12 @@ import java.util.List;
import java.util.logging.Level;
public class T2CodeTemplate {
public static Long onLoadHeader(String prefix, List autor, String version, String spigot, String discord) {
Long long_ = Long.valueOf(System.currentTimeMillis());
public static Long onLoadHeader(String prefix, List<String> autor, String version, String spigot, String discord) {
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 _______ §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| §2Spigot: §6" + spigot);
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-------------------");
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!");
@ -43,7 +52,7 @@ public class T2CodeTemplate {
}
public static Long onLoadHeader(String prefix) {
Long long_ = Long.valueOf(System.currentTimeMillis());
Long long_ = System.currentTimeMillis();
send.console(prefix + "§4===================== " + prefix + " §4=====================");
return long_;
}
@ -54,17 +63,17 @@ public class T2CodeTemplate {
public static void onLoadFooter(String prefix, Long long_, String version) {
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=====================");
}
public static void onLoadFooter(String prefix, Long long_) {
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=====================");
}
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 + " §2Autor: §6" + String.valueOf(autor).replace("[", "").replace("]", ""));
//send.console(prefix + " §2Version: §6" + version);
@ -76,13 +85,13 @@ public class T2CodeTemplate {
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 + " §2Autor: §6" + String.valueOf(autor).replace("[", "").replace("]", ""));
if (sender instanceof Player) {
TextComponent comp2 = new TextBuilder(prefix + " §2Version: §6" + pluginVersion)
.addHover("§8Click to copy").addClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, Replace.removeColorCode(prefix) +" - "+ pluginVersion).build();
.addHover("§8Click to copy").addClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, Replace.removeColorCode(prefix) + " - " + pluginVersion).build();
sender.spigot().sendMessage(comp2);
if (!publicVersion.equalsIgnoreCase(pluginVersion)) {
UpdateAPI.sendUpdateMsg(prefix, spigot, discord, pluginVersion, publicVersion, (Player) sender);
@ -103,6 +112,15 @@ public class T2CodeTemplate {
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=======");
}
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
version: 10.3
version: 10.4
main: net.t2code.lib.Bungee.BMain
author: JaTiTV, Jkobs
description: Libarie from T2Code Plugins

View File

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