mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +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;
|
+ String id;
|
||||||
+
|
+
|
||||||
+ if (method == null) {
|
+ 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();
|
+ final String eventName = eventClass.getSimpleName();
|
||||||
+ boolean verbose = "BlockPhysicsEvent".equals(eventName) || "Drain".equals(eventName) || "Fill".equals(eventName);
|
+ boolean verbose = "BlockPhysicsEvent".equals(eventName) || "Drain".equals(eventName) || "Fill".equals(eventName);
|
||||||
|
|
Loading…
Reference in a new issue