mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +08:00
Fixed 'sponge' module test errors
This commit is contained in:
parent
e835d61aef
commit
abd6b04b8d
@ -5,7 +5,7 @@ dependencies {
|
||||
compile "com.djrapitops:Extension-BanManager:5.15.0-R0.4"
|
||||
compile "com.djrapitops:Extension-DiscordSRV:1.16.6-R0.2"
|
||||
compile "com.djrapitops:Extension-EssentialsX:2.15.0-R0.3"
|
||||
compile "com.djrapitops:Extension-Sponge-Economy:7.1.0-R0.1"
|
||||
compile "com.djrapitops:Extension-Sponge-Economy:7.1.0-R0.2"
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
|
@ -79,12 +79,20 @@ public class SpongeListenerSystem extends ListenerSystem {
|
||||
|
||||
@Override
|
||||
protected void unregisterListeners() {
|
||||
Sponge.getEventManager().unregisterPluginListeners(plugin);
|
||||
try {
|
||||
Sponge.getEventManager().unregisterPluginListeners(plugin);
|
||||
} catch (IllegalStateException ignore) {
|
||||
/* Ignore, Sponge is not initialized */
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void callEnableEvent(PlanPlugin plugin) {
|
||||
Event event = new PlanSpongeEnableEvent((PlanSponge) plugin);
|
||||
Sponge.getEventManager().post(event);
|
||||
try {
|
||||
Event event = new PlanSpongeEnableEvent((PlanSponge) plugin);
|
||||
Sponge.getEventManager().post(event);
|
||||
} catch (IllegalStateException ignore) {
|
||||
/* Ignore, Sponge is not initialized */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user