mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-12-03 07:33:38 +01:00
Try harder to set flags
This commit is contained in:
parent
ff37d0c241
commit
97784872d2
@ -5,6 +5,7 @@ import com.massivecraft.factions.P;
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.inventory.ItemFlag;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
|
||||
@ -34,8 +35,7 @@ public enum PermissableAction {
|
||||
PERMS("perms"),
|
||||
SETWARP("setwarp"),
|
||||
WARP("warp"),
|
||||
FLIGHT("fly"),
|
||||
;
|
||||
FLIGHT("fly"),;
|
||||
|
||||
private String name;
|
||||
|
||||
@ -115,6 +115,7 @@ public enum PermissableAction {
|
||||
lore.add(replacePlaceholers(loreLine, fme, permissable));
|
||||
}
|
||||
|
||||
itemMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS, ItemFlag.HIDE_ATTRIBUTES);
|
||||
itemMeta.setDisplayName(displayName);
|
||||
itemMeta.setLore(lore);
|
||||
item.setItemMeta(itemMeta);
|
||||
|
@ -189,7 +189,9 @@ public class PermissableActionGUI implements InventoryHolder, FactionGUI {
|
||||
for (String loreLine : backButtonConfig.getStringList("lore")) {
|
||||
lore.add(ChatColor.translateAlternateColorCodes('&', loreLine));
|
||||
}
|
||||
|
||||
backButtonMeta.setLore(lore);
|
||||
backButtonMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS, ItemFlag.HIDE_ATTRIBUTES);
|
||||
|
||||
backButton.setItemMeta(backButtonMeta);
|
||||
|
||||
@ -220,6 +222,10 @@ public class PermissableActionGUI implements InventoryHolder, FactionGUI {
|
||||
continue;
|
||||
}
|
||||
|
||||
ItemMeta meta = dummyItem.getItemMeta();
|
||||
meta.addItemFlags(ItemFlag.HIDE_ENCHANTS, ItemFlag.HIDE_ATTRIBUTES);
|
||||
dummyItem.setItemMeta(meta);
|
||||
|
||||
List<Integer> dummySlots = section.getIntegerList("dummy-items." + key);
|
||||
for (Integer slot : dummySlots) {
|
||||
if (slot + 1 > guiSize || slot < 0) {
|
||||
@ -267,8 +273,8 @@ public class PermissableActionGUI implements InventoryHolder, FactionGUI {
|
||||
for (String loreLine : dummySection.getStringList("lore")) {
|
||||
lore.add(ChatColor.translateAlternateColorCodes('&', loreLine));
|
||||
}
|
||||
itemMeta.setLore(lore);
|
||||
|
||||
itemMeta.setLore(lore);
|
||||
itemMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS, ItemFlag.HIDE_ATTRIBUTES);
|
||||
|
||||
itemStack.setItemMeta(itemMeta);
|
||||
|
@ -144,6 +144,10 @@ public class PermissableRelationGUI implements InventoryHolder, FactionGUI {
|
||||
continue;
|
||||
}
|
||||
|
||||
ItemMeta meta = dummyItem.getItemMeta();
|
||||
meta.addItemFlags(ItemFlag.HIDE_ENCHANTS, ItemFlag.HIDE_ATTRIBUTES);
|
||||
dummyItem.setItemMeta(meta);
|
||||
|
||||
List<Integer> dummySlots = section.getIntegerList("dummy-items." + key);
|
||||
for (Integer slot : dummySlots) {
|
||||
if (slot + 1 > guiSize || slot < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user