Skip to content

Commit d03ad2b

Browse files
author
ben
committed
Fix hidetooltips not working
1 parent f9da023 commit d03ad2b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

AdvancedCore/src/main/java/com/bencodez/advancedcore/api/item/ItemBuilder.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ public ItemBuilder(ConfigurationSection data) {
374374
}
375375

376376
if (data.getBoolean("HideToolTip", false)) {
377+
377378
setHideTooltipCompat(is, true);
378379
}
379380
}
@@ -404,9 +405,10 @@ public void setHideTooltipCompat(ItemStack item, boolean hide) {
404405

405406
try {
406407
// Try to call ItemMeta#setHideTooltip(boolean) reflectively
407-
Method m = meta.getClass().getMethod("setHideTooltip", boolean.class);
408+
Method m = ItemMeta.class.getMethod("setHideTooltip", boolean.class);
408409
m.invoke(meta, hide);
409410
} catch (NoSuchMethodException e) {
411+
e.printStackTrace();
410412
// Older versions: no native hideTooltip
411413
if (hide) {
412414
// add all flags to hide as much as possible

0 commit comments

Comments
 (0)