We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a13d0a commit 19ac4e8Copy full SHA for 19ac4e8
1 file changed
src/api/main/java/com/ampznetwork/banmod/api/entity/Infraction.java
@@ -16,7 +16,6 @@
16
import lombok.experimental.FieldDefaults;
17
import lombok.experimental.SuperBuilder;
18
import org.comroid.api.Polyfill;
19
-import org.comroid.api.func.util.Command;
20
import org.jetbrains.annotations.NotNull;
21
import org.jetbrains.annotations.Nullable;
22
@@ -91,7 +90,7 @@ static Factory parse(BanMod mod, String expression) {
91
90
var category = mod.getEntityAccessor(PunishmentCategory.TYPE)
92
.by(PunishmentCategory::getName)
93
.get(split[0])
94
- .orElseThrow(() -> new Command.Error("Could not find punishment category " + split[0]));
+ .orElseGet(mod::getDefaultCategory);
95
var duration = Polyfill.parseDuration(split[1]);
96
return new SimpleExpressionFactory(mod, category, duration);
97
}
0 commit comments