Condition handlers wasnt meant to return boolean.

Sorry if anyone wrote one already, remove the return type please.

Really don't want to bump version when very low chance anyones using
this system yet.
This commit is contained in:
Aikar
2018-01-10 19:44:26 -05:00
parent 813272fe39
commit 9f7eb9bcf5
2 changed files with 5 additions and 10 deletions
@@ -68,7 +68,7 @@ public final class ACFExample extends JavaPlugin {
// 5: Register Command Conditions
commandManager.getCommandConditions().addCondition(SomeObject.class, "limits", (c, exec, value) -> {
if (value == null) {
return true;
return;
}
if (c.hasConfig("min") && c.getConfigValue("min", 0) > value.getValue()) {
throw new ConditionFailedException("Min value must be " + c.getConfigValue("min", 0));
@@ -76,7 +76,6 @@ public final class ACFExample extends JavaPlugin {
if (c.hasConfig("max") && c.getConfigValue("max", 3) < value.getValue()) {
throw new ConditionFailedException("Max value must be " + c.getConfigValue("max", 3));
}
return true;
});
// 6: Register your commands - This first command demonstrates adding an exception handler to that command