@@ -0,0 +1,999 @@
+package co.phoenixlab.discord.util;%0A%0Aimport com.google.common.eventbus.EventBus;%0Aimport com.google.common.eventbus.Subscribe;%0A%0Aimport java.lang.ref.WeakReference;%0Aimport java.util.function.Consumer;%0A%0Apublic class WeakEventSubscriber%3CT%3E %7B%0A%0A    private final WeakReference%3CConsumer%3CT%3E%3E reference;%0A    private final EventBus eventBus;%0A    private final Class%3CT%3E typeOfT;%0A%0A    public WeakEventSubscriber(Consumer%3CT%3E subscriber, EventBus eventBus, Class%3CT%3E typeOfT) %7B%0A        this.eventBus = eventBus;%0A        this.typeOfT = typeOfT;%0A        this.reference = new WeakReference%3C%3E(subscriber);%0A        this.eventBus.register(this);%0A    %7D%0A%0A    @SuppressWarnings(%22unchecked%22)%0A    @Subscribe%0A    public void handle(Object eventObj) %7B%0A        if (typeOfT.isInstance(eventObj)) %7B%0A            Consumer%3CT%3E handler = reference.get();%0A            if (handler != null) %7B%0A                handler.accept((T) eventObj);%0A            %7D else %7B%0A                eventBus.unregister(this);%0A            %7D%0A        %7D%0A    %7D%0A%0A%0A%0A%7D%0A

Add WeakEventSubscriber for GCable listeners