1.22.1
This commit is contained in:
parent
587f0567d8
commit
61a6445450
3 changed files with 8 additions and 4 deletions
4
pom.xml
4
pom.xml
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<groupId>pk.ajneb97</groupId>
|
<groupId>pk.ajneb97</groupId>
|
||||||
<artifactId>PlayerKits2</artifactId>
|
<artifactId>PlayerKits2</artifactId>
|
||||||
<version>1.21.2</version>
|
<version>1.22.1</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>21</maven.compiler.source>
|
<maven.compiler.source>21</maven.compiler.source>
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
<artifactId>spigot-api</artifactId>
|
<artifactId>spigot-api</artifactId>
|
||||||
<version>1.21.11-R0.1-SNAPSHOT</version>
|
<version>26.1-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
||||||
|
|
@ -150,11 +150,14 @@ public class PlayerKits2 extends JavaPlugin {
|
||||||
case "1.21.11":
|
case "1.21.11":
|
||||||
serverVersion = ServerVersion.v1_21_R7;
|
serverVersion = ServerVersion.v1_21_R7;
|
||||||
break;
|
break;
|
||||||
|
case "26.1":
|
||||||
|
serverVersion = ServerVersion.v26_1;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
try{
|
try{
|
||||||
serverVersion = ServerVersion.valueOf(packageName.replace("org.bukkit.craftbukkit.", ""));
|
serverVersion = ServerVersion.valueOf(packageName.replace("org.bukkit.craftbukkit.", ""));
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
serverVersion = ServerVersion.v1_21_R7;
|
serverVersion = ServerVersion.v26_1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,8 @@ public enum ServerVersion {
|
||||||
v1_21_R4,
|
v1_21_R4,
|
||||||
v1_21_R5,
|
v1_21_R5,
|
||||||
v1_21_R6,
|
v1_21_R6,
|
||||||
v1_21_R7;
|
v1_21_R7,
|
||||||
|
v26_1;
|
||||||
|
|
||||||
public boolean serverVersionGreaterEqualThan(ServerVersion version1,ServerVersion version2){
|
public boolean serverVersionGreaterEqualThan(ServerVersion version1,ServerVersion version2){
|
||||||
return version1.ordinal() >= version2.ordinal();
|
return version1.ordinal() >= version2.ordinal();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue