CommandFactory is now WSCommandFactory
This commit is contained in:
parent
d526206056
commit
0573c0b1e8
@ -40,6 +40,7 @@ class WebConsoleConnector {
|
|||||||
*/
|
*/
|
||||||
onClose(evt){
|
onClose(evt){
|
||||||
closedConnection(this.serverName);
|
closedConnection(this.serverName);
|
||||||
|
//console.log("EVENTO: " + evt.detail);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
WebConsole Persistence Manager for WebConsole
|
WebConsole Persistence Manager for WebConsole
|
||||||
Used to save your servers into your browser
|
Used to save your servers and config into your browser
|
||||||
https://github.com/mesacarlos
|
https://github.com/mesacarlos
|
||||||
2019-2020 Carlos Mesa under MIT License.
|
2019-2020 Carlos Mesa under MIT License.
|
||||||
*/
|
*/
|
||||||
|
@ -21,7 +21,7 @@ public class WebConsoleCommand implements CommandExecutor {
|
|||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
StringBuilder msg = new StringBuilder();
|
StringBuilder msg = new StringBuilder();
|
||||||
|
|
||||||
msg.append(Internationalization.getPhrase("webconsole-version", version) + ".\n");
|
msg.append(Internationalization.getPhrase("webconsole-version", version) + "\n");
|
||||||
ArrayList<InetSocketAddress> connections = LoginManager.getInstance().getLoggedInUsers();
|
ArrayList<InetSocketAddress> connections = LoginManager.getInstance().getLoggedInUsers();
|
||||||
|
|
||||||
if (connections.isEmpty()) {
|
if (connections.isEmpty()) {
|
||||||
|
@ -12,7 +12,7 @@ import org.java_websocket.server.WebSocketServer;
|
|||||||
import es.mesacarlos.webconsole.WebConsole;
|
import es.mesacarlos.webconsole.WebConsole;
|
||||||
import es.mesacarlos.webconsole.util.Internationalization;
|
import es.mesacarlos.webconsole.util.Internationalization;
|
||||||
import es.mesacarlos.webconsole.util.LoginManager;
|
import es.mesacarlos.webconsole.util.LoginManager;
|
||||||
import es.mesacarlos.webconsole.websocket.command.CommandFactory;
|
import es.mesacarlos.webconsole.websocket.command.WSCommandFactory;
|
||||||
import es.mesacarlos.webconsole.websocket.command.WSCommand;
|
import es.mesacarlos.webconsole.websocket.command.WSCommand;
|
||||||
import es.mesacarlos.webconsole.websocket.response.ConsoleOutput;
|
import es.mesacarlos.webconsole.websocket.response.ConsoleOutput;
|
||||||
import es.mesacarlos.webconsole.websocket.response.JSONOutput;
|
import es.mesacarlos.webconsole.websocket.response.JSONOutput;
|
||||||
@ -21,7 +21,7 @@ import es.mesacarlos.webconsole.websocket.response.Processed;
|
|||||||
import es.mesacarlos.webconsole.websocket.response.UnknownCommand;
|
import es.mesacarlos.webconsole.websocket.response.UnknownCommand;
|
||||||
|
|
||||||
public class WSServer extends WebSocketServer {
|
public class WSServer extends WebSocketServer {
|
||||||
private HashMap<String, WSCommand> commands = CommandFactory.getCommandsHashMap();
|
private HashMap<String, WSCommand> commands = WSCommandFactory.getCommandsHashMap();
|
||||||
private WebConsole plugin;
|
private WebConsole plugin;
|
||||||
|
|
||||||
public WSServer(WebConsole plugin, InetSocketAddress address) {
|
public WSServer(WebConsole plugin, InetSocketAddress address) {
|
||||||
|
@ -2,7 +2,7 @@ package es.mesacarlos.webconsole.websocket.command;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
public class CommandFactory {
|
public class WSCommandFactory {
|
||||||
|
|
||||||
public static HashMap<String, WSCommand> getCommandsHashMap() {
|
public static HashMap<String, WSCommand> getCommandsHashMap() {
|
||||||
HashMap<String, WSCommand> commands = new HashMap<String, WSCommand>();
|
HashMap<String, WSCommand> commands = new HashMap<String, WSCommand>();
|
Loading…
x
Reference in New Issue
Block a user