From 5dc39f9b83c24f149daf29d510f81a897395b28c Mon Sep 17 00:00:00 2001 From: PikaMug <2267126+PikaMug@users.noreply.github.com> Date: Wed, 20 Jan 2021 17:20:57 -0500 Subject: [PATCH] Improve display of Splash and Lingering Potions including Consume Item --- main/src/main/java/me/blackvein/quests/Quests.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main/src/main/java/me/blackvein/quests/Quests.java b/main/src/main/java/me/blackvein/quests/Quests.java index 5d5f62fe0..8bd26e397 100644 --- a/main/src/main/java/me/blackvein/quests/Quests.java +++ b/main/src/main/java/me/blackvein/quests/Quests.java @@ -1143,7 +1143,13 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener if (depends.getPlaceholderApi() != null) { message = PlaceholderAPI.setPlaceholders(quester.getPlayer(), message); } - if (getSettings().canTranslateNames() && !is.hasItemMeta() && !is.getItemMeta().hasDisplayName()) { + if (getSettings().canTranslateNames() && is.hasItemMeta() && !is.getItemMeta().hasDisplayName()) { + // Bukkit version is 1.9+ + localeManager.sendMessage(quester.getPlayer(), message, is.getType(), is.getDurability(), + is.getEnchantments(), is.getItemMeta()); + } else if (getSettings().canTranslateNames() && !is.hasItemMeta() + && Material.getMaterial("LINGERING_POTION") == null) { + // Bukkit version is below 1.9 localeManager.sendMessage(quester.getPlayer(), message, is.getType(), is.getDurability(), is.getEnchantments()); } else {