forked from Upstream/mmocore
Shift Click Attribute View
This commit is contained in:
parent
6a896fcc32
commit
f8f51e0f29
@ -47,17 +47,19 @@ public class AttributeView extends EditableInventory {
|
||||
|
||||
public static class AttributeItem extends InventoryItem {
|
||||
private final PlayerAttribute attribute;
|
||||
private int shiftCost;
|
||||
private int shiftCost=1;
|
||||
|
||||
public AttributeItem(String function, ConfigurationSection config) {
|
||||
super(config);
|
||||
|
||||
attribute = MMOCore.plugin.attributeManager
|
||||
.get(function.substring("attribute_".length()).toLowerCase().replace(" ", "-").replace("_", "-"));
|
||||
shiftCost = config.getInt("shift-cost");
|
||||
if (shiftCost < 1) {
|
||||
MMOCore.log(Level.WARNING, "Level up points cost must not be less than 1. Using default value: 1");
|
||||
shiftCost = 1;
|
||||
if(config.contains("shift-cost")) {
|
||||
shiftCost = config.getInt("shift-cost");
|
||||
if (shiftCost < 1) {
|
||||
MMOCore.log(Level.WARNING, "Level up points cost must not be less than 1. Using default value: 1");
|
||||
shiftCost = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -225,15 +225,16 @@ public class SkillList extends EditableInventory {
|
||||
}
|
||||
|
||||
public class UpgradeItem extends InventoryItem<SkillViewerInventory> {
|
||||
private int shiftCost;
|
||||
private int shiftCost=1;
|
||||
|
||||
public UpgradeItem(ConfigurationSection config) {
|
||||
super(config);
|
||||
|
||||
this.shiftCost = config.getInt("shift-cost");
|
||||
if (shiftCost < 1) {
|
||||
MMOCore.log(Level.WARNING, "Upgrade shift-cost cannot be less than 1. Using default value: 1");
|
||||
shiftCost = 1;
|
||||
if(config.contains("shift-cost")) {
|
||||
this.shiftCost = config.getInt("shift-cost");
|
||||
if (shiftCost < 1) {
|
||||
MMOCore.log(Level.WARNING, "Upgrade shift-cost cannot be less than 1. Using default value: 1");
|
||||
shiftCost = 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user