Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
810e61f0e2 | |||
15f2a5d422 | |||
8482f7f787 | |||
2f4fe4651e | |||
dd433b26ea | |||
5725251c18 | |||
daed92b022 | |||
8a76bcb2c7 |
114
.gitignore
vendored
Normal file
114
.gitignore
vendored
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
# User-specific stuff
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
*.iws
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
out/
|
||||||
|
|
||||||
|
# Compiled class file
|
||||||
|
*.class
|
||||||
|
|
||||||
|
# Log file
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# BlueJ files
|
||||||
|
*.ctxt
|
||||||
|
|
||||||
|
# Package Files #
|
||||||
|
*.jar
|
||||||
|
*.war
|
||||||
|
*.nar
|
||||||
|
*.ear
|
||||||
|
*.zip
|
||||||
|
*.tar.gz
|
||||||
|
*.rar
|
||||||
|
|
||||||
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
|
hs_err_pid*
|
||||||
|
|
||||||
|
*~
|
||||||
|
|
||||||
|
# temporary files which can be created if a process still has a handle open of a deleted file
|
||||||
|
.fuse_hidden*
|
||||||
|
|
||||||
|
# KDE directory preferences
|
||||||
|
.directory
|
||||||
|
|
||||||
|
# Linux trash folder which might appear on any partition or disk
|
||||||
|
.Trash-*
|
||||||
|
|
||||||
|
# .nfs files are created when an open file is removed but is still being accessed
|
||||||
|
.nfs*
|
||||||
|
|
||||||
|
# General
|
||||||
|
.DS_Store
|
||||||
|
.AppleDouble
|
||||||
|
.LSOverride
|
||||||
|
|
||||||
|
# Icon must end with two \r
|
||||||
|
Icon
|
||||||
|
|
||||||
|
# Thumbnails
|
||||||
|
._*
|
||||||
|
|
||||||
|
# Files that might appear in the root of a volume
|
||||||
|
.DocumentRevisions-V100
|
||||||
|
.fseventsd
|
||||||
|
.Spotlight-V100
|
||||||
|
.TemporaryItems
|
||||||
|
.Trashes
|
||||||
|
.VolumeIcon.icns
|
||||||
|
.com.apple.timemachine.donotpresent
|
||||||
|
|
||||||
|
# Directories potentially created on remote AFP share
|
||||||
|
.AppleDB
|
||||||
|
.AppleDesktop
|
||||||
|
Network Trash Folder
|
||||||
|
Temporary Items
|
||||||
|
.apdisk
|
||||||
|
|
||||||
|
# Windows thumbnail cache files
|
||||||
|
Thumbs.db
|
||||||
|
Thumbs.db:encryptable
|
||||||
|
ehthumbs.db
|
||||||
|
ehthumbs_vista.db
|
||||||
|
|
||||||
|
# Dump file
|
||||||
|
*.stackdump
|
||||||
|
|
||||||
|
# Folder config file
|
||||||
|
[Dd]esktop.ini
|
||||||
|
|
||||||
|
# Recycle Bin used on file shares
|
||||||
|
$RECYCLE.BIN/
|
||||||
|
|
||||||
|
# Windows Installer files
|
||||||
|
*.cab
|
||||||
|
*.msi
|
||||||
|
*.msix
|
||||||
|
*.msm
|
||||||
|
*.msp
|
||||||
|
|
||||||
|
# Windows shortcuts
|
||||||
|
*.lnk
|
||||||
|
|
||||||
|
target/
|
||||||
|
target\
|
||||||
|
|
||||||
|
pom.xml.tag
|
||||||
|
pom.xml.releaseBackup
|
||||||
|
pom.xml.versionsBackup
|
||||||
|
pom.xml.next
|
||||||
|
|
||||||
|
release.properties
|
||||||
|
dependency-reduced-pom.xml
|
||||||
|
buildNumber.properties
|
||||||
|
.mvn/timing.properties
|
||||||
|
.mvn/wrapper/maven-wrapper.jar
|
||||||
|
.flattened-pom.xml
|
||||||
|
|
||||||
|
# Common working directory
|
||||||
|
run/
|
8
.idea/artifacts/T2CodeLib_10_5.xml
generated
8
.idea/artifacts/T2CodeLib_10_5.xml
generated
@@ -1,8 +0,0 @@
|
|||||||
<component name="ArtifactManager">
|
|
||||||
<artifact type="jar" name="T2CodeLib_10.5">
|
|
||||||
<output-path>$PROJECT_DIR$/../../Plugins/T2CodeLib/.jar</output-path>
|
|
||||||
<root id="archive" name="T2CodeLib_10.5.jar">
|
|
||||||
<element id="module-output" name="T2CodeLib" />
|
|
||||||
</root>
|
|
||||||
</artifact>
|
|
||||||
</component>
|
|
40
.idea/jarRepositories.xml
generated
40
.idea/jarRepositories.xml
generated
@@ -1,11 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="RemoteRepositoriesConfiguration">
|
<component name="RemoteRepositoriesConfiguration">
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="Builders-Paradise" />
|
|
||||||
<option name="name" value="Builders-Paradise" />
|
|
||||||
<option name="url" value="https://repo.t2code.net/repository/Builders-Paradise/" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
<remote-repository>
|
||||||
<option name="id" value="central" />
|
<option name="id" value="central" />
|
||||||
<option name="name" value="Central Repository" />
|
<option name="name" value="Central Repository" />
|
||||||
@@ -26,6 +21,31 @@
|
|||||||
<option name="name" value="sonatype" />
|
<option name="name" value="sonatype" />
|
||||||
<option name="url" value="https://oss.sonatype.org/content/groups/public/" />
|
<option name="url" value="https://oss.sonatype.org/content/groups/public/" />
|
||||||
</remote-repository>
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Maven Central repository" />
|
||||||
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="placeholderapi" />
|
||||||
|
<option name="name" value="placeholderapi" />
|
||||||
|
<option name="url" value="http://repo.extendedclip.com/content/repositories/placeholderapi/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="Builders-Paradise" />
|
||||||
|
<option name="name" value="Builders-Paradise" />
|
||||||
|
<option name="url" value="https://repo.t2code.net/repository/Builders-Paradise/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="T2CodePrivat" />
|
||||||
|
<option name="name" value="T2CodePrivat" />
|
||||||
|
<option name="url" value="https://repo.t2code.net/repository/T2CodePrivat/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="T2Code" />
|
||||||
|
<option name="name" value="T2Code" />
|
||||||
|
<option name="url" value="https://repo.t2code.net/repository/T2Code/" />
|
||||||
|
</remote-repository>
|
||||||
<remote-repository>
|
<remote-repository>
|
||||||
<option name="id" value="spigot-repo" />
|
<option name="id" value="spigot-repo" />
|
||||||
<option name="name" value="spigot-repo" />
|
<option name="name" value="spigot-repo" />
|
||||||
@@ -36,21 +56,11 @@
|
|||||||
<option name="name" value="spigotmc-repo" />
|
<option name="name" value="spigotmc-repo" />
|
||||||
<option name="url" value="https://hub.spigotmc.org/nexus/content/repositories/snapshots/" />
|
<option name="url" value="https://hub.spigotmc.org/nexus/content/repositories/snapshots/" />
|
||||||
</remote-repository>
|
</remote-repository>
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="central" />
|
|
||||||
<option name="name" value="Maven Central repository" />
|
|
||||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
<remote-repository>
|
||||||
<option name="id" value="jboss.community" />
|
<option name="id" value="jboss.community" />
|
||||||
<option name="name" value="JBoss Community repository" />
|
<option name="name" value="JBoss Community repository" />
|
||||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||||
</remote-repository>
|
</remote-repository>
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="placeholderapi" />
|
|
||||||
<option name="name" value="placeholderapi" />
|
|
||||||
<option name="url" value="http://repo.extendedclip.com/content/repositories/placeholderapi/" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
<remote-repository>
|
||||||
<option name="id" value="bungeecord-repo" />
|
<option name="id" value="bungeecord-repo" />
|
||||||
<option name="name" value="bungeecord-repo" />
|
<option name="name" value="bungeecord-repo" />
|
||||||
|
13
.idea/libraries/Maven__net_t2code_bungee_1615.xml
generated
13
.idea/libraries/Maven__net_t2code_bungee_1615.xml
generated
@@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: net.t2code:bungee:1615">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/net/t2code/bungee/1615/bungee-1615.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/net/t2code/bungee/1615/bungee-1615-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/net/t2code/bungee/1615/bungee-1615-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
@@ -37,6 +37,7 @@
|
|||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-chat:1.16-R0.4" level="project" />
|
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-chat:1.16-R0.4" level="project" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.28" level="project" />
|
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.28" level="project" />
|
||||||
<orderEntry type="library" name="Maven: net.t2code:bungee:1615" level="project" />
|
<orderEntry type="library" name="Maven: net.t2code:bungee:1615" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: net.t2code:LuckyBox-API:4.2.7" level="project" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.MilkBowl:VaultAPI:1.7" level="project" />
|
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.MilkBowl:VaultAPI:1.7" level="project" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bukkit:bukkit:1.13.1-R0.1-SNAPSHOT" level="project" />
|
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bukkit:bukkit:1.13.1-R0.1-SNAPSHOT" level="project" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.googlecode.json-simple:json-simple:1.1.1" level="project" />
|
<orderEntry type="library" scope="PROVIDED" name="Maven: com.googlecode.json-simple:json-simple:1.1.1" level="project" />
|
||||||
|
11
pom.xml
11
pom.xml
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>net.t2code</groupId>
|
<groupId>net.t2code</groupId>
|
||||||
<artifactId>T2CodeLib</artifactId>
|
<artifactId>T2CodeLib</artifactId>
|
||||||
<version>10.5</version>
|
<version>11.1</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>T2CodeLib</name>
|
<name>T2CodeLib</name>
|
||||||
@@ -63,6 +63,10 @@
|
|||||||
<id>Builders-Paradise</id>
|
<id>Builders-Paradise</id>
|
||||||
<url>https://repo.t2code.net/repository/Builders-Paradise/</url>
|
<url>https://repo.t2code.net/repository/Builders-Paradise/</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>T2Code</id>
|
||||||
|
<url>https://repo.t2code.net/repository/T2Code/</url>
|
||||||
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>jitpack.io</id>
|
<id>jitpack.io</id>
|
||||||
<url>https://jitpack.io</url>
|
<url>https://jitpack.io</url>
|
||||||
@@ -85,6 +89,11 @@
|
|||||||
<artifactId>bungee</artifactId>
|
<artifactId>bungee</artifactId>
|
||||||
<version>1615</version>
|
<version>1615</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.t2code</groupId>
|
||||||
|
<artifactId>LuckyBox-API</artifactId>
|
||||||
|
<version>4.2.7</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.MilkBowl</groupId>
|
<groupId>com.github.MilkBowl</groupId>
|
||||||
<artifactId>VaultAPI</artifactId>
|
<artifactId>VaultAPI</artifactId>
|
||||||
|
@@ -1,5 +1,12 @@
|
|||||||
package net.t2code.lib.Bungee.Lib.messages;
|
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;
|
import java.util.List;
|
||||||
|
|
||||||
public class BT2CodeTemplate {
|
public class BT2CodeTemplate {
|
||||||
@@ -15,6 +22,7 @@ public class BT2CodeTemplate {
|
|||||||
Bsend.console(prefix + " §8-------------------------------");
|
Bsend.console(prefix + " §8-------------------------------");
|
||||||
return long_;
|
return long_;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void onLoadSeparateStroke(String prefix) {
|
public static void onLoadSeparateStroke(String prefix) {
|
||||||
Bsend.console(prefix + " §8-------------------------------");
|
Bsend.console(prefix + " §8-------------------------------");
|
||||||
}
|
}
|
||||||
@@ -35,4 +43,16 @@ public class BT2CodeTemplate {
|
|||||||
Bsend.console(prefix + "§4============================= " + prefix + " §4=============================");
|
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=======");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
@@ -1,10 +1,12 @@
|
|||||||
package net.t2code.lib.Bungee.Lib.update;
|
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.ProxyServer;
|
||||||
import net.md_5.bungee.api.plugin.Plugin;
|
import net.md_5.bungee.api.plugin.Plugin;
|
||||||
import net.t2code.lib.Bungee.Lib.messages.Bsend;
|
import net.t2code.lib.Bungee.Lib.messages.Bsend;
|
||||||
import net.t2code.lib.Spigot.Lib.update.UpdateObject;
|
import net.t2code.lib.Spigot.Lib.update.UpdateObject;
|
||||||
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
@@ -15,6 +17,7 @@ import java.util.function.Consumer;
|
|||||||
|
|
||||||
public class BUpdateAPI {
|
public class BUpdateAPI {
|
||||||
public static HashMap<String, UpdateObject> bungeePluginVersionen = new HashMap<String, UpdateObject>();
|
public static HashMap<String, UpdateObject> bungeePluginVersionen = new HashMap<String, UpdateObject>();
|
||||||
|
|
||||||
public static void sendUpdateMsg(String Prefix, String Spigot, String Discord, String foundVersion, String update_version) {
|
public static void sendUpdateMsg(String Prefix, String Spigot, String Discord, String foundVersion, String update_version) {
|
||||||
Bsend.console("§4=========== " + Prefix + " §4===========");
|
Bsend.console("§4=========== " + Prefix + " §4===========");
|
||||||
Bsend.console("§6A new version was found!");
|
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("§6You can find more information on Discord: §e" + Discord);
|
||||||
Bsend.console("§4=========== " + Prefix + " §4===========");
|
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 Boolean noUpdate = true;
|
||||||
private static String pluginVersion;
|
private static String pluginVersion;
|
||||||
public static void onUpdateCheckTimer(Plugin plugin, String Prefix, String Spigot, String Discord, Integer SpigotID) {
|
public static void onUpdateCheckTimer(Plugin plugin, String Prefix, String Spigot, String Discord, Integer SpigotID) {
|
||||||
|
@@ -35,12 +35,13 @@ public class T2CodeTemplate {
|
|||||||
if (isPremium) {
|
if (isPremium) {
|
||||||
send.console(prefix + " §4 §e| §6Premium: §2true");
|
send.console(prefix + " §4 §e| §6Premium: §2true");
|
||||||
} else send.console(prefix + " §4 §e| §6Premium: §4false");
|
} else send.console(prefix + " §4 §e| §6Premium: §4false");
|
||||||
}
|
|
||||||
if (isVerify != null) {
|
if (isVerify != null) {
|
||||||
if (isVerify) {
|
if (isVerify) {
|
||||||
send.console(prefix + " §4 §e| §6Verify: §2true");
|
send.console(prefix + " §4 §e| §6Verify: §2true");
|
||||||
} else send.console(prefix + " §4 §e| §6Verify: §4false");
|
} else send.console(prefix + " §4 §e| §6Verify: §4false");
|
||||||
|
} 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!");
|
||||||
|
@@ -4,7 +4,6 @@ import me.clip.placeholderapi.PlaceholderAPI;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@@ -152,6 +152,9 @@ public class UpdateAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void getVersion(Consumer<String> consumer, String Prefix, String pluginVersion) {
|
public void getVersion(Consumer<String> consumer, String Prefix, String pluginVersion) {
|
||||||
|
if (!plugin.isEnabled()){
|
||||||
|
return;
|
||||||
|
}
|
||||||
Bukkit.getScheduler().runTaskAsynchronously(this.plugin, () -> {
|
Bukkit.getScheduler().runTaskAsynchronously(this.plugin, () -> {
|
||||||
try {
|
try {
|
||||||
InputStream inputStream = (new URL("https://api.spigotmc.org/legacy/update.php?resource=" + this.resourceId)).openStream();
|
InputStream inputStream = (new URL("https://api.spigotmc.org/legacy/update.php?resource=" + this.resourceId)).openStream();
|
||||||
|
@@ -5,7 +5,10 @@ import net.t2code.lib.Spigot.Lib.minecraftVersion.MCVersion;
|
|||||||
import net.t2code.lib.Spigot.Lib.minecraftVersion.NMSVersion;
|
import net.t2code.lib.Spigot.Lib.minecraftVersion.NMSVersion;
|
||||||
import net.t2code.lib.Spigot.Lib.plugins.PluginCheck;
|
import net.t2code.lib.Spigot.Lib.plugins.PluginCheck;
|
||||||
import net.t2code.lib.Spigot.Lib.vault.Vault;
|
import net.t2code.lib.Spigot.Lib.vault.Vault;
|
||||||
|
import net.t2code.luckyBox.api.LuckyBoxAPI;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.OfflinePlayer;
|
||||||
|
import org.bukkit.Server;
|
||||||
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 org.bukkit.plugin.Plugin;
|
||||||
@@ -41,18 +44,25 @@ public class CreateReportLog {
|
|||||||
pWriter.println();
|
pWriter.println();
|
||||||
pWriter.println("Online Mode: " + Bukkit.getOnlineMode());
|
pWriter.println("Online Mode: " + Bukkit.getOnlineMode());
|
||||||
pWriter.println("Worlds: " + Bukkit.getWorlds());
|
pWriter.println("Worlds: " + Bukkit.getWorlds());
|
||||||
|
pWriter.println("OP-Player:");
|
||||||
|
for (OfflinePlayer player : Bukkit.getOperators()) {
|
||||||
|
pWriter.println(" - Player: " + player.getName() + " - " + player.getUniqueId());
|
||||||
|
}
|
||||||
pWriter.println();
|
pWriter.println();
|
||||||
if (Vault.vaultEnable) {
|
if (Vault.vaultEnable) {
|
||||||
pWriter.println("Vault: " + Bukkit.getPluginManager().getPlugin("Vault").getName() + " - " + Bukkit.getPluginManager().getPlugin("Vault").getDescription().getVersion());
|
pWriter.println("Vault: " + Bukkit.getPluginManager().getPlugin("Vault").getName() + " - " + Bukkit.getPluginManager().getPlugin("Vault").getDescription().getVersion());
|
||||||
} else pWriter.println("Vault: not connected");
|
} else pWriter.println("Vault: not connected");
|
||||||
if (Main.eco != null) {
|
if (Main.eco != null) {
|
||||||
String st;
|
String st = Main.eco.getName();
|
||||||
st = Main.eco.getName();
|
|
||||||
if (Main.eco.getName().equals("CMIEconomy")) st = "CMI";
|
if (Main.eco.getName().equals("CMIEconomy")) st = "CMI";
|
||||||
pWriter.println("Economy: " + Main.eco.isEnabled() + " - " + Main.eco.getName() + " - " + Bukkit.getPluginManager().getPlugin(st).getDescription().getVersion());
|
if (Bukkit.getPluginManager().getPlugin(st) != null) {
|
||||||
|
pWriter.println("Economy: " + Main.eco.isEnabled() + " - " + st + " - " + Bukkit.getPluginManager().getPlugin(st).getDescription().getVersion());
|
||||||
|
} else pWriter.println("Economy: " + Main.eco.isEnabled() + " - " + st);
|
||||||
} else pWriter.println("Economy: not connected via vault");
|
} else pWriter.println("Economy: not connected via vault");
|
||||||
if (Main.perm != null) {
|
if (Main.perm != null) {
|
||||||
|
if (Bukkit.getPluginManager().getPlugin(Main.perm.getName()) != null) {
|
||||||
pWriter.println("Permission: " + Main.perm.isEnabled() + " - " + Main.perm.getName() + " - " + Bukkit.getPluginManager().getPlugin(Main.perm.getName()).getDescription().getVersion());
|
pWriter.println("Permission: " + Main.perm.isEnabled() + " - " + Main.perm.getName() + " - " + Bukkit.getPluginManager().getPlugin(Main.perm.getName()).getDescription().getVersion());
|
||||||
|
} else pWriter.println("Permission: " + Main.perm.isEnabled() + " - " + Main.perm.getName());
|
||||||
} else pWriter.println("Permission: not connected via vault");
|
} else pWriter.println("Permission: not connected via vault");
|
||||||
pWriter.println();
|
pWriter.println();
|
||||||
pWriter.println("Java: " + System.getProperty("java.version"));
|
pWriter.println("Java: " + System.getProperty("java.version"));
|
||||||
@@ -62,6 +72,15 @@ public class CreateReportLog {
|
|||||||
pWriter.println();
|
pWriter.println();
|
||||||
pWriter.println("T2CodeLib: " + Main.plugin.getDescription().getVersion());
|
pWriter.println("T2CodeLib: " + Main.plugin.getDescription().getVersion());
|
||||||
pWriter.println();
|
pWriter.println();
|
||||||
|
if (PluginCheck.luckyBox()) {
|
||||||
|
pWriter.println("T2C-PremiumPlugins: ");
|
||||||
|
pWriter.println("T2C-LuckyBox UID: " + LuckyBoxAPI.getUID());
|
||||||
|
pWriter.println("T2C-LuckyBox RID: " + LuckyBoxAPI.getRID());
|
||||||
|
pWriter.println("T2C-LuckyBox DID: " + LuckyBoxAPI.getDID());
|
||||||
|
pWriter.println("T2C-LuckyBox isP: " + LuckyBoxAPI.isP());
|
||||||
|
pWriter.println("T2C-LuckyBox isV: " + LuckyBoxAPI.isV());
|
||||||
|
pWriter.println();
|
||||||
|
}
|
||||||
pWriter.println("Plugins: ");
|
pWriter.println("Plugins: ");
|
||||||
for (Plugin pl : Bukkit.getPluginManager().getPlugins()) {
|
for (Plugin pl : Bukkit.getPluginManager().getPlugins()) {
|
||||||
pWriter.println(" - " + pl.getName() + " - " + pl.getDescription().getVersion() + " - Enabled: " + pl.isEnabled() + " - Autors: " + pl.getDescription().getAuthors() + " - Website: " + pl.getDescription().getWebsite());
|
pWriter.println(" - " + pl.getName() + " - " + pl.getDescription().getVersion() + " - Enabled: " + pl.isEnabled() + " - Autors: " + pl.getDescription().getAuthors() + " - Website: " + pl.getDescription().getWebsite());
|
||||||
|
@@ -47,10 +47,11 @@ public final class Main extends JavaPlugin {
|
|||||||
plugin = this;
|
plugin = this;
|
||||||
autor = plugin.getDescription().getAuthors();
|
autor = plugin.getDescription().getAuthors();
|
||||||
version = plugin.getDescription().getVersion();
|
version = plugin.getDescription().getVersion();
|
||||||
Long long_;
|
long long_;
|
||||||
long_ = T2CodeTemplate.onLoadHeader(prefix, autor, version, spigot, discord);
|
long_ = T2CodeTemplate.onLoadHeader(prefix, autor, version, spigot, discord);
|
||||||
if (Util.getSnapshot()){
|
if (Util.getSnapshot()){
|
||||||
send.console(prefix + " §eYou are running §4" + version + " §eof " + prefix + "§e! §4This is a trial version! §eSome 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! §4This is a trial version! §eSome features may not be working as expected." +
|
||||||
|
" Please report all bugs here: http://dc.t2code.net §4UpdateChecker & bStats may be disabled!");
|
||||||
send.console(prefix + " §4 §e-------------------");
|
send.console(prefix + " §4 §e-------------------");
|
||||||
try {
|
try {
|
||||||
Thread.sleep(5000);
|
Thread.sleep(5000);
|
||||||
@@ -83,25 +84,26 @@ public final class Main extends JavaPlugin {
|
|||||||
ItemVersion.scan();
|
ItemVersion.scan();
|
||||||
send.console(Main.prefix + " §3Server run on: §6" + MCVersion.isVersion + " / " + NMSVersion.isNMS);
|
send.console(Main.prefix + " §3Server run on: §6" + MCVersion.isVersion + " / " + NMSVersion.isNMS);
|
||||||
if (eco != null) {
|
if (eco != null) {
|
||||||
String st;
|
String st = eco.getName();
|
||||||
st = eco.getName();
|
|
||||||
if (eco.getName().equals("CMIEconomy")) st = "CMI";
|
if (eco.getName().equals("CMIEconomy")) st = "CMI";
|
||||||
if (Bukkit.getPluginManager().getPlugin(st) != null){
|
if (Bukkit.getPluginManager().getPlugin(st) != null){
|
||||||
send.console(Main.prefix + " §3Economy: §6" + eco.getName() + " - " + Bukkit.getPluginManager().getPlugin(st).getDescription().getVersion() + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
send.console(Main.prefix + " §3Economy: §6" + eco.getName() + " - " + Bukkit.getPluginManager().getPlugin(st).getDescription().getVersion() + " §7- §e" +
|
||||||
} else send.console(Main.prefix + " §3Economy: §6" + eco.getName() + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
(System.currentTimeMillis() - long_) + "ms");
|
||||||
} else send.console(Main.prefix + " §3Economy: §4not connected via vault!" + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
} else send.console(Main.prefix + " §3Economy: §6" + eco.getName() + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
|
||||||
|
} else send.console(Main.prefix + " §3Economy: §4not connected via vault!" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
|
||||||
|
|
||||||
if (perm != null) {
|
if (perm != null) {
|
||||||
if (Bukkit.getPluginManager().getPlugin(perm.getName()) != null){
|
if (Bukkit.getPluginManager().getPlugin(perm.getName()) != null){
|
||||||
send.console(Main.prefix + " §3Permission plugin: §6" + perm.getName() + " - " + Bukkit.getPluginManager().getPlugin(perm.getName()).getDescription().getVersion() + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
send.console(Main.prefix + " §3Permission plugin: §6" + perm.getName() + " - " + Bukkit.getPluginManager().getPlugin(perm.getName()).getDescription().getVersion()
|
||||||
} else send.console(Main.prefix + " §3Permission plugin: §6" + perm.getName() + " - §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
+ " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
|
||||||
} else send.console(Main.prefix + " §3Permission plugin: §4not connected via vault!" + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
} else send.console(Main.prefix + " §3Permission plugin: §6" + perm.getName() + " - §7- §e" + (System.currentTimeMillis() - long_) + "ms");
|
||||||
|
} else send.console(Main.prefix + " §3Permission plugin: §4not connected via vault!" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
|
||||||
|
|
||||||
if (PluginCheck.pluginCheck("PlaceholderAPI")) {
|
if (PluginCheck.pluginCheck("PlaceholderAPI")) {
|
||||||
send.console(Main.prefix + " §3PlaceholderAPI: §6connected" + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
send.console(Main.prefix + " §3PlaceholderAPI: §6connected" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Main.plugin.getCommand("t2code").setExecutor(new CmdExecuter());
|
Main.plugin.getCommand("t2code").setExecutor(new CmdExecuter());
|
||||||
ConfigCreate.configCreate();
|
ConfigCreate.configCreate();
|
||||||
LanguagesCreate.langCreate();
|
LanguagesCreate.langCreate();
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
name: T2CodeLib
|
name: T2CodeLib
|
||||||
version: 10.5
|
version: 11.1
|
||||||
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.5
|
version: 11.1
|
||||||
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