mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-27 00:45:40 +01:00
!Fixed skill GUI display issue
This commit is contained in:
parent
c82728c917
commit
360a42d99f
@ -134,7 +134,7 @@ public class QuestViewer extends EditableInventory {
|
||||
/*
|
||||
* generate item
|
||||
*/
|
||||
ItemStack item = new ItemStack(getStack());
|
||||
ItemStack item = cloneItem();
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setDisplayName(holders.apply(inv.getPlayer(), getName()));
|
||||
meta.addItemFlags(ItemFlag.values());
|
||||
|
@ -170,7 +170,7 @@ public class SkillList extends EditableInventory {
|
||||
for (int j = 0; j < lore.size(); j++)
|
||||
lore.set(j, ChatColor.GRAY + ChatColor.translateAlternateColorCodes('&', lore.get(j)));
|
||||
|
||||
ItemStack item = new ItemStack(getStack());
|
||||
ItemStack item = cloneItem();
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', getName().replace("{skill}", skill.getSkill().getName()).replace("{roman}", MMOCoreUtils.intToRoman(skillLevel)).replace("{level}", "" + skillLevel)));
|
||||
meta.addItemFlags(ItemFlag.values());
|
||||
|
@ -45,8 +45,8 @@ public abstract class InventoryPlaceholderItem extends InventoryItem {
|
||||
this.modelData = config.getInt("custom-model-data");
|
||||
}
|
||||
|
||||
public ItemStack getStack() {
|
||||
return stack;
|
||||
public ItemStack cloneItem() {
|
||||
return stack.clone();
|
||||
}
|
||||
|
||||
public boolean hideFlags() {
|
||||
@ -92,7 +92,7 @@ public abstract class InventoryPlaceholderItem extends InventoryItem {
|
||||
public ItemStack display(GeneratedInventory inv, int n) {
|
||||
|
||||
Placeholders placeholders = getPlaceholders(inv, n);
|
||||
ItemStack item = getStack();
|
||||
ItemStack item = cloneItem();
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
|
||||
if (texture != null && meta instanceof SkullMeta)
|
||||
|
@ -30,7 +30,7 @@ public class Ice_Spikes extends Skill {
|
||||
public Ice_Spikes() {
|
||||
super();
|
||||
setMaterial(VersionMaterial.SNOWBALL.toMaterial());
|
||||
setLore("Ice spikes summon from the ground", "and shatters, each dealing &9{damage} &7damage", "to hit enemies and slowing them down", "for &9{slow} &7seconds.", "", "&e{cooldown}s Cooldown", "&9Costs {mana} {mana_name}");
|
||||
setLore("Ice spikes summon from the ground", "and shatter, each dealing &9{damage} &7damage", "to hit enemies and slowing them down", "for &9{slow} &7seconds.", "", "&e{cooldown}s Cooldown", "&9Costs {mana} {mana_name}");
|
||||
|
||||
addModifier("cooldown", new LinearValue(6, -.1, 2, 6));
|
||||
addModifier("mana", new LinearValue(20, 2));
|
||||
|
Loading…
Reference in New Issue
Block a user