-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add web player authentication. Closes GH-48 #76
Conversation
The client currently accepts two command-line arguments, server address and port: // CHECK COMMAND LINE ARGUMENTS //
if (argc == 2 || argc == 3) {
g->mode = MODE_ONLINE;
strncpy(g->server_addr, argv[1], MAX_ADDR_LENGTH);
g->server_port = argc == 3 ? atoi(argv[2]) : DEFAULT_PORT;
set_db_path();
} This plugin prepends snprintf(buffer, 1024, "A,%s,%s\n", username, identity_token); The client always sends this command on login, but is usually blank:
|
This now works but the authentication key is untenably long to type by hand, it needs to be copyable or clickable. Found an API request GlowstoneMC/Glowkit-Legacy#8 to add RichMessage support to Glowstone and also a dead Bukkit/Bukkit#1111 [B+C] Add API to use 1.7 chat features. Adds BUKKIT-5245.
This may need to be implemented in Glowstone to proceed further, clickable links are really important for this plugin feature. |
Testing on 1.12-pre5, this code works - the link is clickable. But the game also speaks the text?! There is a text-to-speech engine in the Minecraft client now apparently: https://minecraft.net/en-us/accessibility/ "Text-To-Speech Accessibility Minecraft includes text-to-speech functionality for in-game text chat.", who knew... As for Glowstone or older versions, could try using http://minecraft.gamepedia.com/Commands#Raw_JSON_text clickEvent action open_url, maybe hoverEvent too while at it. And for even older versions without either, a third option (also used when /websandbox auth from the server console, instead of as a player) is to send the URL as plain text. |
#48