1.21 support
minor code changes / bug fixes
This commit is contained in:
JaTiTV 2024-06-15 02:34:34 +02:00
parent cb4a81a3c1
commit 32b57de55c
7 changed files with 337 additions and 37 deletions

View File

@ -14,5 +14,5 @@
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_16" default="true" project-jdk-name="16" project-jdk-type="JavaSDK" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="corretto-17" project-jdk-type="JavaSDK" />
</project>

124
.idea/uiDesigner.xml Normal file
View File

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

14
pom.xml
View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId>
<version>16.5</version>
<version>16.6</version>
<!--version>VERSION_snapshot-0</version-->
<!--version>VERSION_beta-0</version-->
<!--version>VERSION_dev-0</version-->
@ -118,7 +118,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.6-R0.1-SNAPSHOT</version>
<version>1.21-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
@ -134,14 +134,14 @@
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.20-R0.1-SNAPSHOT</version>
<version>1.21-R0.1-SNAPSHOT</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.19-R0.1-SNAPSHOT</version>
<version>1.21-R0.1-SNAPSHOT</version>
<type>javadoc</type>
<scope>provided</scope>
</dependency>
@ -182,19 +182,19 @@
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-minimessage</artifactId>
<version>4.17.0</version>
<version>4.18.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-platform-bukkit</artifactId>
<version>4.3.2</version>
<version>4.3.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-platform-bungeecord</artifactId>
<version>4.3.2</version>
<version>4.3.3</version>
<scope>compile</scope>
</dependency>

View File

@ -1,27 +1,36 @@
package net.t2code.t2codelib.SPIGOT.api.minecraftVersion;
import net.t2code.t2codelib.SPIGOT.api.debug.T2Cdebug;
import net.t2code.t2codelib.SPIGOT.system.T2CodeLibMain;
import org.bukkit.Bukkit;
public class T2CmcVersion {
public static void onCheck() {
mcVersion = Bukkit.getServer().getVersion();
bukkitVersion = Bukkit.getServer().getBukkitVersion();
nms = Bukkit.getServer().getClass().getPackage().getName();
mc1_8 = nms.contains("1_8");
mc1_9 = nms.contains("1_9");
mc1_10 = nms.contains("1_10");
mc1_11 = nms.contains("1_11");
mc1_12 = nms.contains("1_12");
mc1_13 = nms.contains("1_13");
mc1_14 = nms.contains("1_14");
mc1_15 = nms.contains("1_15");
mc1_16 = nms.contains("1_16");
mc1_17 = nms.contains("1_17");
mc1_18 = nms.contains("1_18");
mc1_19 = nms.contains("1_19");
mc1_20 = nms.contains("1_20");
mc1_21 = nms.contains("1_21");
T2CnmsVersions.init();
nms = String.valueOf(T2CnmsVersions.getT2CnmsEnum());
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), "mcVersion: " + mcVersion);
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), "bukkitVersion: " + bukkitVersion);
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), "nms: " + nms);
mc1_8 = mcVersion.contains("MC: 1.8");
mc1_9 = mcVersion.contains("MC: 1.9");
mc1_10 = mcVersion.contains("MC: 1.10");
mc1_11 = mcVersion.contains("MC: 1.11");
mc1_12 = mcVersion.contains("MC: 1.12");
mc1_13 = mcVersion.contains("MC: 1.13");
mc1_14 = mcVersion.contains("MC: 1.14");
mc1_15 = mcVersion.contains("MC: 1.15");
mc1_16 = mcVersion.contains("MC: 1.16");
mc1_17 = mcVersion.contains("MC: 1.17");
mc1_18 = mcVersion.contains("MC: 1.18");
mc1_19 = mcVersion.contains("MC: 1.19");
mc1_20 = mcVersion.contains("MC: 1.20");
mc1_21 = mcVersion.contains("MC: 1.21");
nms1_8_R1 = nms.contains("1_8_R1");
nms1_8_R2 = nms.contains("1_8_R2");
@ -47,7 +56,6 @@ public class T2CmcVersion {
nms1_20_R2 = nms.contains("1_20_R2");
nms1_20_R3 = nms.contains("1_20_R3");
nms1_20_R4 = nms.contains("1_20_R4");
nms1_20_R5 = nms.contains("1_20_R5");
nms1_21_R1 = nms.contains("1_21_R1");
}
@ -93,7 +101,6 @@ public class T2CmcVersion {
private static boolean nms1_20_R2;
private static boolean nms1_20_R3;
private static boolean nms1_20_R4;
private static boolean nms1_20_R5;
private static boolean nms1_21_R1;
public static String getMcVersion() {
@ -260,10 +267,6 @@ public class T2CmcVersion {
return nms1_20_R4;
}
public static boolean isNms1_20_R5() {
return nms1_20_R5;
}
public static boolean isNms1_21_R1() {
return nms1_21_R1;
}

View File

@ -0,0 +1,31 @@
package net.t2code.t2codelib.SPIGOT.api.minecraftVersion;
public enum T2CnmsEnum {
not_support,
v1_8_R1,
v1_8_R2,
v1_8_R3,
v1_9_R1,
v1_9_R2,
v1_10_R1,
v1_11_R1,
v1_12_R1,
v1_13_R1,
v1_13_R2,
v1_14_R1,
v1_15_R1,
v1_16_R1,
v1_16_R2,
v1_16_R3,
v1_17_R1,
v1_18_R1,
v1_18_R2,
v1_19_R1,
v1_19_R2,
v1_19_R3,
v1_20_R1,
v1_20_R2,
v1_20_R3,
v1_20_R4,
v1_21_R1,
}

View File

@ -0,0 +1,129 @@
package net.t2code.t2codelib.SPIGOT.api.minecraftVersion;
import lombok.Getter;
import net.t2code.t2codelib.SPIGOT.api.debug.T2Cdebug;
import net.t2code.t2codelib.SPIGOT.system.T2CodeLibMain;
public class T2CnmsVersions {
public static Class minecraftServerClass;
@Getter
private static T2CnmsEnum t2CnmsEnum;
public static void init() {
String mc = T2CmcVersion.getMcVersion();
if (mc.contains("(MC: 1.8)") || mc.contains("(MC: 1.8.1)")) {
t2CnmsEnum = T2CnmsEnum.v1_8_R1;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.8.3)")) {
t2CnmsEnum = T2CnmsEnum.v1_8_R2;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.8.4)") || mc.contains("(MC: 1.8.5)") || mc.contains("(MC: 1.8.6)") || mc.contains("(MC: 1.8.7)") || mc.contains("(MC: 1.8.8)")) {
t2CnmsEnum = T2CnmsEnum.v1_8_R3;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.9)") || mc.contains("(MC: 1.9.2)")) {
t2CnmsEnum = T2CnmsEnum.v1_9_R1;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.9.3)") || mc.contains("(MC: 1.9.4)")) {
t2CnmsEnum = T2CnmsEnum.v1_9_R2;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.10")) {
t2CnmsEnum = T2CnmsEnum.v1_10_R1;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.11")) {
t2CnmsEnum = T2CnmsEnum.v1_11_R1;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.12")) {
t2CnmsEnum = T2CnmsEnum.v1_12_R1;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.13)")) {
t2CnmsEnum = T2CnmsEnum.v1_13_R1;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.13.1)") || mc.contains("(MC: 1.13.2)")) {
t2CnmsEnum = T2CnmsEnum.v1_13_R2;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.14")) {
t2CnmsEnum = T2CnmsEnum.v1_14_R1;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.15")) {
t2CnmsEnum = T2CnmsEnum.v1_15_R1;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.16)") || mc.contains("(MC: 1.16.1)")) {
t2CnmsEnum = T2CnmsEnum.v1_16_R1;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.16.2)") || mc.contains("(MC: 1.16.3)")) {
t2CnmsEnum = T2CnmsEnum.v1_16_R2;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.16.4)") || mc.contains("(MC: 1.16.5)")) {
t2CnmsEnum = T2CnmsEnum.v1_16_R3;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.17")) {
t2CnmsEnum = T2CnmsEnum.v1_17_R1;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.18)") || mc.contains("(MC: 1.18.1)")) {
t2CnmsEnum = T2CnmsEnum.v1_18_R1;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.18.2)")) {
t2CnmsEnum = T2CnmsEnum.v1_18_R2;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.19)") || mc.contains("(MC: 1.19.1)") || mc.contains("(MC: 1.19.2)")) {
t2CnmsEnum = T2CnmsEnum.v1_19_R1;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.19.3)")) {
t2CnmsEnum = T2CnmsEnum.v1_19_R2;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.19.4)")) {
t2CnmsEnum = T2CnmsEnum.v1_19_R3;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.20)") || mc.contains("(MC: 1.20.1)")) {
t2CnmsEnum = T2CnmsEnum.v1_20_R1;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.20.2)")) {
t2CnmsEnum = T2CnmsEnum.v1_20_R2;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.20.3)") || mc.contains("(MC: 1.20.4)")) {
t2CnmsEnum = T2CnmsEnum.v1_20_R3;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.20.6)")) {
t2CnmsEnum = T2CnmsEnum.v1_20_R4;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else if (mc.contains("(MC: 1.21)")) {
t2CnmsEnum = T2CnmsEnum.v1_21_R1;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
} else t2CnmsEnum = T2CnmsEnum.not_support;
T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), String.valueOf(t2CnmsEnum));
}
//
// public static void init() {
//
//
// // List<String> list= Arrays.stream(Class .getPackages()).map(Package::getName).filter(n -> n.startsWith("net.minecraft.server")).collect(Collectors.toList());
//
// // for (String s : list){
// // T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(),s);
// //}
//
//
// for (T2CnmsEnum nmsEnum : T2CnmsEnum.values()) {
// try {
// minecraftServerClass = Class.forName("net.minecraft.server." + nmsEnum + ".MinecraftServer");
// } catch (ClassNotFoundException ignored) {
//
// }
//
// if (minecraftServerClass != null) {
// return;
// }
//
// }
// // todo nicht kompatiebel
// T2Cdebug.debugmsg(T2CodeLibMain.getPlugin(), "nicht kompa");
//
// }
}

View File

@ -9,6 +9,8 @@ import net.t2code.t2codelib.SPIGOT.api.items.T2CitemVersion;
import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
import net.t2code.t2codelib.SPIGOT.api.messages.T2Ctemplate;
import net.t2code.t2codelib.SPIGOT.api.minecraftVersion.T2CmcVersion;
import net.t2code.t2codelib.SPIGOT.api.minecraftVersion.T2CnmsEnum;
import net.t2code.t2codelib.SPIGOT.api.minecraftVersion.T2CnmsVersions;
import net.t2code.t2codelib.SPIGOT.api.plugins.T2CpluginCheck;
import net.t2code.t2codelib.SPIGOT.api.update.T2CupdateAPI;
import net.t2code.t2codelib.SPIGOT.system.bstats.Metrics;
@ -62,10 +64,11 @@ public final class T2CodeLibMain extends JavaPlugin {
}
T2CmcVersion.onCheck();
if (T2CmcVersion.isNms1_20_R5()) {
if (T2CnmsVersions.getT2CnmsEnum() == T2CnmsEnum.not_support) {
T2Csend.console(prefix + " §4!!!!!!!!!!!!!!!!!!!!");
T2Csend.console(prefix);
T2Csend.warning(plugin, "The 1.20.* (NMS R5) is a very fresh / new version. If there are any bugs in our plugins, please report them to us via our Discord: http://dc.t2code.net");
T2Csend.warning(plugin, "The " + T2CmcVersion.getMcVersion() + " is a very fresh / new version.");
T2Csend.warning(plugin, "The plugin may not yet be supported on this server! If there are any bugs in our plugins, please report them to us via our Discord: http://dc.t2code.net");
T2Csend.console(prefix);
T2Csend.console(prefix + " §4!!!!!!!!!!!!!!!!!!!!");
if (!SelectLibConfig.getT2cTestDevelopment()) {
@ -75,7 +78,8 @@ public final class T2CodeLibMain extends JavaPlugin {
e.printStackTrace();
}
}
}if (T2CmcVersion.isMc1_21()) {
}
if (T2CmcVersion.isMc1_21()) {
T2Csend.console(prefix + " §4!!!!!!!!!!!!!!!!!!!!");
T2Csend.console(prefix);
T2Csend.warning(plugin, "The 1.21 is a very fresh / new version. If there are any bugs in our plugins, please report them to us via our Discord: http://dc.t2code.net");
@ -89,22 +93,31 @@ public final class T2CodeLibMain extends JavaPlugin {
}
}
}
T2Csend.console(prefix + " §3Server run on: §6" + T2CmcVersion.getMcVersion() + " / " + T2CmcVersion.getNms());
T2Ctemplate.onLoadSeparateStroke(prefix);
T2Csend.console(prefix + " §2Server run on:");
T2Csend.console(prefix + " §3mcVersion: §6" + T2CmcVersion.getMcVersion());
T2Csend.console(prefix + " §3bukkitVersion: §6" + T2CmcVersion.getBukkitVersion());
T2Csend.console(prefix + " §3nms: §6" + T2CmcVersion.getNms());
T2Ctemplate.onLoadSeparateStroke(prefix);
if (eco != null) {
String st = eco.getName();
if (eco.getName().equals("CMIEconomy")) st = "CMI";
if (Bukkit.getPluginManager().getPlugin(st) != null) {
T2Csend.console(prefix + " §3Economy: §6" + eco.getName() + " - " + Bukkit.getPluginManager().getPlugin(st).getDescription().getVersion() + " §7- §e" +
(System.currentTimeMillis() - long_) + "ms");
} else T2Csend.console(prefix + " §3Economy: §6" + eco.getName() + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
} else T2Csend.console(prefix + " §3Economy: §4not connected via vault!" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
} else
T2Csend.console(prefix + " §3Economy: §6" + eco.getName() + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
} else
T2Csend.console(prefix + " §3Economy: §4not connected via vault!" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
if (perm != null) {
if (Bukkit.getPluginManager().getPlugin(perm.getName()) != null) {
T2Csend.console(prefix + " §3Permission plugin: §6" + perm.getName() + " - " + Bukkit.getPluginManager().getPlugin(perm.getName()).getDescription().getVersion()
+ " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
} else T2Csend.console(prefix + " §3Permission plugin: §6" + perm.getName() + " - §7- §e" + (System.currentTimeMillis() - long_) + "ms");
} else T2Csend.console(prefix + " §3Permission plugin: §4not connected via vault!" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
} else
T2Csend.console(prefix + " §3Permission plugin: §6" + perm.getName() + " - §7- §e" + (System.currentTimeMillis() - long_) + "ms");
} else
T2Csend.console(prefix + " §3Permission plugin: §4not connected via vault!" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
if (T2CpluginCheck.papi()) {
T2Csend.console(prefix + " §3PlaceholderAPI: §6connected" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");