mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-27 02:21:30 +01:00
Fixed WebAPI registration
This commit is contained in:
parent
5506e66e35
commit
7dcbac3fa7
@ -54,18 +54,24 @@ public class WebServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void registerWebAPIs() {
|
private void registerWebAPIs() {
|
||||||
webAPI.registerNewAPI(new AnalyzeWebAPI());
|
webAPI.registerNewAPI(
|
||||||
webAPI.registerNewAPI(new ConfigurationWebAPI());
|
new AnalysisReadyWebAPI(),
|
||||||
webAPI.registerNewAPI(new InspectWebAPI());
|
new AnalyzeWebAPI(),
|
||||||
webAPI.registerNewAPI(new IsOnlineWebAPI());
|
new ConfigurationWebAPI(),
|
||||||
webAPI.registerNewAPI(new PingWebAPI());
|
new InspectWebAPI(),
|
||||||
webAPI.registerNewAPI(new RequestInspectPluginsTabBukkitWebAPI());
|
new IsOnlineWebAPI(),
|
||||||
|
new RequestInspectPluginsTabBukkitWebAPI(),
|
||||||
|
new PingWebAPI()
|
||||||
|
);
|
||||||
|
|
||||||
webAPI.registerNewAPI(new IsCachedWebAPI());
|
webAPI.registerNewAPI(
|
||||||
webAPI.registerNewAPI(new PostHtmlWebAPI());
|
new IsCachedWebAPI(),
|
||||||
webAPI.registerNewAPI(new PostInspectPluginsTabWebAPI());
|
new PostHtmlWebAPI(),
|
||||||
webAPI.registerNewAPI(new RequestPluginsTabWebAPI());
|
new PostInspectPluginsTabWebAPI(),
|
||||||
webAPI.registerNewAPI(new PostOriginalBukkitSettingsWebAPI());
|
new PostNetworkPageContentWebAPI(),
|
||||||
|
new PostOriginalBukkitSettingsWebAPI(),
|
||||||
|
new RequestPluginsTabWebAPI()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,6 +21,12 @@ public class WebAPIManager {
|
|||||||
registry = new HashMap<>();
|
registry = new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void registerNewAPI(WebAPI... api) {
|
||||||
|
for (WebAPI webAPI : api) {
|
||||||
|
registerNewAPI(webAPI);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void registerNewAPI(WebAPI api) {
|
public void registerNewAPI(WebAPI api) {
|
||||||
registry.put(api.getClass().getSimpleName().toLowerCase(), api);
|
registry.put(api.getClass().getSimpleName().toLowerCase(), api);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user