public CustomItem getNoPermissionItem(ParticleStorage particle) { if ("%cosmeticsname%".equals(this.noPermissionItem.getItemMeta().getDisplayName())) { CustomItem item = new CustomItem(this.noPermissionItem.clone()); item.setName( item.getItemMeta() .getDisplayName() .replace("%cosmeticsname%", particle.getItem().getItemMeta().getDisplayName())); return item; } return this.noPermissionItem; }
public MountStorage( Main plugin, String identifier, CustomItem item, int position, String permission, String mountType, List<String> mountData) { this.plugin = plugin; this.identifier = identifier; this.item = item; ItemMeta im = item.getItemMeta(); if (ReflectionAPI.verBiggerThan(1, 8)) im.addItemFlags(org.bukkit.inventory.ItemFlag.values()); this.item.setItemMeta(im); this.position = position; this.permission = permission; this.mountType = mountType; this.mountData = mountData; }