Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-10 18:15:36 +01:00
Add server info to the dump (#505)
Dieser Commit ist enthalten in:
Ursprung
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren