mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Skript event executor classes do not have an enclosing method
This commit is contained in:
parent
097ffc44c1
commit
106782bc63
1 changed files with 10 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue