diff --git a/README.md b/README.md index f5058db..e44d516 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ Dont worry about privacy or security: all data is stored in your browser offline * Colors supported, for both Windows and Linux hosts. (Colors are represented different in each platform). * Real-time connected players, machine CPU and server RAM usage information. * Capable of keep connected to more than one server to keep retrieving console log in the background for them. -* English, Spanish and Russian (thanks to Stashenko) supported. -* Free ,updated regularly, and many more! +* English, Spanish, Russian (thanks to Stashenko) and Portuguese (thanks to AlexandreMuassab) supported. +* Free, updated regularly, and many more! ![Screenshot](https://i.imgur.com/sN1sYju.png) @@ -43,6 +43,9 @@ You can see a tutorial on how to activate SSL [in this link](https://github.com/ 2. If you want, you can host it in a web server, or use it offline. That's up to you. 3. To start adding servers, click on `Your servers`, and then `Add server`. Fill Server name, IP and WebConsole port (the one you placed into config.yml before), and you are ready to go. You will be prompted for password when connecting. +## Check connected WebConsole clients +You can use /WebConsole command to view how many clients are connected and their IP address. This is the only Minecraft command provided by this plugin. This command requires you to have `webconsole.webconsole` permission to execute it. + ## Technical information diff --git a/client/scripts/WebConsole.js b/client/scripts/WebConsole.js index 9f06cb2..440b265 100644 --- a/client/scripts/WebConsole.js +++ b/client/scripts/WebConsole.js @@ -73,6 +73,7 @@ function onWebSocketsMessage(message){ case 1000: //Players writePlayerInfo(message.connectedPlayers, message.maxPlayers); + connectionManager.activeConnection.players = JSON.parse(message.players); break; case 1001: //Cpu Usage diff --git a/client/scripts/WebConsoleConnector.js b/client/scripts/WebConsoleConnector.js index b41e27a..d2b5aa8 100644 --- a/client/scripts/WebConsoleConnector.js +++ b/client/scripts/WebConsoleConnector.js @@ -12,6 +12,7 @@ class WebConsoleConnector { this.subscribers = []; //List of functions called when a new message arrive this.messages = []; //All messages retrieved since connection start this.commands = []; //EXEC Commands sent by user to this server + this.players = []; //Connected users. } /** @@ -31,7 +32,6 @@ class WebConsoleConnector { */ onOpen(evt){ //TODO Check que la version es correcta, y que es un WebSocket del plugin y no de otra cosa - //No es necesario notificar al usuario porque ya se recibe un console output de ello } /** diff --git a/client/scripts/WebConsoleJqueryHandler.js b/client/scripts/WebConsoleJqueryHandler.js index 01ffb18..db14d3c 100644 --- a/client/scripts/WebConsoleJqueryHandler.js +++ b/client/scripts/WebConsoleJqueryHandler.js @@ -123,6 +123,8 @@ $("#commandInput").on('keydown', function (e) { $("#commandInput").val(connectionManager.activeConnection.commands[commandHistoryIndex + 1]); commandHistoryIndex = commandHistoryIndex + 1; } + }else if(e.which == 9){ //Detect tab key + //TODO Suggest user from connectionManager.activeConnection.players; } });