Skip to content

Latest commit

 

History

History
100 lines (91 loc) · 6.13 KB

README.md

File metadata and controls

100 lines (91 loc) · 6.13 KB

NMS Versions Update Task Last Update Latest Included Version

This repository contains an automatically updated JSON file which links the Bukkit versions (e.g. 1.20.6-R0.1-SNAPSHOT) to the corresponding NMS version (e.g. 1_20_R4).
This is useful for Spigot plugins which use NMS and have a Wrapper class for each different version, because as of Paper 1.20.5 the craftbukkit packages no longer contain the NMS version and you can't parse the NMS version from that package like before.

Usage

The raw file is available here: nms-versions.json

An example of parsing the NMS version would be the following:

try {
    HttpURLConnection conn = (HttpURLConnection) new URL("https://raw.githubusercontent.com/Rapha149/NMSVersions/main/nms-versions.json").openConnection();
    conn.setRequestMethod("GET");
    conn.connect();

    try (BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {
        JSONObject json = new JSONObject(br.lines().collect(Collectors.joining()));
        if (json.has(Bukkit.getBukkitVersion())) {
            String nmsVersion = json.getString(Bukkit.getBukkitVersion());
        } else {
            // Version is not yet available in the json file, see the updates section
        }
    }
} catch (IOException e) {
    // Handle exception
}

Updates

The file is updated every 12 hours.
However, the NMS versions are parsed from the NMS repository at repo.codemc.io which means that that repository first has to update before the file can get updated.

Versions

Minecraft Version NMS Version Bukkit Version String
1.21.4 1_21_R3 1.21.4-R0.1-SNAPSHOT
1.21.3 1_21_R2 1.21.3-R0.1-SNAPSHOT
1.21.1 1_21_R1 1.21.1-R0.1-SNAPSHOT
1.20.6 1_20_R4 1.20.6-R0.1-SNAPSHOT
1.20.5 1_20_R4 1.20.5-R0.1-SNAPSHOT
1.20.4 1_20_R3 1.20.4-R0.1-SNAPSHOT
1.20.3 1_20_R3 1.20.3-R0.1-SNAPSHOT
1.20.2 1_20_R2 1.20.2-R0.1-SNAPSHOT
1.20.1 1_20_R1 1.20.1-R0.1-SNAPSHOT
1.20 1_20_R1 1.20-R0.1-SNAPSHOT
1.19.4 1_19_R3 1.19.4-R0.1-SNAPSHOT
1.19.3 1_19_R2 1.19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