This will delete the page "OpenRankSystem"
. Please be certain.
@EventHandler
public void onRankOpen(OpenRankSystem e) {
boolean isTimed = e.getTimed();
int slot = e.getSlot();
if (!isTimed) {
ItemStack stack = e.getItemStack().clone();
stack.setType(Material.NAME_TAG);
e.getInventory().setItem(slot, stack);
}
}
@EventHandler
public void addRankLore(OpenRankSystem e) {
boolean isTimed = e.getTimed();
int slot = e.getSlot();
ItemStack stack = e.getItemStack().clone();
if (isTimed) {
stack.addUnsafeEnchantment(Enchantment.DAMAGE_UNDEAD, 3);
ItemMeta meta = stack.getItemMeta();
meta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
stack.setItemMeta(meta);
e.getInventory().setItem(slot, stack);
}
}
}
This will delete the page "OpenRankSystem"
. Please be certain.