diff --git a/Spigot-API-Patches/Timings-v2.patch b/Spigot-API-Patches/Timings-v2.patch index 6316d5876f..8557831913 100644 --- a/Spigot-API-Patches/Timings-v2.patch +++ b/Spigot-API-Patches/Timings-v2.patch @@ -880,9 +880,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + String id; + + if (method == null) { -+ method = executor.getClass().getEnclosingMethod(); ++ if (executor.getClass().getEnclosingClass() != null) { // Oh Skript, how we love you ++ method = executor.getClass().getEnclosingMethod(); ++ } + } -+ id = method.getDeclaringClass().getName(); ++ ++ if (method != null) { ++ id = method.getDeclaringClass().getName(); ++ } else { ++ id = "null"; ++ } ++ + + final String eventName = eventClass.getSimpleName(); + boolean verbose = "BlockPhysicsEvent".equals(eventName) || "Drain".equals(eventName) || "Fill".equals(eventName);