Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
Add 1.19 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Puyodead1 committed Jul 1, 2022
1 parent e4efd71 commit 20a371d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<dependency>
<groupId>de.tr7zw</groupId>
<artifactId>item-nbt-api</artifactId>
<version>2.9.2</version>
<version>2.10.0</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -112,7 +112,7 @@
<configuration>
<target>
<copy file="target/${project.name}-${project.version}.jar"
toFile="C:\Users\23562\Desktop\TestServer\1.19\plugins\${project.name}-${project.version}.jar"/>
toFile="C:\Users\Puyodead1\Desktop\TestServer\1.19\plugins\${project.name}-${project.version}.jar"/>
</target>
</configuration>
<goals>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void onEnable() {
EnchantCrystalsUtils.sendConsole(PREFIX + "&bMinecraft Version: &e" + getServer().getVersion());
EnchantCrystalsUtils.sendConsole(PREFIX + "&bBukkit Version: &e" + getServer().getBukkitVersion());
EnchantCrystalsUtils.sendConsole(PREFIX + "&bNMS Version: &e" + Version.getNMSVersionString() + " (" + Version.getNMSVersionInt() + ")");
EnchantCrystalsUtils.sendConsole(PREFIX + "&d=============================================================");
EnchantCrystalsUtils.sendConsole(PREFIX + "&d=========================");

// disable plugin if the server is running a newer version
if (Version.getCurrentVersion() == Version.TOO_NEW) {
Expand Down Expand Up @@ -66,13 +66,16 @@ public void onEnable() {
break;
case v1_18_R1:
case v1_18_R2:
case v1_19_R1:
nms = new NMS_v1_18();
break;
}

initConfig();
initEvents();
initCommands();

EnchantCrystalsUtils.sendConsole(PREFIX + "&d=============================================================");
}

@Override
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/me/puyodead1/enchantcrystals/nms/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

public enum Version {
TOO_OLD(-1),
TOO_NEW(-2),
v1_7_R1(171), v1_7_R2(172), v1_7_R3(173), v1_7_R4(174),
v1_8_R1(181), v1_8_R2(182), v1_8_R3(183),
v1_9_R1(191), v1_9_R2(192),
Expand All @@ -16,7 +17,7 @@ public enum Version {
v1_16_R1(1161), v1_16_R2(1162), v1_16_R3(1163),
v1_17_R1(1171),
v1_18_R1(1181), v1_18_R2(1182),
TOO_NEW(-2);
v1_19_R1(1191);

private static Version currentVersion;
private static Version latest;
Expand Down

0 comments on commit 20a371d

Please sign in to comment.