Launcher/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapperGsonManager.java

22 lines
749 B
Java
Raw Normal View History

package pro.gravit.launcher.server;
2019-04-20 01:03:06 +03:00
import com.google.gson.GsonBuilder;
import pro.gravit.launcher.managers.GsonManager;
import pro.gravit.launcher.modules.events.PreGsonPhase;
import pro.gravit.launcher.request.websockets.ClientWebSocketService;
2019-04-20 01:03:06 +03:00
public class ServerWrapperGsonManager extends GsonManager {
private final ServerWrapperModulesManager modulesManager;
public ServerWrapperGsonManager(ServerWrapperModulesManager modulesManager) {
this.modulesManager = modulesManager;
}
2019-04-20 01:03:06 +03:00
@Override
public void registerAdapters(GsonBuilder builder) {
super.registerAdapters(builder);
ClientWebSocketService.appendTypeAdapters(builder);
modulesManager.invokeEvent(new PreGsonPhase(builder));
2019-04-20 01:03:06 +03:00
}
}