add minMcVersion (public static boolean minMc1_13() etc.) to net.t2code.t2codelib.SPIGOT.api.minecraftVersion.T2CmcVersion
This commit is contained in:
JaTiTV 2023-06-26 11:14:11 +02:00
parent 034bf241e5
commit a3ec7117dd
4 changed files with 62 additions and 3 deletions

View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId>
<version>15.2</version>
<version>15.3</version>
<!--version>VERSION_snapshot-0</version-->
<!--version>VERSION_beta-0</version-->
<!--version>VERSION_dev-0</version-->

View File

@ -233,7 +233,62 @@ public class T2CmcVersion {
public static boolean isNms1_20_R1() {
return nms1_20_R1;
}
public static boolean isNms1_20_R2() {
return nms1_20_R2;
}
public static boolean minMc1_8() {
return isMc1_8();
}
public static boolean minMc1_9() {
return !isMc1_8();
}
public static boolean minMc1_10() {
return !isMc1_8() && !isMc1_9();
}
public static boolean minMc1_11() {
return !isMc1_8() && !isMc1_9() && !isMc1_10();
}
public static boolean minMc1_12() {
return !isMc1_8() && !isMc1_9() && !isMc1_10() && !isMc1_11();
}
public static boolean minMc1_13() {
return !isMc1_8() && !isMc1_9() && !isMc1_10() && !isMc1_11() && !isMc1_12() ;
}
public static boolean minMc1_14() {
return !isMc1_8() && !isMc1_9() && !isMc1_10() && !isMc1_11() && !isMc1_12() && !isMc1_13();
}
public static boolean minMc1_15() {
return !isMc1_8() && !isMc1_9() && !isMc1_10() && !isMc1_11() && !isMc1_12() && !isMc1_13() && !isMc1_14() ;
}
public static boolean minMc1_16() {
return !isMc1_8() && !isMc1_9() && !isMc1_10() && !isMc1_11() && !isMc1_12() && !isMc1_13() && !isMc1_14() && !isMc1_15();
}
public static boolean minMc1_17() {
return !isMc1_8() && !isMc1_9() && !isMc1_10() && !isMc1_11() && !isMc1_12() && !isMc1_13() && !isMc1_14() && !isMc1_15() && !isMc1_16();
}
public static boolean minMc1_18() {
return !isMc1_8() && !isMc1_9() && !isMc1_10() && !isMc1_11() && !isMc1_12() && !isMc1_13() && !isMc1_14() && !isMc1_15() && !isMc1_16() && !isMc1_17();
}
public static boolean minMc1_19() {
return !isMc1_8() && !isMc1_9() && !isMc1_10() && !isMc1_11() && !isMc1_12() && !isMc1_13() && !isMc1_14() && !isMc1_15() && !isMc1_16() && !isMc1_17() && !isMc1_18();
}
public static boolean minMc1_20() {
return !isMc1_8() && !isMc1_9() && !isMc1_10() && !isMc1_11() && !isMc1_12() && !isMc1_13() && !isMc1_14() && !isMc1_15() && !isMc1_16() && !isMc1_17()
&& !isMc1_18() && !isMc1_19();
}
}

View File

@ -2,6 +2,7 @@ package net.t2code.t2codelib.SPIGOT.system.cmd;
import net.t2code.t2codelib.SPIGOT.api.debug.T2Cdebug;
import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
import net.t2code.t2codelib.SPIGOT.api.minecraftVersion.T2CmcVersion;
import net.t2code.t2codelib.SPIGOT.api.update.T2CupdateAPI;
import net.t2code.t2codelib.SPIGOT.api.bungeePlayers.T2CbungeePlayers;
import net.t2code.t2codelib.SPIGOT.system.T2CbungeeCommandSenderReciver;
@ -51,7 +52,7 @@ public class CmdExecuter implements CommandExecutor, TabCompleter {
Commands.debug(sender, args);
return false;
case "test":
T2Csend.sender(sender, T2CbungeePlayers.getBungeePlayers().toString());
Commands.test(sender, args);
return false;
case "serverid":
T2Csend.sender(sender, ("[prefix] <red>T2C ServerID:</red> <gold><hover:show_text:'<yellow>copy</yellow>'>" +

View File

@ -16,6 +16,9 @@ public class Commands {
public static void info(CommandSender sender) {
T2Ctemplate.sendInfo(sender, T2CodeLibMain.getPlugin(), Util.getSpigotID(), Util.getDiscord(), null, Util.getInfoText());
}
public static void test(CommandSender sender, String[] args) {
T2Csend.sender(sender,Util.getPrefix()+" &4Currently there is no development test command");
}
public static void debug(CommandSender sender, String[] args) {
if (args.length < 2) {