From 8e1273111939d38e42091472d3a75a172e982fed Mon Sep 17 00:00:00 2001 From: Vankka Date: Tue, 27 Jun 2023 21:22:21 +0300 Subject: [PATCH] Fix error in BukkitAdvancementListener --- .../bukkit/listener/award/BukkitAdvancementListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bukkit/bukkit1_12/src/main/java/com/discordsrv/bukkit/listener/award/BukkitAdvancementListener.java b/bukkit/bukkit1_12/src/main/java/com/discordsrv/bukkit/listener/award/BukkitAdvancementListener.java index 90fdec97..c4f1c618 100644 --- a/bukkit/bukkit1_12/src/main/java/com/discordsrv/bukkit/listener/award/BukkitAdvancementListener.java +++ b/bukkit/bukkit1_12/src/main/java/com/discordsrv/bukkit/listener/award/BukkitAdvancementListener.java @@ -80,8 +80,8 @@ public class BukkitAdvancementListener extends AbstractBukkitAwardListener { forwarder.publishEvent( event, event.getPlayer(), - data.titleJson != null ? ComponentUtil.toAPI(BukkitComponentSerializer.gson().deserialize(data.titleJson)) : null, data.nameJson != null ? ComponentUtil.toAPI(BukkitComponentSerializer.gson().deserialize(data.nameJson)) : null, + data.titleJson != null ? ComponentUtil.toAPI(BukkitComponentSerializer.gson().deserialize(data.titleJson)) : null, false); } catch (ReflectiveOperationException e) { logger.debug("Failed to get advancement data", e); @@ -143,7 +143,7 @@ public class BukkitAdvancementListener extends AbstractBukkitAwardListener { } private String toJson(Object chat) throws ReflectiveOperationException { - return (String) toJsonMethod.invoke(chat); + return (String) toJsonMethod.invoke(null, chat); } }