@Override
    public <T extends LuckPermsEvent> @NonNull EventSubscription<T> subscribe(Object plugin, @NonNull Class<T> eventClass, @NonNull Consumer<? super T> handler) {
        Objects.requireNonNull(plugin, "plugin");
        Objects.requireNonNull(eventClass, "eventClass");
        Objects.requireNonNull(handler, "handler");
        return registerSubscription(eventClass, handler, checkPlugin(plugin));
    }
Checks that the given plugin object is a valid plugin instance for the platform

@param plugin the object
@return a plugin
@throws IllegalArgumentException if the plugin is invalid
common/src/main/java/me/lucko/luckperms/common/event/AbstractEventBus.java