forked from Upstream/mmocore
Fixed issue #812 about a bug with slot_unlock trigger.
This commit is contained in:
parent
061ced2207
commit
f3aa07288f
@ -14,7 +14,11 @@ public class UnlockSlotTrigger extends Trigger implements Removable {
|
||||
public UnlockSlotTrigger(MMOLineConfig config) {
|
||||
super(config);
|
||||
config.validateKeys("slot");
|
||||
slot = Integer.parseInt("slot");
|
||||
try {
|
||||
slot = Integer.parseInt(config.getString("slot"));
|
||||
}catch(NumberFormatException e){
|
||||
throw new IllegalArgumentException("The slot should be a number");
|
||||
}
|
||||
Validate.isTrue(slot > 0 && slot <= MMOCore.plugin.configManager.maxSkillSlots, "The slot should be between 1 and " + MMOCore.plugin.configManager.maxSkillSlots);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user