mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-06 15:44:49 +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-BanManager:5.15.0-R0.4"
|
||||||
compile "com.djrapitops:Extension-DiscordSRV:1.16.6-R0.2"
|
compile "com.djrapitops:Extension-DiscordSRV:1.16.6-R0.2"
|
||||||
compile "com.djrapitops:Extension-EssentialsX:2.15.0-R0.3"
|
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 {
|
shadowJar {
|
||||||
|
@ -79,12 +79,20 @@ public class SpongeListenerSystem extends ListenerSystem {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void unregisterListeners() {
|
protected void unregisterListeners() {
|
||||||
Sponge.getEventManager().unregisterPluginListeners(plugin);
|
try {
|
||||||
|
Sponge.getEventManager().unregisterPluginListeners(plugin);
|
||||||
|
} catch (IllegalStateException ignore) {
|
||||||
|
/* Ignore, Sponge is not initialized */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void callEnableEvent(PlanPlugin plugin) {
|
public void callEnableEvent(PlanPlugin plugin) {
|
||||||
Event event = new PlanSpongeEnableEvent((PlanSponge) plugin);
|
try {
|
||||||
Sponge.getEventManager().post(event);
|
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