SteamWar/SpigotCore
Archiviert
13
0

Fix SWCommandUtils.numberMapper with nan
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2021-12-13 00:48:53 +01:00
Ursprung 1fe04962a5
Commit b01c99f02d

Datei anzeigen

@ -261,6 +261,9 @@ public class SWCommandUtils {
private static <T> Function<String, T> numberMapper(Function<String, T> mapper) { private static <T> Function<String, T> numberMapper(Function<String, T> mapper) {
return s -> { return s -> {
try { try {
if (s.equalsIgnoreCase("nan")) {
return null;
}
return mapper.apply(s); return mapper.apply(s);
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
return null; return null;