mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2025-02-04 22:01:53 +01:00
Add server info to the dump (#505)
This commit is contained in:
parent
7d3548956e
commit
d3b214965b
@ -160,7 +160,7 @@ public class BungeePlugin extends Plugin implements ViaPlatform, Listener {
|
||||
plugins.add(new PluginInfo(true, p.getDescription().getName(), p.getDescription().getVersion(), p.getDescription().getMain(), Arrays.asList(p.getDescription().getAuthor())));
|
||||
|
||||
platformSpecific.add("plugins", GsonUtil.getGson().toJsonTree(plugins));
|
||||
|
||||
platformSpecific.add("servers", GsonUtil.getGson().toJsonTree(ProtocolDetectorService.getProtocolIds()));
|
||||
return platformSpecific;
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@ import net.md_5.bungee.api.ServerPing;
|
||||
import net.md_5.bungee.api.config.ServerInfo;
|
||||
import us.myles.ViaVersion.BungeePlugin;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@ -47,4 +48,8 @@ public class ProtocolDetectorService implements Runnable {
|
||||
});
|
||||
}
|
||||
|
||||
public static Map<String, Integer> getProtocolIds() {
|
||||
return new HashMap<>(protocolIds);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user