mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-23 09:27:45 +01:00
Make it clear in error messages that api-version above 1.13 is also supported
This commit is contained in:
parent
fba9f4876b
commit
3f6d0de989
@ -113,7 +113,7 @@ public final class CraftLegacy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Item fromLegacyData(Material material, short data) {
|
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);
|
MaterialData materialData = new MaterialData(material, (byte) data);
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ public class Commodore
|
|||||||
Material.valueOf( "LEGACY_" + name );
|
Material.valueOf( "LEGACY_" + name );
|
||||||
} catch ( IllegalArgumentException ex )
|
} 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 );
|
super.visitFieldInsn( opcode, owner, "LEGACY_" + name, desc );
|
||||||
|
Loading…
Reference in New Issue
Block a user