diff --git a/.idea/artifacts/T2CodeLib_10_5.xml b/.idea/artifacts/T2CodeLib_10_5.xml
deleted file mode 100644
index 137a23c..0000000
--- a/.idea/artifacts/T2CodeLib_10_5.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
- $PROJECT_DIR$/../../Plugins/T2CodeLib/.jar
-
-
-
-
-
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 62b5578..63d1984 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
net.t2code
T2CodeLib
- 10.5
+ 10.6
jar
T2CodeLib
diff --git a/src/main/java/net/t2code/lib/Bungee/Lib/messages/BT2CodeTemplate.java b/src/main/java/net/t2code/lib/Bungee/Lib/messages/BT2CodeTemplate.java
index 2e64c77..f7428a9 100644
--- a/src/main/java/net/t2code/lib/Bungee/Lib/messages/BT2CodeTemplate.java
+++ b/src/main/java/net/t2code/lib/Bungee/Lib/messages/BT2CodeTemplate.java
@@ -1,5 +1,12 @@
package net.t2code.lib.Bungee.Lib.messages;
+import net.md_5.bungee.api.CommandSender;
+import net.md_5.bungee.api.ProxyServer;
+import net.md_5.bungee.api.chat.ClickEvent;
+import net.md_5.bungee.api.chat.TextComponent;
+import net.md_5.bungee.api.connection.ProxiedPlayer;
+import net.t2code.lib.Bungee.Lib.update.BUpdateAPI;
+
import java.util.List;
public class BT2CodeTemplate {
@@ -15,6 +22,7 @@ public class BT2CodeTemplate {
Bsend.console(prefix + " §8-------------------------------");
return long_;
}
+
public static void onLoadSeparateStroke(String prefix) {
Bsend.console(prefix + " §8-------------------------------");
}
@@ -35,4 +43,16 @@ public class BT2CodeTemplate {
Bsend.console(prefix + "§4============================= " + prefix + " §4=============================");
}
+ public static void sendInfo(CommandSender sender, String prefix, String spigot, String discord, String autor, String pluginVersion, String publicVersion) {
+ Bsend.sender(sender, prefix + "§4======= " + prefix + " §4=======");
+ Bsend.sender(sender, prefix + " §2Autor: §6" + autor);
+ if (publicVersion.equalsIgnoreCase(pluginVersion)) {
+ Bsend.sender(sender, prefix + " §2Version: §6" + pluginVersion);
+ } else {
+ BUpdateAPI.sendUpdateMsg(prefix, spigot, discord, pluginVersion, publicVersion, sender);
+ }
+ Bsend.sender(sender, prefix + " §2Spigot: §6" + spigot);
+ Bsend.sender(sender, prefix + " §2Discord: §6" + discord);
+ Bsend.sender(sender, prefix + "§4======= " + prefix + " §4=======");
+ }
}
diff --git a/src/main/java/net/t2code/lib/Bungee/Lib/plugins/BPluginCheck.java b/src/main/java/net/t2code/lib/Bungee/Lib/plugins/BPluginCheck.java
new file mode 100644
index 0000000..c99a5e7
--- /dev/null
+++ b/src/main/java/net/t2code/lib/Bungee/Lib/plugins/BPluginCheck.java
@@ -0,0 +1,78 @@
+package net.t2code.lib.Bungee.Lib.plugins;
+
+import net.md_5.bungee.api.ProxyServer;
+import net.md_5.bungee.api.plugin.Plugin;
+import net.t2code.lib.Bungee.BMain;
+import net.t2code.lib.Spigot.system.Main;
+
+import java.util.logging.Level;
+
+public class BPluginCheck {
+ public static Boolean pluginCheck(String pluginName){
+ return (ProxyServer.getInstance().getPluginManager().getPlugin(pluginName) != null);
+ }
+ public static Plugin pluginInfos(String pluginName){
+ return (ProxyServer.getInstance().getPluginManager().getPlugin(pluginName));
+ }
+ public static Boolean papi(){
+ return ProxyServer.getInstance().getPluginManager().getPlugin("PlaceholderAPI") != null;
+ }
+ public static Boolean vault(){
+ return ProxyServer.getInstance().getPluginManager().getPlugin("Vault") != null;
+ }
+ public static Boolean plotSquared(){
+ return ProxyServer.getInstance().getPluginManager().getPlugin("PlotSquared") != null;
+ }
+ public static Boolean plugManGUI(){
+ return ProxyServer.getInstance().getPluginManager().getPlugin("PlugManGUI") != null;
+ }
+ public static Boolean cmi(){
+ return ProxyServer.getInstance().getPluginManager().getPlugin("CMI") != null;
+ }
+
+
+ /**
+ * T2Code Plugins
+ * @return
+ */
+ public static Boolean cgui(){
+ return ProxyServer.getInstance().getPluginManager().getPlugin("CommandGUI") != null;
+ }
+ public static Boolean plotSquaredGUI(){
+ return ProxyServer.getInstance().getPluginManager().getPlugin("PlotSquaredGUI") != null;
+ }
+ public static Boolean luckyBox(){
+ return ProxyServer.getInstance().getPluginManager().getPlugin("T2C-LuckyBox") != null;
+ }
+ public static Boolean opSec(){
+ return ProxyServer.getInstance().getPluginManager().getPlugin("OPSecurity") != null;
+ }
+ public static Boolean papiTest(){
+ return ProxyServer.getInstance().getPluginManager().getPlugin("PaPiTest") != null;
+ }
+ public static Boolean booster(){
+ return ProxyServer.getInstance().getPluginManager().getPlugin("Booster") != null;
+ }
+ public static Boolean antiMapCopy(){
+ return ProxyServer.getInstance().getPluginManager().getPlugin("AAntiMapCopy") != null;
+ }
+ public static Boolean loreEditor(){
+ return ProxyServer.getInstance().getPluginManager().getPlugin("LoreEditor") != null;
+ }
+ public static Boolean t2cAlias(){
+ return ProxyServer.getInstance().getPluginManager().getPlugin("T2C-Alias") != null;
+ }
+ public static Boolean t2cWarp(){
+ return ProxyServer.getInstance().getPluginManager().getPlugin("T2C-Warp") != null;
+ }
+
+ public static Boolean pluginNotFound(Plugin plugin, String prefix, String pl, Integer spigotID) {
+ if (ProxyServer.getInstance().getPluginManager().getPlugin(pl) == null) {
+ plugin.getLogger().log(Level.SEVERE, "Plugin can not be loaded!");
+ ProxyServer.getInstance().getConsole().sendMessage(prefix + " §e" + pl + " §4could not be found. Please download it here: " +
+ "§6https://spigotmc.org/resources/" + pl + "." + spigotID + " §4to be able to use this plugin.");
+ BMain.plugin.getProxy().getPluginManager().getPlugin(plugin.getDescription().getName()).onDisable();
+ return true;
+ } else return false;
+ }
+}
diff --git a/src/main/java/net/t2code/lib/Bungee/Lib/update/BUpdateAPI.java b/src/main/java/net/t2code/lib/Bungee/Lib/update/BUpdateAPI.java
index 275d96c..5b75996 100644
--- a/src/main/java/net/t2code/lib/Bungee/Lib/update/BUpdateAPI.java
+++ b/src/main/java/net/t2code/lib/Bungee/Lib/update/BUpdateAPI.java
@@ -1,10 +1,12 @@
package net.t2code.lib.Bungee.Lib.update;
+import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.plugin.Plugin;
import net.t2code.lib.Bungee.Lib.messages.Bsend;
import net.t2code.lib.Spigot.Lib.update.UpdateObject;
+
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
@@ -15,6 +17,7 @@ import java.util.function.Consumer;
public class BUpdateAPI {
public static HashMap bungeePluginVersionen = new HashMap();
+
public static void sendUpdateMsg(String Prefix, String Spigot, String Discord, String foundVersion, String update_version) {
Bsend.console("§4=========== " + Prefix + " §4===========");
Bsend.console("§6A new version was found!");
@@ -23,6 +26,14 @@ public class BUpdateAPI {
Bsend.console("§6You can find more information on Discord: §e" + Discord);
Bsend.console("§4=========== " + Prefix + " §4===========");
}
+ public static void sendUpdateMsg(String Prefix, String Spigot, String Discord, String foundVersion, String update_version, CommandSender sender) {
+ Bsend.sender(sender,"§4=========== " + Prefix + " §4===========");
+ Bsend.sender(sender,"§6A new version was found!");
+ Bsend.sender(sender,"§6Your version: §c" + foundVersion + " §7- §6Current version: §a" + update_version);
+ Bsend.sender(sender,"§6You can download it here: §e" + Spigot);
+ Bsend.sender(sender,"§6You can find more information on Discord: §e" + Discord);
+ Bsend.sender(sender,"§4=========== " + Prefix + " §4===========");
+ }
private static Boolean noUpdate = true;
private static String pluginVersion;
public static void onUpdateCheckTimer(Plugin plugin, String Prefix, String Spigot, String Discord, Integer SpigotID) {
diff --git a/src/main/java/net/t2code/lib/Spigot/Lib/replace/Replace.java b/src/main/java/net/t2code/lib/Spigot/Lib/replace/Replace.java
index fe7766e..6e2fd20 100644
--- a/src/main/java/net/t2code/lib/Spigot/Lib/replace/Replace.java
+++ b/src/main/java/net/t2code/lib/Spigot/Lib/replace/Replace.java
@@ -4,7 +4,6 @@ import me.clip.placeholderapi.PlaceholderAPI;
import org.bukkit.entity.Player;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collections;
import java.util.List;
diff --git a/target/classes/bungee.yml b/target/classes/bungee.yml
index 81cb48e..fb7db01 100644
--- a/target/classes/bungee.yml
+++ b/target/classes/bungee.yml
@@ -1,5 +1,5 @@
name: T2CodeLib
-version: 10.5
+version: 10.6
main: net.t2code.lib.Bungee.BMain
author: JaTiTV, Jkobs
description: Libarie from T2Code Plugins
\ No newline at end of file
diff --git a/target/classes/net/t2code/lib/Bungee/Lib/messages/BT2CodeTemplate.class b/target/classes/net/t2code/lib/Bungee/Lib/messages/BT2CodeTemplate.class
index f85fcd0..e8e9f88 100644
Binary files a/target/classes/net/t2code/lib/Bungee/Lib/messages/BT2CodeTemplate.class and b/target/classes/net/t2code/lib/Bungee/Lib/messages/BT2CodeTemplate.class differ
diff --git a/target/classes/net/t2code/lib/Bungee/Lib/update/BUpdateAPI$1.class b/target/classes/net/t2code/lib/Bungee/Lib/update/BUpdateAPI$1.class
index 4a849b1..0a22dca 100644
Binary files a/target/classes/net/t2code/lib/Bungee/Lib/update/BUpdateAPI$1.class and b/target/classes/net/t2code/lib/Bungee/Lib/update/BUpdateAPI$1.class differ
diff --git a/target/classes/net/t2code/lib/Bungee/Lib/update/BUpdateAPI.class b/target/classes/net/t2code/lib/Bungee/Lib/update/BUpdateAPI.class
index 8eca46e..e6c578b 100644
Binary files a/target/classes/net/t2code/lib/Bungee/Lib/update/BUpdateAPI.class and b/target/classes/net/t2code/lib/Bungee/Lib/update/BUpdateAPI.class differ
diff --git a/target/classes/net/t2code/lib/Spigot/Lib/replace/Replace.class b/target/classes/net/t2code/lib/Spigot/Lib/replace/Replace.class
index ef66275..696f7b2 100644
Binary files a/target/classes/net/t2code/lib/Spigot/Lib/replace/Replace.class and b/target/classes/net/t2code/lib/Spigot/Lib/replace/Replace.class differ
diff --git a/target/classes/plugin.yml b/target/classes/plugin.yml
index 6e1d449..10354ae 100644
--- a/target/classes/plugin.yml
+++ b/target/classes/plugin.yml
@@ -1,5 +1,5 @@
name: T2CodeLib
-version: 10.5
+version: 10.6
main: net.t2code.lib.Spigot.system.Main
api-version: 1.13
prefix: T2CodeLib