1
mirror of https://github.com/Shiewk/SModeration.git synced 2026-04-28 05:54:16 +02:00

Fix SMod menu opening in newer versions

This commit is contained in:
Shy
2025-07-09 11:08:29 +02:00
parent 26166b5a73
commit ecdd688a79
@@ -257,7 +257,12 @@ public class SModMenu extends PageableCustomInventory {
private ItemStack createSearchItem(){
final ItemStack stack = new ItemStack(Material.FLOWER_BANNER_PATTERN);
stack.editMeta(meta -> {
stack.setData(DataComponentTypes.HIDE_ADDITIONAL_TOOLTIP);
try {
stack.setData(DataComponentTypes.HIDE_ADDITIONAL_TOOLTIP);
} catch (NoSuchFieldError e) {
// that component is no longer present under that name,
// we just create the stack without it instead of throwing
}
meta.displayName(applyFormatting(text("Search").color(PRIMARY_COLOR)));
final ArrayList<Component> lore = new ArrayList<>(List.of(
Component.empty(),