Launcher/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientGsonManager.java

22 lines
729 B
Java
Raw Normal View History

2023-12-23 13:58:09 +03:00
package pro.gravit.launcher.client;
2019-04-20 01:03:06 +03:00
import com.google.gson.GsonBuilder;
2023-12-23 08:05:23 +03:00
import pro.gravit.launcher.core.managers.GsonManager;
2023-12-23 13:58:09 +03:00
import pro.gravit.launcher.base.modules.events.PreGsonPhase;
import pro.gravit.launcher.base.request.websockets.ClientWebSocketService;
2019-04-20 01:03:06 +03:00
public class ClientGsonManager extends GsonManager {
private final ClientModuleManager moduleManager;
public ClientGsonManager(ClientModuleManager moduleManager) {
this.moduleManager = moduleManager;
}
2019-04-20 01:03:06 +03:00
@Override
public void registerAdapters(GsonBuilder builder) {
super.registerAdapters(builder);
ClientWebSocketService.appendTypeAdapters(builder);
moduleManager.invokeEvent(new PreGsonPhase(builder));
2019-04-20 01:03:06 +03:00
}
}