Compare commits
7 Commits
4bdbe98f8a
...
11.9
Author | SHA1 | Date | |
---|---|---|---|
066496dea0 | |||
d7cad5524c | |||
df01efdfbd | |||
f27ec3c985 | |||
abf95ecf0c | |||
7e627f5033 | |||
efb66696eb |
8
.idea/artifacts/T2CodeLib.xml
generated
8
.idea/artifacts/T2CodeLib.xml
generated
@@ -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>
|
|
8
.idea/artifacts/T2CodeLib_1_0_0_32.xml
generated
8
.idea/artifacts/T2CodeLib_1_0_0_32.xml
generated
@@ -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>
|
|
5
.idea/jarRepositories.xml
generated
5
.idea/jarRepositories.xml
generated
@@ -26,6 +26,11 @@
|
|||||||
<option name="name" value="Maven Central repository" />
|
<option name="name" value="Maven Central repository" />
|
||||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
</remote-repository>
|
</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>
|
<remote-repository>
|
||||||
<option name="id" value="placeholderapi" />
|
<option name="id" value="placeholderapi" />
|
||||||
<option name="name" value="placeholderapi" />
|
<option name="name" value="placeholderapi" />
|
||||||
|
@@ -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>
|
|
@@ -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>
|
|
@@ -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>
|
|
@@ -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>
|
|
@@ -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>
|
|
@@ -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>
|
|
@@ -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>
|
|
@@ -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>
|
|
@@ -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>
|
|
@@ -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>
|
|
13
.idea/libraries/Maven__org_yaml_snakeyaml_1_28.xml
generated
13
.idea/libraries/Maven__org_yaml_snakeyaml_1_28.xml
generated
@@ -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>
|
|
10
.idea/runConfigurations.xml
generated
10
.idea/runConfigurations.xml
generated
@@ -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>
|
|
6
pom.xml
6
pom.xml
@@ -6,12 +6,12 @@
|
|||||||
|
|
||||||
<groupId>net.t2code</groupId>
|
<groupId>net.t2code</groupId>
|
||||||
<artifactId>T2CodeLib</artifactId>
|
<artifactId>T2CodeLib</artifactId>
|
||||||
<version>11.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>
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
</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>
|
||||||
|
|
||||||
|
@@ -15,9 +15,9 @@ public class ItemVersion {
|
|||||||
private static ItemStack RED_WOOL;
|
private static ItemStack RED_WOOL;
|
||||||
private static ItemStack RED_STAINED_GLASS_PANE;
|
private static ItemStack RED_STAINED_GLASS_PANE;
|
||||||
|
|
||||||
public static void scan(){
|
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");
|
||||||
YELLOW_WOOL = new ItemStack(Material.valueOf("WOOL"), 1, (short) 4);
|
YELLOW_WOOL = new ItemStack(Material.valueOf("WOOL"), 1, (short) 4);
|
||||||
ORANGE_WOOL = new ItemStack(Material.valueOf("WOOL"), 1, (short) 1);
|
ORANGE_WOOL = new ItemStack(Material.valueOf("WOOL"), 1, (short) 1);
|
||||||
GREEN_WOOL = new ItemStack(Material.valueOf("WOOL"), 1, (short) 5);
|
GREEN_WOOL = new ItemStack(Material.valueOf("WOOL"), 1, (short) 5);
|
||||||
@@ -35,7 +35,7 @@ public class ItemVersion {
|
|||||||
RED_WOOL = new ItemStack(Material.RED_WOOL);
|
RED_WOOL = new ItemStack(Material.RED_WOOL);
|
||||||
RED_STAINED_GLASS_PANE = new ItemStack(Material.RED_STAINED_GLASS_PANE);
|
RED_STAINED_GLASS_PANE = new ItemStack(Material.RED_STAINED_GLASS_PANE);
|
||||||
}
|
}
|
||||||
HeadIS = new ItemStack(Head);
|
HeadIS = new ItemStack(Head, 1, (byte) 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Material getHead() {
|
public static Material getHead() {
|
||||||
|
@@ -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());
|
||||||
|
}
|
||||||
|
}
|
@@ -2,8 +2,10 @@ 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.config.SelectLibConfig;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@@ -13,6 +15,7 @@ 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, 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);
|
return onLoadHeader(prefix, autor, version, spigot, discord, isPremium, null);
|
||||||
}
|
}
|
||||||
@@ -46,6 +49,7 @@ public class T2CodeTemplate {
|
|||||||
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) {
|
||||||
@@ -95,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) {
|
||||||
|
|
||||||
|
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) {
|
||||||
|
send.sender(sender, prefix + " §2Version: §6" + pluginVersion);
|
||||||
|
} else {
|
||||||
TextComponent comp2 = new TextBuilder(prefix + " §2Version: §6" + pluginVersion)
|
TextComponent comp2 = new TextBuilder(prefix + " §2Version: §6" + pluginVersion)
|
||||||
.addHover("§8Click to copy").addClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, Replace.removeColorCode(prefix) + " - " + pluginVersion).build();
|
.addHover("§8Click to copy").addClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, Replace.removeColorCode(prefix) + " - " + pluginVersion).build();
|
||||||
sender.spigot().sendMessage(comp2);
|
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);
|
||||||
}
|
}
|
||||||
|
@@ -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) {
|
||||||
|
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -12,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"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -28,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;
|
||||||
}
|
}
|
||||||
@@ -45,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;
|
||||||
}
|
}
|
||||||
@@ -56,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;
|
||||||
@@ -81,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;
|
||||||
@@ -89,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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -97,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"));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -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,6 +26,9 @@ 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;
|
||||||
@@ -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)) {
|
|
||||||
if (SelectLibConfig.UpdateCheckOnJoin) {
|
|
||||||
UpdateAPI.sendUpdateMsg(prefix, spigot, discord, pluginVersion, publicVersion, player);
|
UpdateAPI.sendUpdateMsg(prefix, spigot, discord, pluginVersion, publicVersion, player);
|
||||||
}
|
}
|
||||||
}
|
}, 200L);
|
||||||
}
|
|
||||||
}.runTaskLater(plugin, 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,7 +146,7 @@ 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()){
|
if (!plugin.isEnabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Bukkit.getScheduler().runTaskAsynchronously(this.plugin, () -> {
|
Bukkit.getScheduler().runTaskAsynchronously(this.plugin, () -> {
|
||||||
|
@@ -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,7 +21,7 @@ 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 {
|
||||||
return Main.eco.withdrawPlayer(p,price).transactionSuccess();
|
return Main.eco.withdrawPlayer(p,price).transactionSuccess();
|
||||||
}
|
}
|
||||||
@@ -33,7 +34,7 @@ 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 {
|
||||||
return Main.eco.depositPlayer(p,price).transactionSuccess();
|
return Main.eco.depositPlayer(p,price).transactionSuccess();
|
||||||
}
|
}
|
||||||
@@ -49,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) {
|
||||||
@@ -65,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.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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);
|
||||||
}
|
}
|
||||||
|
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -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");
|
||||||
|
@@ -15,8 +15,8 @@ public class SelectLibMsg {
|
|||||||
|
|
||||||
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,8 +38,8 @@ public class SelectLibMsg {
|
|||||||
} 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");
|
||||||
}
|
}
|
||||||
|
@@ -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
|
@@ -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 ]
|
||||||
|
@@ -1,5 +0,0 @@
|
|||||||
name: T2CodeLib
|
|
||||||
version: 11.4
|
|
||||||
main: net.t2code.lib.Bungee.BMain
|
|
||||||
author: JaTiTV, Jkobs
|
|
||||||
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.
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.
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.
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.
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.
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.
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.
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user