Open MJRamon opened 5 months ago
I haven't heard of RCON before... would it be too much of a hassle if I created a Java API, which you can use to develop an extension that does specifically what you want? Either way, this is going to have to wait until I'm back from my holidays 🙂
I haven't heard of RCON before... would it be too much of a hassle if I created a Java API, which you can use to develop an extension that does specifically what you want? Either way, this is going to have to wait until I'm back from my holidays 🙂
RCON is a built-in functionality in Minecraft, that allows remotely execute commands. You do not need to do for it nothing additional - just return result as JSON.
private static final Gson GSON = new Gson();
//...
{
var res = new Player(profile.getName(), profile.getId().toString());
ctx.getSource().sendFeedback(() -> Text.literal(GSON.toJson(res)), false);
}
//...
private record Player(String playerName, String uuid) {}
Ah, that would be a lot simpler of course. I will think about how to do this (also I hope this isn't needed urgently)
If I understand this correctly, all you need is a command that sends a message containing the JSON data?
For server owners, it's a common practice to get server data using RCON: for gathering and managing statistics or to display on web-site. Ideally in JSON format.
Would be great to have this option - can it be done? I'm still interested in 1.20.1 version specifically.