Open deathcap opened 8 years ago
Maybe not strictly necessary, the current default is actually (in clientmc.js):
opts.url = opts.url || 'ws://'+document.location.hostname+':24444/server';
with the intention that servers will run their own wsmc plugins served from their server, so the document hostname will point to the same server (however, non-'localhost' seems to be currently broken in wsmc: https://github.com/deathcap/wsmc/issues/30)
To allow loading voxel-clientmc as a plugin in other apps (e.g. https://github.com/deathcap/voxelmetaverse), could perhaps default opts.url
to undefined and if unspecified prompt the user, but set it to 'ws://'+document.location.hostname+':24444/server'
in voxel-clientmc/app/app.js for the bundled wsmc jar usage.
Currently voxel-clientmc is hardcoded to connect to ws://localhost:24444 (or whatever is set in
opts.url
), it should have some kind of user interface listing to select the server(s) to connect to.Could also include server pinging (status packets or 0xfe legacy ping), pending wsmc support (showing a detailed server list with icon, players, description, etc.)