Skip to content

Commit 5ea793c

Browse files
committed
fix incorrect flag tag validation in config
1 parent 205c06a commit 5ea793c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

common/src/main/java/de/z0rdak/yawp/config/server/LoggingConfig.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,12 @@ public static Set<String> getResultValuesToLog() {
8585
private static boolean isValidTag(Object entity) {
8686
if (entity instanceof String str) {
8787
try {
88+
if (str.equals("*")) {
89+
return true;
90+
}
8891
FlagTag tag = FlagTagRegister.from(ResourceLocation.tryParse(str));
8992
// if no exception was thrown, it's a valid tag
90-
// special case for wildcard
91-
return str.equalsIgnoreCase("*");
93+
return tag != null;
9294
} catch (IllegalArgumentException e) {
9395
LOGGING_CONFIG_LOGGER.warn("Invalid flag category supplied for 'log_flag_categories': {}", entity);
9496
return false;

0 commit comments

Comments
 (0)