Skip to content

Commit db3ff30

Browse files
committed
Specify alwaysWriteExceptions, noConsoleNoAnsi
1 parent 4e7a01c commit db3ff30

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bukkit/src/main/java/io/github/rothes/protocolstringreplacer/console/PsrLogEventPatternConverter.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,11 @@ public static PsrLogEventPatternConverter newInstance(Configuration config, Stri
9191
LOGGER.error("Incorrect number of options. Expected at least 1, max 2 received " + options.length);
9292
return null;
9393
}
94+
String pattern = ConsoleReplaceManager.getPatterns().get(Short.parseShort(options[0]));
95+
boolean removeAnsi = options.length == 2 && "removeAnsi".equals(options[1]);
9496
return new PsrLogEventPatternConverter(
95-
PatternLayout.createPatternParser(config).parse(ConsoleReplaceManager.getPatterns().get(Short.parseShort(options[0]))),
96-
options.length == 2 && "removeAnsi".equals(options[1])
97+
PatternLayout.createPatternParser(config).parse(pattern, true, removeAnsi),
98+
removeAnsi
9799
);
98100
}
99101

0 commit comments

Comments
 (0)