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