Compare commits

...

20 Commits
10.4 ... 11.9

Author SHA1 Message Date
066496dea0 11.9
add HoverModule
add placeholder [nl] for next line
2022-05-31 21:31:23 +02:00
d7cad5524c 11.8
FIX: Playerheads, Base64 Heads sind jetzt auch bei 1.8 - 1.12 verfügbar
2022-05-17 21:05:49 +02:00
df01efdfbd 11.6
- The option 'Plugin.UpdateCheck.OnJoin' activates / deactivates the UpdateCheck on join of all T2Code plugins using the T2CodeLib from now on
- minor code changes
2022-04-26 18:26:51 +02:00
f27ec3c985 11.6 Perform Update in Update Checker 2022-04-19 01:29:24 +02:00
abf95ecf0c remove target & .idea 2022-04-16 17:36:43 +02:00
7e627f5033 11.5 2022-04-16 17:09:19 +02:00
efb66696eb 11.5
This update introduces the possibility to disable messages.
Just write '[empty]' in the message to disable it.
2022-04-16 16:56:16 +02:00
JaTiTV
4bdbe98f8a Merge pull request 'AddMoney' (#4) from AddMoney into main
Reviewed-on: #4
2022-04-16 16:53:58 +02:00
e3c1217f86 11.4 2022-04-01 02:23:26 +02:00
dab150407c update maven 2022-03-14 18:33:30 +01:00
Jkobs
cd9cd478b5 AddMoney 2022-03-13 21:58:50 +01:00
810e61f0e2 Bugfix in '/t2code debug createReportLog' 2022-02-09 14:40:27 +01:00
15f2a5d422 Bugfix
If a plugin of T2Code was unloaded for example by PlugMan, then an error came in the UpdateChecker, this was fixed
2022-01-27 05:51:09 +01:00
8482f7f787 10.9 2022-01-21 22:04:26 +01:00
2f4fe4651e Minor code changes 2022-01-20 18:19:39 +01:00
dd433b26ea 10.7 2022-01-19 01:17:20 +01:00
5725251c18 10.6
Added more features for our bungee plugins.
2022-01-18 14:41:41 +01:00
daed92b022 Update .gitignore 2022-01-18 14:41:25 +01:00
8a76bcb2c7 Create .gitignore 2022-01-18 14:40:53 +01:00
8debd90a6c Minor code changes 2022-01-17 20:23:49 +01:00
115 changed files with 571 additions and 381 deletions

114
.gitignore vendored Normal file
View 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/

View File

@@ -1,8 +0,0 @@
<component name="ArtifactManager">
<artifact type="jar" name="T2CodeLib">
<output-path>$PROJECT_DIR$/../../Libarys</output-path>
<root id="archive" name="T2CodeLib.jar">
<element id="module-output" name="T2CodeLib" />
</root>
</artifact>
</component>

View File

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

View File

@@ -1,8 +0,0 @@
<component name="ArtifactManager">
<artifact type="jar" name="T2CodeLib_1.0.0.32">
<output-path>$PROJECT_DIR$/../../Testserver/1.17.1/Server/plugins</output-path>
<root id="archive" name="T2CodeLib_1.0.0.3.jar">
<element id="module-output" name="T2CodeLib" />
</root>
</artifact>
</component>

View File

@@ -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,36 @@
<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="https://repo.extendedclip.com/content/repositories/placeholderapi/" />
</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 +61,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" />

View File

@@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="Maven: com.google.code.findbugs:jsr305:3.0.2">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="Maven: com.google.code.gson:gson:2.8.8">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/code/gson/gson/2.8.8/gson-2.8.8.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/google/code/gson/gson/2.8.8/gson-2.8.8-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/code/gson/gson/2.8.8/gson-2.8.8-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="Maven: com.google.errorprone:error_prone_annotations:2.7.1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/errorprone/error_prone_annotations/2.7.1/error_prone_annotations-2.7.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/google/errorprone/error_prone_annotations/2.7.1/error_prone_annotations-2.7.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/errorprone/error_prone_annotations/2.7.1/error_prone_annotations-2.7.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="Maven: com.google.guava:failureaccess:1.0.1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="Maven: com.google.guava:guava:31.0.1-jre">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="Maven: com.google.j2objc:j2objc-annotations:1.3">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="Maven: me.clip:placeholderapi:2.9.2">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/me/clip/placeholderapi/2.9.2/placeholderapi-2.9.2.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/me/clip/placeholderapi/2.9.2/placeholderapi-2.9.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/me/clip/placeholderapi/2.9.2/placeholderapi-2.9.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="Maven: net.md-5:bungeecord-chat:1.16-R0.4">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/net/md-5/bungeecord-chat/1.16-R0.4/bungeecord-chat-1.16-R0.4.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/net/md-5/bungeecord-chat/1.16-R0.4/bungeecord-chat-1.16-R0.4-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/net/md-5/bungeecord-chat/1.16-R0.4/bungeecord-chat-1.16-R0.4-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -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>

View File

@@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="Maven: org.checkerframework:checker-qual:3.12.0">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/checkerframework/checker-qual/3.12.0/checker-qual-3.12.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/checkerframework/checker-qual/3.12.0/checker-qual-3.12.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/checkerframework/checker-qual/3.12.0/checker-qual-3.12.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="Maven: org.spigotmc:spigot-api:1.18-R0.1-SNAPSHOT">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/spigotmc/spigot-api/1.18-R0.1-SNAPSHOT/spigot-api-1.18-R0.1-20211210.131639-28.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/spigotmc/spigot-api/1.18-R0.1-SNAPSHOT/spigot-api-1.18-R0.1-20211210.131639-28-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/spigotmc/spigot-api/1.18-R0.1-SNAPSHOT/spigot-api-1.18-R0.1-20211210.131639-28-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="Maven: org.yaml:snakeyaml:1.28">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/yaml/snakeyaml/1.28/snakeyaml-1.28.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/yaml/snakeyaml/1.28/snakeyaml-1.28-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/yaml/snakeyaml/1.28/snakeyaml-1.28-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
</set>
</option>
</component>
</project>

View File

@@ -37,11 +37,13 @@
<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" />
<orderEntry type="library" scope="PROVIDED" name="Maven: junit:junit:4.10" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: junit:junit:4.10" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: me.clip:placeholderapi:2.9.2" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: me.clip:placeholderapi:2.11.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.jetbrains:annotations:19.0.0" level="project" />
</component> </component>
</module> </module>

17
pom.xml
View File

@@ -6,12 +6,12 @@
<groupId>net.t2code</groupId> <groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId> <artifactId>T2CodeLib</artifactId>
<version>10.4</version> <version>11.9</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>T2CodeLib</name> <name>T2CodeLib</name>
<description>Libarie from T2Code Plugins</description> <description>Library from T2Code Plugins</description>
<properties> <properties>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -63,13 +63,17 @@
<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>
</repository> </repository>
<repository> <repository>
<id>placeholderapi</id> <id>placeholderapi</id>
<url>http://repo.extendedclip.com/content/repositories/placeholderapi/</url> <url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
</repository> </repository>
</repositories> </repositories>
@@ -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>
@@ -94,7 +103,7 @@
<dependency> <dependency>
<groupId>me.clip</groupId> <groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId> <artifactId>placeholderapi</artifactId>
<version>2.9.2</version> <version>2.11.1</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@@ -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=======");
}
} }

View File

@@ -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;
}
}

View File

@@ -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) {

View File

@@ -7,11 +7,35 @@ import org.bukkit.inventory.ItemStack;
public class ItemVersion { public class ItemVersion {
private static Material Head; private static Material Head;
private static ItemStack HeadIS; private static ItemStack HeadIS;
public static void scan(){ private static ItemStack CRAFTING_TABLE;
private static ItemStack YELLOW_WOOL;
private static ItemStack ORANGE_WOOL;
private static ItemStack GREEN_WOOL;
private static ItemStack GRAY_WOOL;
private static ItemStack RED_WOOL;
private static ItemStack RED_STAINED_GLASS_PANE;
public static void scan() {
if (MCVersion.minecraft1_8 || MCVersion.minecraft1_9 || MCVersion.minecraft1_10 || MCVersion.minecraft1_11 || MCVersion.minecraft1_12) { if (MCVersion.minecraft1_8 || MCVersion.minecraft1_9 || MCVersion.minecraft1_10 || MCVersion.minecraft1_11 || MCVersion.minecraft1_12) {
Head = Material.valueOf("SKULL"); Head = Material.valueOf("SKULL_ITEM");
} else Head = Material.valueOf("PLAYER_HEAD"); YELLOW_WOOL = new ItemStack(Material.valueOf("WOOL"), 1, (short) 4);
HeadIS = new ItemStack(Head); ORANGE_WOOL = new ItemStack(Material.valueOf("WOOL"), 1, (short) 1);
GREEN_WOOL = new ItemStack(Material.valueOf("WOOL"), 1, (short) 5);
GRAY_WOOL = new ItemStack(Material.valueOf("WOOL"), 1, (short) 8);
RED_WOOL = new ItemStack(Material.valueOf("WOOL"), 1, (short) 14);
RED_STAINED_GLASS_PANE = new ItemStack(Material.valueOf("STAINED_GLASS_PANE"), 1, (short) 14);
CRAFTING_TABLE = new ItemStack(Material.valueOf("WORKBENCH"));
} else {
Head = Material.valueOf("PLAYER_HEAD");
CRAFTING_TABLE = new ItemStack(Material.CRAFTING_TABLE);
YELLOW_WOOL = new ItemStack(Material.YELLOW_WOOL);
ORANGE_WOOL = new ItemStack(Material.ORANGE_WOOL);
GREEN_WOOL = new ItemStack(Material.GREEN_WOOL);
GRAY_WOOL = new ItemStack(Material.GRAY_WOOL);
RED_WOOL = new ItemStack(Material.RED_WOOL);
RED_STAINED_GLASS_PANE = new ItemStack(Material.RED_STAINED_GLASS_PANE);
}
HeadIS = new ItemStack(Head, 1, (byte) 3);
} }
public static Material getHead() { public static Material getHead() {
@@ -21,4 +45,32 @@ public class ItemVersion {
public static ItemStack getHeadIS() { public static ItemStack getHeadIS() {
return HeadIS; return HeadIS;
} }
public static ItemStack getCraftingTable() {
return CRAFTING_TABLE;
}
public static ItemStack getYellowWool() {
return YELLOW_WOOL;
}
public static ItemStack getOrangeWool() {
return ORANGE_WOOL;
}
public static ItemStack getGreenWool() {
return GREEN_WOOL;
}
public static ItemStack getGrayWool() {
return GRAY_WOOL;
}
public static ItemStack getRedWool() {
return RED_WOOL;
}
public static ItemStack getRedStainedGlassPane() {
return RED_STAINED_GLASS_PANE;
}
} }

View File

@@ -0,0 +1,39 @@
package net.t2code.lib.Spigot.Lib.messages;
import net.md_5.bungee.api.chat.ClickEvent;
import org.bukkit.entity.Player;
public class HoverModule {
public static void module(String text, String hover, String action, String actionValue, Player player) {
module((text != null ? text : "null") + "/*/" + (hover != null ? hover : "null") + "/*/" + (action != null ? action : "null")
+ "/*/" + (actionValue != null ? actionValue : "null"), player);
}
public static void module(String msg, Player player) {
if (!msg.contains("/*/")) {
player.sendMessage(msg);
return;
}
String[] split = msg.split("/\\*/");
int i = split.length;
String text = null;
String hover = null;
String action = null;
String actionValue = null;
if (i > 0) text= split[0];
if (i > 1) hover =split[1];
if (i > 2)action = split[2];
if (i > 3)actionValue = split[3];
TextBuilder textBuilder = new TextBuilder(text);
if (hover != null && !hover.equals("null")) {
textBuilder.addHover(hover);
}
if (action != null && actionValue != null && !action.equals("null") && !actionValue.equals("null")) {
textBuilder.addClickEvent(ClickEvent.Action.valueOf(action.toUpperCase()), actionValue);
}
player.spigot().sendMessage(textBuilder.build());
}
}

View File

@@ -2,23 +2,25 @@ package net.t2code.lib.Spigot.Lib.messages;
import net.md_5.bungee.api.chat.ClickEvent; 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.minecraftVersion.MCVersion;
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 net.t2code.lib.Spigot.system.config.SelectLibConfig;
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<String> autor, String version, String spigot, String discord) { public static Long onLoadHeader(String prefix, List<String> autor, String version, String spigot, String discord) {
return onLoadHeader(prefix, autor, version, spigot, discord, null); 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) { 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(); 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_____ ");
@@ -36,11 +38,18 @@ 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) {
send.console(prefix + " §4 §e| §6Verify: §2true");
} 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!");
send.console(prefix + " §4 §e-------------------"); send.console(prefix + " §4 §e-------------------");
if (SelectLibConfig.t2cTestDevelopment) return long_;
try { try {
Thread.sleep(5000); Thread.sleep(5000);
} catch (InterruptedException e) { } catch (InterruptedException e) {
@@ -90,9 +99,14 @@ public class T2CodeTemplate {
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) {
TextComponent comp2 = new TextBuilder(prefix + " §2Version: §6" + pluginVersion) if (MCVersion.minecraft1_8 || MCVersion.minecraft1_9 || MCVersion.minecraft1_10 || MCVersion.minecraft1_11 || MCVersion.minecraft1_12 || MCVersion.minecraft1_13 || MCVersion.minecraft1_14 || MCVersion.minecraft1_15) {
.addHover("§8Click to copy").addClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, Replace.removeColorCode(prefix) + " - " + pluginVersion).build(); send.sender(sender, prefix + " §2Version: §6" + pluginVersion);
sender.spigot().sendMessage(comp2); } else {
TextComponent comp2 = new TextBuilder(prefix + " §2Version: §6" + pluginVersion)
.addHover("§8Click to copy").addClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, Replace.removeColorCode(prefix) + " - " + pluginVersion).build();
sender.spigot().sendMessage(comp2);
}
if (!publicVersion.equalsIgnoreCase(pluginVersion)) { if (!publicVersion.equalsIgnoreCase(pluginVersion)) {
UpdateAPI.sendUpdateMsg(prefix, spigot, discord, pluginVersion, publicVersion, (Player) sender); UpdateAPI.sendUpdateMsg(prefix, spigot, discord, pluginVersion, publicVersion, (Player) sender);
} }

View File

@@ -28,6 +28,7 @@ public class TextBuilder {
} }
public TextComponent build() { public TextComponent build() {
if (this.text.contains("[empty]")) return null;
TextComponent textComponent = new TextComponent(); TextComponent textComponent = new TextComponent();
textComponent.setText(this.text); textComponent.setText(this.text);
if (this.hover != null) { if (this.hover != null) {

View File

@@ -14,22 +14,29 @@ public class send {
*/ */
public static void console(String msg) { public static void console(String msg) {
if (msg == null || msg.contains("[empty]")) return;
Bukkit.getConsoleSender().sendMessage(msg); Bukkit.getConsoleSender().sendMessage(msg);
} }
public static void player(Player player, String msg) { public static void player(Player player, String msg) {
player.sendMessage(msg); if (msg == null || msg.contains("[empty]")) return;
HoverModule.module(msg,player);
} }
public static void title(Player player, String msg, String msg2) { public static void title(Player player, String msg, String msg2) {
if (msg == null || msg.contains("[empty]")) return;
if (msg2 == null || msg2.contains("[empty]")) return;
player.sendTitle(msg, msg2); player.sendTitle(msg, msg2);
} }
public static void title(Player player, String msg, String msg2, int i, int i1, int i2) { public static void title(Player player, String msg, String msg2, int i, int i1, int i2) {
if (msg == null || msg.contains("[empty]")) return;
if (msg2 == null || msg2.contains("[empty]")) return;
player.sendTitle(msg, msg2, i, i1, i2); player.sendTitle(msg, msg2, i, i1, i2);
} }
public static void sender(CommandSender sender, String msg) { public static void sender(CommandSender sender, String msg) {
if (msg == null || msg.contains("[empty]")) return;
sender.sendMessage(msg); sender.sendMessage(msg);
} }

View File

@@ -22,6 +22,7 @@ public class NMSVersion {
public static boolean v1_17_R1; public static boolean v1_17_R1;
public static boolean v1_18_R1; public static boolean v1_18_R1;
public static boolean v1_18_R2; public static boolean v1_18_R2;
public static boolean v1_19_R1;
public static void onCheck() { public static void onCheck() {
isNMS = Bukkit.getServer().getClass().getPackage().getName(); isNMS = Bukkit.getServer().getClass().getPackage().getName();
@@ -43,5 +44,6 @@ public class NMSVersion {
v1_17_R1 = Bukkit.getServer().getClass().getPackage().getName().contains("1_17_R1"); v1_17_R1 = Bukkit.getServer().getClass().getPackage().getName().contains("1_17_R1");
v1_18_R1 = Bukkit.getServer().getClass().getPackage().getName().contains("1_18_R1"); v1_18_R1 = Bukkit.getServer().getClass().getPackage().getName().contains("1_18_R1");
v1_18_R2 = Bukkit.getServer().getClass().getPackage().getName().contains("1_18_R2"); v1_18_R2 = Bukkit.getServer().getClass().getPackage().getName().contains("1_18_R2");
v1_19_R1 = Bukkit.getServer().getClass().getPackage().getName().contains("1_19_R1");
} }
} }

View File

@@ -43,6 +43,9 @@ public class PluginCheck {
public static Boolean luckyBox(){ public static Boolean luckyBox(){
return Bukkit.getPluginManager().getPlugin("T2C-LuckyBox") != null; return Bukkit.getPluginManager().getPlugin("T2C-LuckyBox") != null;
} }
public static Boolean autoResponse(){
return Bukkit.getPluginManager().getPlugin("T2C-AutoResponse") != null;
}
public static Boolean opSec(){ public static Boolean opSec(){
return Bukkit.getPluginManager().getPlugin("OPSecurity") != null; return Bukkit.getPluginManager().getPlugin("OPSecurity") != null;
} }
@@ -53,7 +56,7 @@ public class PluginCheck {
return Bukkit.getPluginManager().getPlugin("Booster") != null; return Bukkit.getPluginManager().getPlugin("Booster") != null;
} }
public static Boolean antiMapCopy(){ public static Boolean antiMapCopy(){
return Bukkit.getPluginManager().getPlugin("AAntiMapCopy") != null; return Bukkit.getPluginManager().getPlugin("AntiMapCopy") != null;
} }
public static Boolean loreEditor(){ public static Boolean loreEditor(){
return Bukkit.getPluginManager().getPlugin("LoreEditor") != null; return Bukkit.getPluginManager().getPlugin("LoreEditor") != null;

View File

@@ -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;
@@ -13,14 +12,14 @@ public class Replace {
public static String replace(String prefix, String Text) { public static String replace(String prefix, String Text) {
return Text.replace("[prefix]", prefix).replace("&", "§").replace("[ue]", "ü") return Text.replace("[prefix]", prefix).replace("&", "§").replace("[ue]", "ü")
.replace("[UE]", "Ü").replace("[oe]", "ö").replace("[OE]", "Ö") .replace("[UE]", "Ü").replace("[oe]", "ö").replace("[OE]", "Ö")
.replace("[ae]", "ä").replace("[AE]", "Ä"); .replace("[ae]", "ä").replace("[AE]", "Ä").replace("[nl]","\n");
} }
public static String replace(String prefix,Player player, String Text) { public static String replace(String prefix,Player player, String Text) {
return PlaceholderAPI.setPlaceholders(player, Text.replace("[prefix]", prefix).replace("&", "§") return PlaceholderAPI.setPlaceholders(player, Text.replace("[prefix]", prefix).replace("&", "§")
.replace("[ue]", "ü").replace("[UE]", "Ü").replace("[oe]", "ö") .replace("[ue]", "ü").replace("[UE]", "Ü").replace("[oe]", "ö")
.replace("[OE]", "Ö").replace("[ae]", "ä").replace("[AE]", "Ä")); .replace("[OE]", "Ö").replace("[ae]", "ä").replace("[AE]", "Ä").replace("[nl]","\n"));
} }
@@ -29,7 +28,7 @@ public class Replace {
for (String input : Text) { for (String input : Text) {
output.add(input.replace("[prefix]", prefix).replace("&", "§") output.add(input.replace("[prefix]", prefix).replace("&", "§")
.replace("[ue]", "ü").replace("[UE]", "Ü").replace("[oe]", "ö") .replace("[ue]", "ü").replace("[UE]", "Ü").replace("[oe]", "ö")
.replace("[OE]", "Ö").replace("[ae]", "ä").replace("[AE]", "Ä")); .replace("[OE]", "Ö").replace("[ae]", "ä").replace("[AE]", "Ä").replace("[nl]","\n"));
} }
return output; return output;
} }
@@ -46,7 +45,7 @@ public class Replace {
for (String input : Text) { for (String input : Text) {
output.add(PlaceholderAPI.setPlaceholders(player, input.replace("[prefix]", prefix).replace("&", "§") output.add(PlaceholderAPI.setPlaceholders(player, input.replace("[prefix]", prefix).replace("&", "§")
.replace("[ue]", "ü").replace("[UE]", "Ü").replace("[oe]", "ö") .replace("[ue]", "ü").replace("[UE]", "Ü").replace("[oe]", "ö")
.replace("[OE]", "Ö").replace("[ae]", "ä").replace("[AE]", "Ä"))); .replace("[OE]", "Ö").replace("[ae]", "ä").replace("[AE]", "Ä").replace("[nl]","\n")));
} }
return output; return output;
} }
@@ -57,7 +56,7 @@ public class Replace {
for (String s : Text) { for (String s : Text) {
rp.add(s.replace("[prefix]", prefix).replace("&", "§") rp.add(s.replace("[prefix]", prefix).replace("&", "§")
.replace("[ue]", "ü").replace("[UE]", "Ü").replace("[oe]", "ö") .replace("[ue]", "ü").replace("[UE]", "Ü").replace("[oe]", "ö")
.replace("[OE]", "Ö").replace("[ae]", "ä").replace("[AE]", "Ä") .replace("[OE]", "Ö").replace("[ae]", "ä").replace("[AE]", "Ä").replace("[nl]","\n")
.replace("[price]", String.valueOf(price))); .replace("[price]", String.valueOf(price)));
} }
return rp; return rp;
@@ -82,7 +81,7 @@ public class Replace {
for (String s : Text) { for (String s : Text) {
rp.add(PlaceholderAPI.setPlaceholders(player, s.replace("[prefix]", prefix).replace("&", "§") rp.add(PlaceholderAPI.setPlaceholders(player, s.replace("[prefix]", prefix).replace("&", "§")
.replace("[ue]", "ü").replace("[UE]", "Ü").replace("[oe]", "ö") .replace("[ue]", "ü").replace("[UE]", "Ü").replace("[oe]", "ö")
.replace("[OE]", "Ö").replace("[ae]", "ä").replace("[AE]", "Ä") .replace("[OE]", "Ö").replace("[ae]", "ä").replace("[AE]", "Ä").replace("[nl]","\n")
.replace("[price]", String.valueOf(price)))); .replace("[price]", String.valueOf(price))));
} }
return rp; return rp;
@@ -90,7 +89,7 @@ public class Replace {
public static String replacePrice(String prefix, String Text, String price) { public static String replacePrice(String prefix, String Text, String price) {
return Text.replace("[prefix]", prefix).replace("&", "§").replace("[ue]", "ü") return Text.replace("[prefix]", prefix).replace("&", "§").replace("[ue]", "ü")
.replace("[UE]", "Ü").replace("[oe]", "ö").replace("[OE]", "Ö") .replace("[UE]", "Ü").replace("[oe]", "ö").replace("[OE]", "Ö")
.replace("[ae]", "ä").replace("[AE]", "Ä").replace("[price]", String.valueOf(price)); .replace("[ae]", "ä").replace("[AE]", "Ä").replace("[price]", String.valueOf(price)).replace("[nl]","\n");
} }
@@ -98,7 +97,7 @@ public class Replace {
return PlaceholderAPI.setPlaceholders(player, Text.replace("[prefix]", prefix).replace("&", "§") return PlaceholderAPI.setPlaceholders(player, Text.replace("[prefix]", prefix).replace("&", "§")
.replace("[ue]", "ü").replace("[UE]", "Ü").replace("[oe]", "ö") .replace("[ue]", "ü").replace("[UE]", "Ü").replace("[oe]", "ö")
.replace("[OE]", "Ö").replace("[ae]", "ä").replace("[AE]", "Ä") .replace("[OE]", "Ö").replace("[ae]", "ä").replace("[AE]", "Ä")
.replace("[price]", String.valueOf(price))); .replace("[price]", String.valueOf(price)).replace("[nl]","\n"));
} }
} }

View File

@@ -4,6 +4,7 @@ package net.t2code.lib.Spigot.Lib.update;
import net.md_5.bungee.api.chat.ClickEvent; 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.messages.HoverModule;
import net.t2code.lib.Spigot.Lib.messages.TextBuilder; import net.t2code.lib.Spigot.Lib.messages.TextBuilder;
import net.t2code.lib.Spigot.Lib.messages.send; import net.t2code.lib.Spigot.Lib.messages.send;
import net.t2code.lib.Spigot.system.Main; import net.t2code.lib.Spigot.system.Main;
@@ -25,8 +26,11 @@ public class UpdateAPI {
public static HashMap<String, UpdateObject> PluginVersionen = new HashMap<>(); public static HashMap<String, UpdateObject> PluginVersionen = new HashMap<>();
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) {
if (!SelectLibConfig.UpdateCheckOnJoin) {
return;
}
String pluginVersion = plugin.getDescription().getVersion(); String pluginVersion = plugin.getDescription().getVersion();
if (!player.hasPermission(perm) || !player.isOp()) { if (!player.hasPermission(perm) && !player.isOp()) {
return; return;
} }
if (UpdateAPI.PluginVersionen.get(plugin.getName()) == null) { if (UpdateAPI.PluginVersionen.get(plugin.getName()) == null) {
@@ -36,32 +40,34 @@ public class UpdateAPI {
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, UpdateAPI.PluginVersionen.get(plugin.getName()).publicVersion, spigot, discord); return;
}
String publicVersion = UpdateAPI.PluginVersionen.get(plugin.getName()).publicVersion;
if (pluginVersion.equals(publicVersion)) {
return;
}
use(plugin, prefix, player, pluginVersion, 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) {
new BukkitRunnable() { Bukkit.getScheduler().runTaskLater(plugin, new Runnable() {
@Override @Override
public void run() { public void run() {
if (!pluginVersion.equals(publicVersion)) { UpdateAPI.sendUpdateMsg(prefix, spigot, discord, pluginVersion, publicVersion, player);
if (SelectLibConfig.UpdateCheckOnJoin) {
UpdateAPI.sendUpdateMsg(prefix, spigot, discord, pluginVersion, publicVersion, player);
}
}
} }
}.runTaskLater(plugin, 200L); }, 200L);
} }
public static void sendUpdateMsg(String Prefix, String Spigot, String Discord, String pluginVersion, String publicVersion) { public static void sendUpdateMsg(String Prefix, String Spigot, String Discord, String pluginVersion, String publicVersion) {
send.console("§4=========== " + Prefix + " §4==========="); send.console("§4=========== " + Prefix + " §4===========");
if (publicVersion.toLowerCase().contains("dev") || publicVersion.toLowerCase().contains("beta") || publicVersion.toLowerCase().contains("snapshot")){ if (publicVersion.toLowerCase().contains("dev") || publicVersion.toLowerCase().contains("beta") || publicVersion.toLowerCase().contains("snapshot")) {
if (publicVersion.toLowerCase().contains("dev")){ if (publicVersion.toLowerCase().contains("dev")) {
send.console("§6A new §4DEV§6 version was found!"); send.console("§6A new §4DEV§6 version was found!");
} }
if (publicVersion.toLowerCase().contains("beta")){ if (publicVersion.toLowerCase().contains("beta")) {
send.console("§6A new §2BETA§6 version was found!"); send.console("§6A new §2BETA§6 version was found!");
} }
if (publicVersion.toLowerCase().contains("snapshot")){ if (publicVersion.toLowerCase().contains("snapshot")) {
send.console("§6A new §eSNAPSHOT§6 version was found!"); send.console("§6A new §eSNAPSHOT§6 version was found!");
} }
} else { } else {
@@ -78,33 +84,21 @@ public class UpdateAPI {
return; return;
} }
send.player(player, Prefix); send.player(player, Prefix);
if (publicVersion.toLowerCase().contains("dev") || publicVersion.toLowerCase().contains("beta") || publicVersion.toLowerCase().contains("snapshot")){ if (publicVersion.toLowerCase().contains("dev") || publicVersion.toLowerCase().contains("beta") || publicVersion.toLowerCase().contains("snapshot")) {
if (publicVersion.toLowerCase().contains("dev")){ if (publicVersion.toLowerCase().contains("dev")) {
TextComponent comp = new TextBuilder(Prefix + " §6A new §4DEV§6 version was found!") HoverModule.module(Prefix + " §6A new §4DEV§6 version was found!", "§6You can download it here: §e" + Spigot, "OPEN_URL", Spigot, player);
.addHover("§6You can download it here: §e" + Spigot).addClickEvent(ClickEvent.Action.OPEN_URL, Spigot).build();
player.spigot().sendMessage(comp);
} }
if (publicVersion.toLowerCase().contains("beta")){ if (publicVersion.toLowerCase().contains("beta")) {
TextComponent comp = new TextBuilder(Prefix + " §6A new §2BETA§6 version was found!") HoverModule.module(Prefix + " §6A new §2BETA§6 version was found!", "§6You can download it here: §e" + Spigot, "OPEN_URL", Spigot, player);
.addHover("§6You can download it here: §e" + Spigot).addClickEvent(ClickEvent.Action.OPEN_URL, Spigot).build();
player.spigot().sendMessage(comp);
} }
if (publicVersion.toLowerCase().contains("snapshot")){ if (publicVersion.toLowerCase().contains("snapshot")) {
TextComponent comp = new TextBuilder(Prefix + " §6A new §eSNAPSHOT§6 version was found!") HoverModule.module(Prefix + " §6A new §eSNAPSHOT§6 version was found!", "§6You can download it here: §e" + Spigot, "OPEN_URL", Spigot, player);
.addHover("§6You can download it here: §e" + Spigot).addClickEvent(ClickEvent.Action.OPEN_URL, Spigot).build();
player.spigot().sendMessage(comp);
} }
} else { } else {
TextComponent comp = new TextBuilder(Prefix + " §6A new version was found!") HoverModule.module(Prefix + " §6A new version was found!", "§6You can download it here: §e" + Spigot, "OPEN_URL", Spigot, player);
.addHover("§6You can download it here: §e" + Spigot).addClickEvent(ClickEvent.Action.OPEN_URL, Spigot).build();
player.spigot().sendMessage(comp);
} }
TextComponent comp1 = new TextBuilder(Prefix + " §c" + pluginVersion + " §7-> §a" + publicVersion) HoverModule.module(Prefix + " §c" + pluginVersion + " §7-> §a" + publicVersion, "§6You can download it here: §e" + Spigot, "OPEN_URL", Spigot, player);
.addHover("§6You can download it here: §e" + Spigot).addClickEvent(ClickEvent.Action.OPEN_URL, Spigot).build(); HoverModule.module(Prefix + " §6You can find more information on Discord.", "§e" + Discord, "OPEN_URL", Discord, player);
player.spigot().sendMessage(comp1);
TextComponent comp2 = new TextBuilder(Prefix + " §6You can find more information on Discord.")
.addHover("§e" + Discord).addClickEvent(ClickEvent.Action.OPEN_URL, Discord).build();
player.spigot().sendMessage(comp2);
send.player(player, Prefix); send.player(player, Prefix);
} }
@@ -115,7 +109,7 @@ public class UpdateAPI {
} }
public static void onUpdateCheck(Plugin plugin, String Prefix, String Spigot, int SpigotID, String Discord, Integer timeInMin) { public static void onUpdateCheck(Plugin plugin, String Prefix, String Spigot, int SpigotID, String Discord, Integer timeInMin) {
int taskID = Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() { int taskID = Bukkit.getScheduler().scheduleAsyncRepeatingTask(plugin, new Runnable() {
public void run() { public void run() {
(new UpdateAPI((JavaPlugin) plugin, SpigotID)).getVersion((update_version) -> { (new UpdateAPI((JavaPlugin) plugin, SpigotID)).getVersion((update_version) -> {
UpdateObject update = new UpdateObject( UpdateObject update = new UpdateObject(
@@ -152,6 +146,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();

View File

@@ -5,6 +5,7 @@ import net.milkbowl.vault.permission.Permission;
import net.t2code.lib.Spigot.Lib.messages.send; import net.t2code.lib.Spigot.Lib.messages.send;
import net.t2code.lib.Spigot.system.Main; import net.t2code.lib.Spigot.system.Main;
import net.t2code.lib.Spigot.system.languages.SelectLibMsg; import net.t2code.lib.Spigot.system.languages.SelectLibMsg;
import net.t2code.lib.Util;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.plugin.RegisteredServiceProvider; import org.bukkit.plugin.RegisteredServiceProvider;
@@ -20,14 +21,22 @@ public class Vault {
send.console(prefix + " §4\n" + prefix + " §4Vault could not be found! §9Please download it here: " + send.console(prefix + " §4\n" + prefix + " §4Vault could not be found! §9Please download it here: " +
"§6https://www.spigotmc.org/resources/vault.34315/§4\n" + prefix); "§6https://www.spigotmc.org/resources/vault.34315/§4\n" + prefix);
} }
p.sendMessage(prefix + "\n" + SelectLibMsg.VaultNotSetUp + "\n" + prefix); p.sendMessage(prefix + "\n" + SelectLibMsg.vaultNotSetUp + "\n" + prefix);
} else { } else {
if (Main.eco.getBalance(p) < price) { return Main.eco.withdrawPlayer(p,price).transactionSuccess();
return false; }
} else { return false;
Main.eco.withdrawPlayer(p, price); }
return true;
public static boolean addMoney(String prefix, Player p, Double price) {
if (Main.eco == null) {
if (Bukkit.getPluginManager().getPlugin("Vault") == null) {
send.console(prefix + " §4\n" + prefix + " §4Vault could not be found! §9Please download it here: " +
"§6https://www.spigotmc.org/resources/vault.34315/§4\n" + prefix);
} }
p.sendMessage(prefix + "\n" + SelectLibMsg.vaultNotSetUp + "\n" + prefix);
} else {
return Main.eco.depositPlayer(p,price).transactionSuccess();
} }
return false; return false;
} }
@@ -41,14 +50,14 @@ public class Vault {
Main.eco = eco.getProvider(); Main.eco = eco.getProvider();
if (Main.eco != null) { if (Main.eco != null) {
connected = true; connected = true;
send.console(Main.prefix + " §2Vault / Economy successfully connected!" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms"); send.console(Util.getPrefix() + " §2Vault / Economy successfully connected!" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
} else { } else {
connected = false; connected = false;
send.console(Main.prefix + " §4Economy could not be connected / found! 1" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms"); send.console(Util.getPrefix() + " §4Economy could not be connected / found! 1" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
} }
} else { } else {
connected = false; connected = false;
send.console(Main.prefix + " §4Economy could not be connected / found! 2" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms"); send.console(Util.getPrefix() + " §4Economy could not be connected / found! 2" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
} }
RegisteredServiceProvider<Permission> perm = Main.plugin.getServer().getServicesManager().getRegistration(Permission.class); RegisteredServiceProvider<Permission> perm = Main.plugin.getServer().getServicesManager().getRegistration(Permission.class);
if (perm != null) { if (perm != null) {
@@ -57,12 +66,12 @@ public class Vault {
} else { } else {
vaultEnable = false; vaultEnable = false;
connected = false; connected = false;
send.console(Main.prefix + " §4Vault could not be connected! 3" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms"); send.console(Util.getPrefix() + " §4Vault could not be connected! 3" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
} }
} }
public static void vaultDisable() { public static void vaultDisable() {
connected = false; connected = false;
send.console(Main.prefix + " §4Vault / Economy successfully deactivated."); send.console(Util.getPrefix() + " §4Vault / Economy successfully deactivated.");
} }
} }

View File

@@ -109,7 +109,7 @@ public class Config {
try { try {
return Sound.valueOf(selectSoundFromConfig); return Sound.valueOf(selectSoundFromConfig);
} catch (Exception e) { } catch (Exception e) {
send.console("§4\n§4\n§4\n" + SelectLibMsg.SoundNotFound.replace("[prefix]", prefix) send.console("§4\n§4\n§4\n" + SelectLibMsg.soundNotFound.replace("[prefix]", prefix)
.replace("[sound]", "§8Buy: §6" + selectSoundFromConfig) + "§4\n§4\n§4\n"); .replace("[sound]", "§8Buy: §6" + selectSoundFromConfig) + "§4\n§4\n§4\n");
return Sound.valueOf(sound); return Sound.valueOf(sound);
} }

View File

@@ -26,35 +26,36 @@ public class CmdExecuter implements CommandExecutor, TabCompleter {
@Override @Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (!sender.hasPermission("t2code.admin")){ if (!sender.hasPermission("t2code.admin")) {
send.sender(sender,"§4No Permission §8t2code.admin"); send.sender(sender, "§4No Permission §8t2code.admin");
return false; return false;
} }
if (args.length == 0) { if (args.length == 0) {
T2CodeTemplate.sendInfo(sender, Util.getPrefix(), Util.getSpigot(), Util.getDiscord(), Main.autor, Main.version, UpdateAPI.PluginVersionen.get(Main.plugin.getName()).publicVersion); T2CodeTemplate.sendInfo(sender, Util.getPrefix(), Util.getSpigot(), Util.getDiscord(), Main.autor, Main.version, UpdateAPI.PluginVersionen.get(Main.plugin.getName()).publicVersion);
} else { return false;
switch (args[0].toLowerCase()) { }
case "info": switch (args[0].toLowerCase()) {
case "plugin": case "info":
case "pl": case "plugin":
case "version": case "pl":
case "ver": case "version":
T2CodeTemplate.sendInfo(sender, Util.getPrefix(), Util.getSpigot(), Util.getDiscord(), Main.autor, Main.version, UpdateAPI.PluginVersionen.get(Main.plugin.getName()).publicVersion); case "ver":
return false; T2CodeTemplate.sendInfo(sender, Util.getPrefix(), Util.getSpigot(), Util.getDiscord(), Main.autor, Main.version, UpdateAPI.PluginVersionen.get(Main.plugin.getName()).publicVersion);
} return false;
if ("debug".equals(args[0].toLowerCase())) { case "debug":
if (args.length != 2) { if (args.length != 2) {
send.sender(sender, "§4Use: §7/t2code debug createReportLog"); send.sender(sender, "§4Use: §7/t2code debug createReportLog");
return false; return false;
} }
if ("createreportlog".equals(args[1].toLowerCase())) { if ("createreportlog".equals(args[1].toLowerCase())) {
CreateReportLog.create(sender); CreateReportLog.create(sender);
} else send.sender(sender, "§4Use: §7/t2code debug createReportLog"); } else send.sender(sender, "§4Use: §7/t2code debug createReportLog");
} else send.sender(sender, "§4Use: §7/t2code debug createReportLog"); return false;
default:
send.sender(sender, "§4Use: §7/t2code debug createReportLog");
return false;
} }
return false;
} }

View File

@@ -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.lib.Util;
import net.t2code.luckyBox.api.LuckyBoxAPI;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
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;
@@ -17,7 +20,6 @@ import java.util.Calendar;
import java.util.zip.ZipEntry; import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream; import java.util.zip.ZipOutputStream;
public class CreateReportLog { public class CreateReportLog {
protected static void create(CommandSender sender) { protected static void create(CommandSender sender) {
send.sender(sender, Main.prefix + " §6A DebugLog is created..."); send.sender(sender, Main.prefix + " §6A DebugLog is created...");
@@ -41,18 +43,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) {
pWriter.println("Permission: " + Main.perm.isEnabled() + " - " + Main.perm.getName() + " - " + Bukkit.getPluginManager().getPlugin(Main.perm.getName()).getDescription().getVersion()); 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());
} 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 +71,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());
@@ -83,24 +101,26 @@ public class CreateReportLog {
zip.putNextEntry(new ZipEntry(fileToZip.getName())); zip.putNextEntry(new ZipEntry(fileToZip.getName()));
Files.copy(fileToZip.toPath(), zip); Files.copy(fileToZip.toPath(), zip);
//File logToZip = new File(log);
//zipOut.putNextEntry(new ZipEntry(logToZip.getName()));
//Files.copy(logToZip.toPath(), zipOut);
addFileToZip("", "logs/latest.log", zip, false); addFileToZip("", "logs/latest.log", zip, false);
//pluginToDebug("T2CodeLib", "T2CodeLib", zip); todo bugfix (servercrash) for (String pl : Util.getT2cPlugins()){
pluginToDebug("T2C-LuckyBox", "T2C-LuckyBox", zip); pluginToDebug(pl, zip);
pluginToDebug("WonderBagShop", "WonderBagShop", zip); }
pluginToDebug("CommandGUI", "CommandGUI", zip);
pluginToDebug("OPSecurity", "OPSecurity", zip); //pluginToDebug("T2C-LuckyBox", zip);
pluginToDebug("PaPiTest", "PaPiTest", zip); //pluginToDebug("WonderBagShop", zip);
pluginToDebug("PlotSquaredGUI", "PlotSquaredGUI", zip); //pluginToDebug("CommandGUI", zip);
pluginToDebug("T2C-Alias", "T2Code-Alias", zip); //pluginToDebug("OPSecurity", zip);
//pluginToDebug("PaPiTest", zip);
//pluginToDebug("PlotSquaredGUI", zip);
//pluginToDebug("T2C-Alias", zip);
//pluginToDebug("T2C-AutoResponse", zip);
//
//pluginToDebug("LoreEditor", zip);
//pluginToDebug("Booster", zip);
//pluginToDebug("AntiMapCopy", zip);
//pluginToDebug("AntiCopy", zip);
pluginToDebug("LoreEditor", "LoreEditor", zip);
pluginToDebug("Booster", "Booster", zip);
pluginToDebug("AntiMapCopy", "AntiCopy", zip);
zip.closeEntry(); zip.closeEntry();
zip.close(); zip.close();
} catch (IOException e) { } catch (IOException e) {
@@ -114,7 +134,7 @@ public class CreateReportLog {
} }
private static void pluginToDebug(String pluginName, String jar, ZipOutputStream zip) throws IOException { private static void pluginToDebug(String pluginName, ZipOutputStream zip) throws IOException {
if (PluginCheck.pluginCheck(pluginName)) { if (PluginCheck.pluginCheck(pluginName)) {
Plugin plugin = Bukkit.getPluginManager().getPlugin(pluginName); Plugin plugin = Bukkit.getPluginManager().getPlugin(pluginName);
File plConfigs = new File(plugin.getDataFolder().getPath()); File plConfigs = new File(plugin.getDataFolder().getPath());
@@ -125,7 +145,7 @@ public class CreateReportLog {
File[] fileArray = f.listFiles(); File[] fileArray = f.listFiles();
for (File config : fileArray) { for (File config : fileArray) {
if (config.getName().contains(jar) && config.getName().contains(".jar")) { if (config.getName().contains(pluginName) && config.getName().contains(".jar")) {
addFileToZip("T2Code-Plugins", config.getPath(), zip, false); addFileToZip("T2Code-Plugins", config.getPath(), zip, false);
} }
} }
@@ -170,7 +190,7 @@ public class CreateReportLog {
while ((len = in.read(buf)) > 0) { while ((len = in.read(buf)) > 0) {
try { try {
zip.write(buf, 0, len); zip.write(buf, 0, len);
} catch (Exception ex){ } catch (Exception ex) {
ex.printStackTrace(); ex.printStackTrace();
} }
} }

View File

@@ -13,7 +13,6 @@ public class JoinEvent implements Listener {
@EventHandler @EventHandler
public void onJoinEvent(PlayerLoginEvent event) { public void onJoinEvent(PlayerLoginEvent event) {
Player player = event.getPlayer();
UpdateAPI.join(Main.plugin, Util.getPrefix(), "t2code.lib.updatemsg", event.getPlayer(), Main.spigot, Main.discord); UpdateAPI.join(Main.plugin, Util.getPrefix(), "t2code.lib.updatemsg", event.getPlayer(), Main.spigot, Main.discord);
} }
} }

View File

@@ -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();

View File

@@ -9,6 +9,7 @@ public class SelectLibConfig {
public static Boolean UpdateCheckOnJoin; public static Boolean UpdateCheckOnJoin;
public static Boolean t2cTestDevelopment;
public static Integer UpdateCheckTimeInterval; public static Integer UpdateCheckTimeInterval;
public static Boolean Debug; public static Boolean Debug;
public static String language; public static String language;
@@ -19,6 +20,7 @@ public class SelectLibConfig {
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config); YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
UpdateCheckOnJoin = yamlConfiguration.getBoolean("Plugin.UpdateCheck.OnJoin"); UpdateCheckOnJoin = yamlConfiguration.getBoolean("Plugin.UpdateCheck.OnJoin");
t2cTestDevelopment = yamlConfiguration.getBoolean("t2cTestDevelopment");
UpdateCheckTimeInterval = yamlConfiguration.getInt("Plugin.UpdateCheck.TimeInterval"); UpdateCheckTimeInterval = yamlConfiguration.getInt("Plugin.UpdateCheck.TimeInterval");
Debug = yamlConfiguration.getBoolean("Plugin.Debug"); Debug = yamlConfiguration.getBoolean("Plugin.Debug");
language = yamlConfiguration.getString("Plugin.language"); language = yamlConfiguration.getString("Plugin.language");

View File

@@ -11,12 +11,12 @@ import java.io.File;
public class SelectLibMsg { public class SelectLibMsg {
private static Plugin plugin = Main.plugin; private static Plugin plugin = Main.plugin;
private static String prefix = Main.prefix; private static String prefix = Main.prefix;
public static String selectMSG; public static String selectMSG;
public static String VaultNotSetUp; public static String vaultNotSetUp;
public static String SoundNotFound; public static String soundNotFound;
public static void onSelect(String Prefix) { public static void onSelect(String Prefix) {
@@ -38,11 +38,9 @@ private static String prefix = Main.prefix;
} else selectMSG = SelectLibConfig.language; } else selectMSG = SelectLibConfig.language;
YamlConfiguration yamlConfiguration_msg = YamlConfiguration.loadConfiguration(msg); YamlConfiguration yamlConfiguration_msg = YamlConfiguration.loadConfiguration(msg);
VaultNotSetUp = Replace.replace(prefix, yamlConfiguration_msg.getString("Plugin.VaultNotSetUp")); vaultNotSetUp = Replace.replace(prefix, yamlConfiguration_msg.getString("Plugin.VaultNotSetUp"));
SoundNotFound = Replace.replace(prefix, yamlConfiguration_msg.getString("Plugin.SoundNotFound")); soundNotFound = Replace.replace(prefix, yamlConfiguration_msg.getString("Plugin.SoundNotFound"));
send.console(Prefix + " §2Language successfully selected to: §6" + selectMSG + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
send.console(Prefix + " §2Language successfully selected to: §6" + selectMSG + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
} }
} }

View File

@@ -1,5 +1,8 @@
package net.t2code.lib; package net.t2code.lib;
import java.util.Arrays;
import java.util.List;
public class Util { public class Util {
private static Boolean Snapshot = false; private static Boolean Snapshot = false;
@@ -32,4 +35,24 @@ public class Util {
public static Boolean getSnapshot(){ public static Boolean getSnapshot(){
return Snapshot; return Snapshot;
} }
public static List<String> getT2cPlugins() {
return t2cPlugins;
}
private static List<String> t2cPlugins =
Arrays.asList(
"T2C-LuckyBox",
"WonderBagShop",
"CommandGUI",
"OPSecurity",
"PaPiTest",
"PlotSquaredGUI",
"T2C-Alias",
"T2C-AutoResponse",
"LoreEditor",
"Booster",
"AntiMapCopy",
"AntiCopy"
);
} }

View File

@@ -2,4 +2,4 @@ name: T2CodeLib
version: ${project.version} version: ${project.version}
main: net.t2code.lib.Bungee.BMain main: net.t2code.lib.Bungee.BMain
author: JaTiTV, Jkobs author: JaTiTV, Jkobs
description: Libarie from T2Code Plugins description: Library from T2Code Plugins

View File

@@ -4,7 +4,7 @@ main: net.t2code.lib.Spigot.system.Main
api-version: 1.13 api-version: 1.13
prefix: T2CodeLib prefix: T2CodeLib
authors: [ JaTiTV, Jkobs ] authors: [ JaTiTV, Jkobs ]
description: Libarie from T2Code Plugins description: Library from T2Code Plugins
website: T2Code.net website: T2Code.net
load: STARTUP load: STARTUP
softdepend: [ PlaceholderAPI, PlotSquared, CMI, CMILib, Vault, Economy, XConomy ] softdepend: [ PlaceholderAPI, PlotSquared, CMI, CMILib, Vault, Economy, XConomy ]

View File

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

Some files were not shown because too many files have changed in this diff Show More