mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 12:42:05 -07:00
Skript event executor classes do not have an enclosing method
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user