Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support up to 1.21.3 #155

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions helper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<artifactId>helper</artifactId>
<packaging>jar</packaging>
<version>5.6.14</version>
<version>5.6.16</version>

<name>helper</name>
<description>A utility to reduce boilerplate code in Bukkit plugins.</description>
Expand Down Expand Up @@ -163,7 +163,7 @@
<dependency>
<groupId>me.lucko</groupId>
<artifactId>shadow-bukkit</artifactId>
<version>1.20.1</version>
<version>1.21.3</version>
<scope>compile</scope>
</dependency>
<!-- flowpowered math -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ public final class MinecraftVersion implements Comparable<MinecraftVersion> {
/**
* The newest known version of Minecraft
*/
private static final String NEWEST_MINECRAFT_VERSION = "1.20.1";
private static final String NEWEST_MINECRAFT_VERSION = "1.21.3";

/**
* The date (with ISO 8601 or YYYY-MM-DD) when the most recent version was released.
*/
private static final String MINECRAFT_LAST_RELEASE_DATE = "2023-06-07";
private static final String MINECRAFT_LAST_RELEASE_DATE = "2024-10-23";

/**
* Gets the {@link MinecraftVersion} of the runtime server.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
*/
public final class MinecraftVersions {

/**
* Version 1.21 - the tricky trials update
*/
public static final MinecraftVersion v1_21 = MinecraftVersion.parse("1.21");
/**
* Version 1.20 - the trails and tails update
*/
Expand Down
23 changes: 23 additions & 0 deletions helper/src/main/java/me/lucko/helper/reflect/NmsVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,29 @@ protected String getPackageComponent() {
MinecraftVersion.of(1, 19, 0),
MinecraftVersion.of(1, 19, 1),
MinecraftVersion.of(1, 19, 2)
),
v1_20_R1(
MinecraftVersion.of(1, 20, 0),
MinecraftVersion.of(1, 20, 1)
),
v1_20_R2(
MinecraftVersion.of(1, 20, 2)
),
v1_20_R3(
MinecraftVersion.of(1, 20, 3),
MinecraftVersion.of(1, 20, 4)
),
v1_20_R4(
MinecraftVersion.of(1, 20, 5),
MinecraftVersion.of(1, 20, 6)
),
v1_21_R1(
MinecraftVersion.of(1, 21, 0),
MinecraftVersion.of(1, 21, 1)
),
v1_21_R2(
MinecraftVersion.of(1, 21, 2),
MinecraftVersion.of(1, 21, 3)
);

private final Set<MinecraftVersion> minecraftVersions;
Expand Down