Fix ReflectionManager for 1.18.2

This commit is contained in:
Doc 2022-03-04 17:55:44 -03:00
parent 0411e4bcc6
commit d69b920ec7
No known key found for this signature in database
GPG Key ID: 20C3B20323EFD295

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);