Skip to content

Commit

Permalink
feat: remove legacy itemflag for hiding potion effects
Browse files Browse the repository at this point in the history
  • Loading branch information
darbyjack committed Jun 18, 2024
1 parent 253cff7 commit f851aed
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,6 @@ private Map<Integer, TreeMap<Integer, MenuItem>> loadMenuItems(FileConfiguration
.hideAttributes(c.getBoolean(currentPath + "hide_attributes", false))
.hideUnbreakable(c.getBoolean(currentPath + "hide_unbreakable", false))
.hideEnchants(c.getBoolean(currentPath + "hide_enchantments", false))
.hidePotionEffects(c.getBoolean(currentPath + "hide_effects", false))
.nbtString(c.getString(currentPath + "nbt_string", null))
.nbtInt(c.getString(currentPath + "nbt_int", null))
.nbtStrings(c.getStringList(currentPath + "nbt_strings"))
Expand Down Expand Up @@ -863,7 +862,6 @@ private Map<Integer, TreeMap<Integer, MenuItem>> loadMenuItems(FileConfiguration

if (!bannerMeta.isEmpty()) {
builder.bannerMeta(bannerMeta);
builder.hidePotionEffects(true);
}
}

Expand Down
4 changes: 0 additions & 4 deletions src/main/java/com/extendedclip/deluxemenus/menu/MenuItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,6 @@ public ItemStack getItemStack(@NotNull final MenuHolder holder) {
itemMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
}

if (this.options.hidePotionEffects()) {
itemMeta.addItemFlags(ItemFlag.HIDE_POTION_EFFECTS);
}

if (this.options.unbreakable()) {
itemMeta.setUnbreakable(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public class MenuItemOptions {
private final boolean unbreakable;
private final boolean hideAttributes;
private final boolean hideEnchants;
private final boolean hidePotionEffects;
private final boolean hideUnbreakable;

private final boolean displayNameHasPlaceholders;
Expand Down Expand Up @@ -99,7 +98,6 @@ private MenuItemOptions(final @NotNull MenuItemOptionsBuilder builder) {
this.unbreakable = builder.unbreakable;
this.hideAttributes = builder.hideAttributes;
this.hideEnchants = builder.hideEnchants;
this.hidePotionEffects = builder.hidePotionEffects;
this.hideUnbreakable = builder.hideUnbreakable;
this.displayNameHasPlaceholders = builder.displayNameHasPlaceholders;
this.loreHasPlaceholders = builder.loreHasPlaceholders;
Expand Down Expand Up @@ -217,10 +215,6 @@ public boolean hideEnchants() {
return hideEnchants;
}

public boolean hidePotionEffects() {
return hidePotionEffects;
}

public boolean hideUnbreakable() {
return hideUnbreakable;
}
Expand Down Expand Up @@ -346,7 +340,6 @@ public boolean updatePlaceholders() {
.unbreakable(this.unbreakable)
.hideAttributes(this.hideAttributes)
.hideEnchants(this.hideEnchants)
.hidePotionEffects(this.hidePotionEffects)
.hideUnbreakable(this.hideUnbreakable)
.nbtString(this.nbtString)
.nbtInt(this.nbtInt)
Expand Down Expand Up @@ -396,7 +389,6 @@ public static class MenuItemOptionsBuilder {
private boolean unbreakable;
private boolean hideAttributes;
private boolean hideEnchants;
private boolean hidePotionEffects;
private boolean hideUnbreakable;

private boolean displayNameHasPlaceholders;
Expand Down Expand Up @@ -540,11 +532,6 @@ public MenuItemOptionsBuilder hideEnchants(final boolean hideEnchants) {
return this;
}

public MenuItemOptionsBuilder hidePotionEffects(final boolean hidePotionEffects) {
this.hidePotionEffects = hidePotionEffects;
return this;
}

public MenuItemOptionsBuilder hideUnbreakable(final boolean hideUnbreakable) {
this.hideUnbreakable = hideUnbreakable;
return this;
Expand Down

0 comments on commit f851aed

Please sign in to comment.