region: add item flags to banner items to hide pattern list in ui

This commit is contained in:
Torrie Fischer 2021-06-14 13:28:48 -07:00
parent 43a499997d
commit 72611f7574

View File

@ -28,6 +28,7 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.inventory.meta.BannerMeta; import org.bukkit.inventory.meta.BannerMeta;
import org.bukkit.material.MaterialData; import org.bukkit.material.MaterialData;
import org.bukkit.inventory.ItemFlag;
import us.camin.regions.config.RegionConfiguration; import us.camin.regions.config.RegionConfiguration;
import us.camin.regions.ui.Colors; import us.camin.regions.ui.Colors;
@ -317,6 +318,8 @@ public class Region {
ItemStack item = new ItemStack(bannerIconMaterial()); ItemStack item = new ItemStack(bannerIconMaterial());
BannerMeta bannerMeta = (BannerMeta)item.getItemMeta(); BannerMeta bannerMeta = (BannerMeta)item.getItemMeta();
bannerMeta.setPatterns(bannerPatterns()); bannerMeta.setPatterns(bannerPatterns());
bannerMeta.addItemFlags(ItemFlag.HIDE_POTION_EFFECTS);
bannerMeta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);
item.setItemMeta(bannerMeta); item.setItemMeta(bannerMeta);
return item; return item;
} }