SkriptLang / skript-reflect

Powerful reflection utilities for Skript.
MIT License
56 stars 19 forks source link

IllegalPluginAccessException when using EvtByReflection for non-event classes #39

Closed FranKusmiruk closed 3 years ago

FranKusmiruk commented 3 years ago

Describe the bug As the title says, an IPAE is thrown when a class that doesn't implement Event is used as input.

To reproduce

import:
  java.util.function.Consumer

on Consumer:
  broadcast "%event%"

Expected behavior I would expect the addon to do type-checking before casting or passing around the input, and throw an error if applicable.

TPGamesNL commented 3 years ago

Fixed in https://github.com/TPGamesNL/skript-reflect/commit/8e024e256f0cb92238dfcde3a525ef3650271231