use of net.minecraftforge.fml.common.event.FMLServerStoppedEvent in project SpongeForge by SpongePowered.
the class SpongeMod method onServerStopped.
@Subscribe
public void onServerStopped(FMLServerStoppedEvent event) throws IOException {
try {
CommandManager service = this.game.getCommandManager();
service.getCommands().stream().filter(mapping -> mapping.getCallable() instanceof MinecraftCommandWrapper).forEach(service::removeMapping);
((SqlServiceImpl) this.game.getServiceManager().provideUnchecked(SqlService.class)).close();
} catch (Throwable t) {
this.controller.errorOccurred(this, t);
}
// used by client
WorldManager.unregisterAllWorldSettings();
}
Aggregations