Skip to content

Commit 9dcbf0a

Browse files
authored
Throw exception for CraftMagicNumbers#getMappingsVersion (#12676)
1 parent 153080f commit 9dcbf0a

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -266,22 +266,12 @@ public Material getMaterial(String material, int version) {
266266
}
267267

268268
/**
269-
* This string should be changed if the NMS mappings do.
270-
*
271-
* It has no meaning and should only be used as an equality check. Plugins
272-
* which are sensitive to the NMS mappings may read it and refuse to load if
273-
* it cannot be found or is different to the expected value.
274-
*
275-
* Remember: NMS is not supported API and may break at any time for any
276-
* reason irrespective of this. There is often supported API to do the same
277-
* thing as many common NMS usages. If not, you are encouraged to open a
278-
* feature and/or pull request for consideration, or use a well abstracted
279-
* third-party API such as ProtocolLib.
280-
*
281-
* @return string
269+
* @deprecated in favor of {@link io.papermc.paper.ServerBuildInfo#minecraftVersionId()}
270+
* Paper has used Mojang mappings since 1.20.5, and this method no longer returns a useful value.
282271
*/
272+
@Deprecated(forRemoval = true, since = "1.21.6")
283273
public String getMappingsVersion() {
284-
return "7ecad754373a5fbc43d381d7450c53a5";
274+
throw new UnsupportedOperationException("Use ServerBuildInfo#minecraftVersionId instead.");
285275
}
286276

287277
@Override

0 commit comments

Comments
 (0)