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:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user