Merge pull request #643 from Doc94/fix/1-18-2-reflection

Fix ReflectionManager for 1.18.2
This commit is contained in:
libraryaddict 2022-03-05 10:03:41 +13:00 committed by GitHub
commit 074f761b86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -452,7 +452,7 @@ public class ReflectionManager implements ReflectionManagerAbstract {
public ItemMeta getDeserializedItemMeta(Map<String, Object> meta) { public ItemMeta getDeserializedItemMeta(Map<String, Object> meta) {
try { try {
Class<?> aClass = Class.forName("org.bukkit.craftbukkit.v1_18_R1.inventory.CraftMetaItem$SerializableMeta"); Class<?> aClass = Class.forName("org.bukkit.craftbukkit.v1_18_R2.inventory.CraftMetaItem$SerializableMeta");
Method deserialize = aClass.getDeclaredMethod("deserialize", Map.class); Method deserialize = aClass.getDeclaredMethod("deserialize", Map.class);
Object itemMeta = deserialize.invoke(null, meta); Object itemMeta = deserialize.invoke(null, meta);