13
0
geforkt von Mirrors/Paper

Make it clear in error messages that api-version above 1.13 is also supported

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2020-02-23 09:42:33 +11:00
Ursprung 153bdf9192
Commit 7d47bd7c7f
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -113,7 +113,7 @@ public final class CraftLegacy {
}
public static Item fromLegacyData(Material material, short data) {
Preconditions.checkArgument(material.isLegacy(), "fromLegacyData on modern Material. Did you forget to define api-version: 1.13 in your plugin.yml?");
Preconditions.checkArgument(material.isLegacy(), "fromLegacyData on modern Material. Did you forget to define a modern (1.13+) api-version in your plugin.yml?");
MaterialData materialData = new MaterialData(material, (byte) data);

Datei anzeigen

@ -173,7 +173,7 @@ public class Commodore
Material.valueOf( "LEGACY_" + name );
} catch ( IllegalArgumentException ex )
{
throw new AuthorNagException( "No legacy enum constant for " + name + ". Did you forget to define api-version: 1.13 in your plugin.yml?" );
throw new AuthorNagException( "No legacy enum constant for " + name + ". Did you forget to define a modern (1.13+) api-version in your plugin.yml?" );
}
super.visitFieldInsn( opcode, owner, "LEGACY_" + name, desc );