From 7d47bd7c7f75f044626444d751514e33fa0ed571 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sun, 23 Feb 2020 09:42:33 +1100 Subject: [PATCH] Make it clear in error messages that api-version above 1.13 is also supported By: md_5 --- .../main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java | 2 +- .../src/main/java/org/bukkit/craftbukkit/util/Commodore.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java index 3e953b700f..049e9f98de 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java @@ -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); diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/Commodore.java index e3b49b7266..2d334a5944 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/Commodore.java @@ -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 );