Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
8debd90a6c | |||
a50f779b16 | |||
ac9972601c | |||
|
ad5d7e09ea | ||
|
c564cdead1 | ||
2db5be7d56 |
@@ -1,7 +1,7 @@
|
|||||||
<component name="ArtifactManager">
|
<component name="ArtifactManager">
|
||||||
<artifact type="jar" name="T2CodeLib_10.1">
|
<artifact type="jar" name="T2CodeLib_10.5">
|
||||||
<output-path>$PROJECT_DIR$/../../Plugins/T2CodeLib/.jar</output-path>
|
<output-path>$PROJECT_DIR$/../../Plugins/T2CodeLib/.jar</output-path>
|
||||||
<root id="archive" name="T2CodeLib_10.1.jar">
|
<root id="archive" name="T2CodeLib_10.5.jar">
|
||||||
<element id="module-output" name="T2CodeLib" />
|
<element id="module-output" name="T2CodeLib" />
|
||||||
</root>
|
</root>
|
||||||
</artifact>
|
</artifact>
|
2
pom.xml
2
pom.xml
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>net.t2code</groupId>
|
<groupId>net.t2code</groupId>
|
||||||
<artifactId>T2CodeLib</artifactId>
|
<artifactId>T2CodeLib</artifactId>
|
||||||
<version>10.1</version>
|
<version>10.5</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>T2CodeLib</name>
|
<name>T2CodeLib</name>
|
||||||
|
@@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -40,8 +40,8 @@ public class PluginCheck {
|
|||||||
public static Boolean plotSquaredGUI(){
|
public static Boolean plotSquaredGUI(){
|
||||||
return Bukkit.getPluginManager().getPlugin("PlotSquaredGUI") != null;
|
return Bukkit.getPluginManager().getPlugin("PlotSquaredGUI") != null;
|
||||||
}
|
}
|
||||||
public static Boolean wbs(){
|
public static Boolean luckyBox(){
|
||||||
return Bukkit.getPluginManager().getPlugin("WonderBagShop") != null;
|
return Bukkit.getPluginManager().getPlugin("T2C-LuckyBox") != null;
|
||||||
}
|
}
|
||||||
public static Boolean opSec(){
|
public static Boolean opSec(){
|
||||||
return Bukkit.getPluginManager().getPlugin("OPSecurity") != null;
|
return Bukkit.getPluginManager().getPlugin("OPSecurity") != null;
|
||||||
|
@@ -26,18 +26,17 @@ public class UpdateAPI {
|
|||||||
|
|
||||||
public static void join(Plugin plugin, String prefix, String perm, Player player, String spigot, String discord) {
|
public static void join(Plugin plugin, String prefix, String perm, Player player, String spigot, String discord) {
|
||||||
String pluginVersion = plugin.getDescription().getVersion();
|
String pluginVersion = plugin.getDescription().getVersion();
|
||||||
String publicVersion = UpdateAPI.PluginVersionen.get(plugin.getName()).publicVersion;
|
|
||||||
if (!player.hasPermission(perm) || !player.isOp()) {
|
if (!player.hasPermission(perm) || !player.isOp()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (publicVersion == null) {
|
if (UpdateAPI.PluginVersionen.get(plugin.getName()) == null) {
|
||||||
new BukkitRunnable() {
|
new BukkitRunnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
join(plugin, prefix, perm, player, spigot, discord);
|
join(plugin, prefix, perm, player, spigot, discord);
|
||||||
}
|
}
|
||||||
}.runTaskLater(plugin, 20L);
|
}.runTaskLater(plugin, 20L);
|
||||||
} else use(plugin, prefix, player, pluginVersion, publicVersion, spigot, discord);
|
} else use(plugin, prefix, player, pluginVersion, UpdateAPI.PluginVersionen.get(plugin.getName()).publicVersion, spigot, discord);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void use(Plugin plugin, String prefix, Player player, String pluginVersion, String publicVersion, String spigot, String discord) {
|
private static void use(Plugin plugin, String prefix, Player player, String pluginVersion, String publicVersion, String spigot, String discord) {
|
||||||
|
@@ -21,7 +21,6 @@ import org.bukkit.plugin.java.JavaPlugin;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public final class Main extends JavaPlugin {
|
public final class Main extends JavaPlugin {
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
name: T2CodeLib
|
name: T2CodeLib
|
||||||
version: 10.1
|
version: 10.5
|
||||||
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
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,5 @@
|
|||||||
name: T2CodeLib
|
name: T2CodeLib
|
||||||
version: 10.1
|
version: 10.5
|
||||||
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
|
||||||
|
Reference in New Issue
Block a user