Adds various improvements, fixes and a new feature
Adds and option to match any paid sign condition instead of all conditions Adds checks for whether line indices are outside the allowed range Disallows any invalid regular expressions in sign conditions
This commit is contained in:
@ -98,7 +98,8 @@ public final class PaidSignManager {
|
||||
String permission = signSection.getString(name + ".permission");
|
||||
OptionState ignoreCase = OptionState.getFromBoolean(signSection.getBoolean(name + ".ignoreCase"));
|
||||
OptionState ignoreColor = OptionState.getFromBoolean(signSection.getBoolean(name + ".ignoreColor"));
|
||||
PaidSign sign = new PaidSign(name, cost, permission, ignoreCase, ignoreColor);
|
||||
boolean matchAnyCondition = signSection.getBoolean(name + ".matchAnyCondition");
|
||||
PaidSign sign = new PaidSign(name, cost, permission, ignoreCase, ignoreColor, matchAnyCondition);
|
||||
loadConditions(signSection, sign);
|
||||
paidSigns.put(name, sign);
|
||||
}
|
||||
@ -150,6 +151,7 @@ public final class PaidSignManager {
|
||||
signSection.set(name + ".permission", sign.getPermission());
|
||||
signSection.set(name + ".ignoreCase", sign.getIgnoreCase());
|
||||
signSection.set(name + ".ignoreColor", sign.getIgnoreColor());
|
||||
signSection.set(name + ".matchAnyCondition", sign.matchAnyCondition());
|
||||
ConfigurationSection conditionsSection = signSection.createSection(name + ".conditions");
|
||||
Map<Short, PaidSignCondition> signConditions = sign.getConditions();
|
||||
for (short lineIndex : signConditions.keySet()) {
|
||||
|
Reference in New Issue
Block a user