public static void postServerInformation(OkHttpClient client, String serverKey, IBuycraftPlatform platform, boolean onlineMode) throws IOException { Map<String, Object> serverData = new LinkedHashMap<>(); Map<String, Object> pluginData = new LinkedHashMap<>(); // Server data serverData.put("platform", platform.getPlatformInformation().getType().platformName()); serverData.put("platform_version", platform.getPlatformInformation().getVersion()); serverData.put("online_mode", onlineMode); // Plugin data pluginData.put("version", platform.getPluginVersion()); // Combine and send to Buycraft Map<String, Object> keenData = new LinkedHashMap<>(); keenData.put("server", serverData); keenData.put("plugin", pluginData); AnalyticsSend.sendAnalytics(client, serverKey, keenData); } }
writer.println("Plugin version: " + platform.getPluginVersion()); writer.println("Platform: " + platform.getPlatformInformation().getType() + " / " + platform.getPlatformInformation().getVersion());