mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-29 04:27:53 +01:00
Renamed WebSocketServer to WebServer
This commit is contained in:
parent
75af8b58f8
commit
a2f7587b8d
@ -37,7 +37,7 @@ import main.java.com.djrapitops.plan.database.Database;
|
|||||||
import main.java.com.djrapitops.plan.database.databases.MySQLDB;
|
import main.java.com.djrapitops.plan.database.databases.MySQLDB;
|
||||||
import main.java.com.djrapitops.plan.database.databases.SQLiteDB;
|
import main.java.com.djrapitops.plan.database.databases.SQLiteDB;
|
||||||
import main.java.com.djrapitops.plan.ui.html.Html;
|
import main.java.com.djrapitops.plan.ui.html.Html;
|
||||||
import main.java.com.djrapitops.plan.ui.webserver.WebSocketServer;
|
import main.java.com.djrapitops.plan.ui.webserver.WebServer;
|
||||||
import main.java.com.djrapitops.plan.utilities.Benchmark;
|
import main.java.com.djrapitops.plan.utilities.Benchmark;
|
||||||
import main.java.com.djrapitops.plan.utilities.Check;
|
import main.java.com.djrapitops.plan.utilities.Check;
|
||||||
import main.java.com.djrapitops.plan.utilities.MiscUtils;
|
import main.java.com.djrapitops.plan.utilities.MiscUtils;
|
||||||
@ -73,7 +73,7 @@ public class Plan extends BukkitPlugin<Plan> {
|
|||||||
private Database db;
|
private Database db;
|
||||||
private HashSet<Database> databases;
|
private HashSet<Database> databases;
|
||||||
|
|
||||||
private WebSocketServer uiServer;
|
private WebServer uiServer;
|
||||||
|
|
||||||
private ServerVariableHolder serverVariableHolder;
|
private ServerVariableHolder serverVariableHolder;
|
||||||
private int bootAnalysisTaskID = -1;
|
private int bootAnalysisTaskID = -1;
|
||||||
@ -180,7 +180,7 @@ public class Plan extends BukkitPlugin<Plan> {
|
|||||||
boolean hasDataViewCapability = usingAlternativeIP || usingAlternativeUI || webserverIsEnabled;
|
boolean hasDataViewCapability = usingAlternativeIP || usingAlternativeUI || webserverIsEnabled;
|
||||||
|
|
||||||
if (webserverIsEnabled) {
|
if (webserverIsEnabled) {
|
||||||
uiServer = new WebSocketServer(this);
|
uiServer = new WebServer(this);
|
||||||
uiServer.initServer();
|
uiServer.initServer();
|
||||||
if (!uiServer.isEnabled()) {
|
if (!uiServer.isEnabled()) {
|
||||||
Log.error("WebServer was not Initialized.");
|
Log.error("WebServer was not Initialized.");
|
||||||
@ -471,7 +471,7 @@ public class Plan extends BukkitPlugin<Plan> {
|
|||||||
*
|
*
|
||||||
* @return the Webserver
|
* @return the Webserver
|
||||||
*/
|
*/
|
||||||
public WebSocketServer getUiServer() {
|
public WebServer getUiServer() {
|
||||||
return uiServer;
|
return uiServer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ import main.java.com.djrapitops.plan.data.additional.PluginData;
|
|||||||
import main.java.com.djrapitops.plan.data.cache.DBCallableProcessor;
|
import main.java.com.djrapitops.plan.data.cache.DBCallableProcessor;
|
||||||
import main.java.com.djrapitops.plan.data.handling.info.HandlingInfo;
|
import main.java.com.djrapitops.plan.data.handling.info.HandlingInfo;
|
||||||
import main.java.com.djrapitops.plan.ui.html.DataRequestHandler;
|
import main.java.com.djrapitops.plan.ui.html.DataRequestHandler;
|
||||||
import main.java.com.djrapitops.plan.ui.webserver.WebSocketServer;
|
import main.java.com.djrapitops.plan.ui.webserver.WebServer;
|
||||||
import main.java.com.djrapitops.plan.utilities.HtmlUtils;
|
import main.java.com.djrapitops.plan.utilities.HtmlUtils;
|
||||||
|
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@ -173,7 +173,7 @@ public class API {
|
|||||||
* @return player.html with all placeholders replaced.
|
* @return player.html with all placeholders replaced.
|
||||||
*/
|
*/
|
||||||
public String getPlayerHtmlAsString(UUID uuid) {
|
public String getPlayerHtmlAsString(UUID uuid) {
|
||||||
WebSocketServer server = plugin.getUiServer();
|
WebServer server = plugin.getUiServer();
|
||||||
if (Verify.notNull(server)) {
|
if (Verify.notNull(server)) {
|
||||||
return server.getDataReqHandler().getInspectHtml(uuid);
|
return server.getDataReqHandler().getInspectHtml(uuid);
|
||||||
}
|
}
|
||||||
@ -208,7 +208,7 @@ public class API {
|
|||||||
* @return analysis.html with all placeholders replaced.
|
* @return analysis.html with all placeholders replaced.
|
||||||
*/
|
*/
|
||||||
public String getAnalysisHtmlAsString() {
|
public String getAnalysisHtmlAsString() {
|
||||||
WebSocketServer server = plugin.getUiServer();
|
WebServer server = plugin.getUiServer();
|
||||||
if (Verify.notNull(server)) {
|
if (Verify.notNull(server)) {
|
||||||
return server.getDataReqHandler().getAnalysisHtml();
|
return server.getDataReqHandler().getAnalysisHtml();
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ import java.util.concurrent.Executors;
|
|||||||
/**
|
/**
|
||||||
* @author Rsl1122
|
* @author Rsl1122
|
||||||
*/
|
*/
|
||||||
public class WebSocketServer {
|
public class WebServer {
|
||||||
|
|
||||||
private final Plan plugin;
|
private final Plan plugin;
|
||||||
private final DataRequestHandler dataReqHandler;
|
private final DataRequestHandler dataReqHandler;
|
||||||
@ -47,7 +47,7 @@ public class WebSocketServer {
|
|||||||
*
|
*
|
||||||
* @param plugin Current instance of Plan
|
* @param plugin Current instance of Plan
|
||||||
*/
|
*/
|
||||||
public WebSocketServer(Plan plugin) {
|
public WebServer(Plan plugin) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
this.port = Settings.WEBSERVER_PORT.getNumber();
|
this.port = Settings.WEBSERVER_PORT.getNumber();
|
||||||
shutdown = false;
|
shutdown = false;
|
Loading…
Reference in New Issue
Block a user