diff --git a/Spigot-Server-Patches/Timings-v2.patch b/Spigot-Server-Patches/Timings-v2.patch index 6e058fc5c..178c10d45 100644 --- a/Spigot-Server-Patches/Timings-v2.patch +++ b/Spigot-Server-Patches/Timings-v2.patch @@ -81,13 +81,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + final String taskname = taskNameCache.computeIfAbsent(taskClass, clazz -> { + try { -+ String clsName = clazz.isAnonymousClass() || clazz.isLocalClass() ++ String clsName = !clazz.isMemberClass() + ? clazz.getName() + : clazz.getCanonicalName(); -+ if (clsName.contains("$Lambda$")) { ++ if (clsName != null && clsName.contains("$Lambda$")) { + clsName = clsName.replaceAll("(Lambda\\$.*?)/.*", "$1"); + } -+ return clsName; ++ return clsName != null ? clsName : "UnknownTask"; + } catch (Throwable ex) { + new Exception("Error occurred detecting class name", ex).printStackTrace(); + return "MangledClassFile";