Closed LazoYoung closed 4 years ago
Groovy can't resolve methods for Bukkit Object.
~~My conclusion: Groovy's MOP (Meta Object Protocol) can fail to infer subtle Java methods or variables. I made the compilation bypass MOP with CompileStatic annotation, applying ASTTransformation extension to manually cope with necessary type checks, e.g. Bindings. In this way, type safety is somewhat guaranteed (even though it's still dynamic) and even if it fails, we have fall back extension which handles unresolved method/variable during compile-time. I need to dig into this further because I want to achieve 100% consistent script behavior.~~
Zero width space '\u200B' being appended to the method name had caused the problem.
Some modules are out of scope from inner closures. pastebinBecause script bindings were cleared at the moment.