forked from Upstream/mmocore
PAPI support for Action Bar
This commit is contained in:
parent
e018836a6d
commit
7585ba243b
@ -79,14 +79,19 @@ public class AttributeView extends EditableInventory {
|
|||||||
StatInfo info = StatInfo.valueOf(buff.getStat());
|
StatInfo info = StatInfo.valueOf(buff.getStat());
|
||||||
holders.register("buff_" + buff.getStat().toLowerCase(), info.format(buff.getValue()));
|
holders.register("buff_" + buff.getStat().toLowerCase(), info.format(buff.getValue()));
|
||||||
holders.register("total_" + buff.getStat().toLowerCase(), info.format(buff.multiply(total).getValue()));
|
holders.register("total_" + buff.getStat().toLowerCase(), info.format(buff.multiply(total).getValue()));
|
||||||
|
Bukkit.broadcastMessage(info.format(0.34));
|
||||||
|
Bukkit.broadcastMessage((new DecimalFormat(null)==null)+"");
|
||||||
});
|
});
|
||||||
|
|
||||||
return holders;
|
return holders;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AttributeViewerInventory extends GeneratedInventory {
|
public class AttributeViewerInventory extends GeneratedInventory {
|
||||||
|
|
||||||
public AttributeViewerInventory(PlayerData playerData, EditableInventory editable) {
|
public AttributeViewerInventory(PlayerData playerData, EditableInventory editable) {
|
||||||
super(playerData, editable);
|
super(playerData, editable);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,6 +40,7 @@ public abstract class EditableInventory {
|
|||||||
this.slots = Math.min(Math.max(9, config.getInt("slots")), 54);
|
this.slots = Math.min(Math.max(9, config.getInt("slots")), 54);
|
||||||
Validate.isTrue((slots % 9) == 0, "Slots must be a multiple of 9");
|
Validate.isTrue((slots % 9) == 0, "Slots must be a multiple of 9");
|
||||||
|
|
||||||
|
|
||||||
items.clear();
|
items.clear();
|
||||||
if (config.contains("items")) {
|
if (config.contains("items")) {
|
||||||
Validate.notNull(config.getConfigurationSection("items"), "Could not load item list");
|
Validate.notNull(config.getConfigurationSection("items"), "Could not load item list");
|
||||||
|
@ -105,8 +105,7 @@ public class SkillBar implements Listener {
|
|||||||
"" + (j + 1 + (data.getPlayer().getInventory().getHeldItemSlot() <= j ? 1 : 0)))
|
"" + (j + 1 + (data.getPlayer().getInventory().getHeldItemSlot() <= j ? 1 : 0)))
|
||||||
.replace("{skill}", data.getBoundSkill(j).getSkill().getName()));
|
.replace("{skill}", data.getBoundSkill(j).getSkill().getName()));
|
||||||
}
|
}
|
||||||
|
return MMOCore.plugin.placeholderParser.parse(data.getPlayer(),str.toString());
|
||||||
return str.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user