66import io .javalin .Javalin ;
77import io .javalin .http .BadRequestResponse ;
88import net .earthmc .emcapi .EMCAPI ;
9- import net .earthmc .emcapi .endpoint .*;
9+ import net .earthmc .emcapi .endpoint .LocationEndpoint ;
10+ import net .earthmc .emcapi .endpoint .MysteryMasterEndpoint ;
11+ import net .earthmc .emcapi .endpoint .NearbyEndpoint ;
12+ import net .earthmc .emcapi .endpoint .OnlineEndpoint ;
13+ import net .earthmc .emcapi .endpoint .ServerEndpoint ;
14+ import net .earthmc .emcapi .endpoint .ShopEndpoint ;
15+ import net .earthmc .emcapi .endpoint .McMMOEndpoint ;
16+ import net .earthmc .emcapi .endpoint .McMMOTopEndpoint ;
17+ import net .earthmc .emcapi .endpoint .PursuitsEndpoint ;
18+ import net .earthmc .emcapi .endpoint .AdvancementsEndpoint ;
1019import net .earthmc .emcapi .endpoint .towny .NationsEndpoint ;
1120import net .earthmc .emcapi .endpoint .towny .PlayersEndpoint ;
1221import net .earthmc .emcapi .endpoint .towny .QuartersEndpoint ;
@@ -32,8 +41,8 @@ public EndpointManager(EMCAPI plugin) {
3241 }
3342
3443 public void loadEndpoints () {
35- new SuperbVoteIntegration (); // Register integrations for usage in ServerEndpoint
36- new QuartersIntegration ();
44+ new SuperbVoteIntegration (). register () ; // Register integrations for usage in ServerEndpoint
45+ new QuartersIntegration (). register () ;
3746 ServerEndpoint serverEndpoint = new ServerEndpoint (plugin );
3847 javalin .get (URLPath , ctx -> ctx .json (serverEndpoint .lookup ()));
3948
@@ -46,7 +55,7 @@ public void loadEndpoints() {
4655 loadOnlinePlayersEndpoint ();
4756 loadMysteryMasterEndpoint ();
4857 loadShopsEndpoint ();
49- loadMcMMoEndpoint ();
58+ loadmcMMoEndpoint ();
5059 loadPursuitsEndpoint ();
5160 loadAdvancementsEndpoint ();
5261 }
@@ -74,7 +83,7 @@ private void loadPlayersEndpoint() {
7483 PlayersListEndpoint ple = new PlayersListEndpoint ();
7584 javalin .get (URLPath + "/players" , ctx -> ctx .json (ple .lookup ()));
7685
77- new DiscordIntegration (); // Load the discord integration to check if DiscordSRV is enabled - checked when including discord for player
86+ new DiscordIntegration (). register () ; // Load the discord integration to check if DiscordSRV is enabled - checked when including discord for player
7887 PlayersEndpoint playersEndpoint = new PlayersEndpoint (plugin );
7988 javalin .post (URLPath + "/players" , ctx -> {
8089 QueryBody parsedBody = parseBody (ctx .body ());
@@ -86,7 +95,7 @@ private void loadTownsEndpoint() {
8695 TownsListEndpoint tle = new TownsListEndpoint ();
8796 javalin .get (URLPath + "/towns" , ctx -> ctx .json (tle .lookup ()));
8897
89- new WarpsIntegration ();
98+ new WarpsIntegration (). register () ;
9099 TownsEndpoint townsEndpoint = new TownsEndpoint (plugin );
91100 javalin .post (URLPath + "/towns" , ctx -> {
92101 QueryBody parsedBody = parseBody (ctx .body ());
@@ -98,8 +107,8 @@ private void loadNationsEndpoint() {
98107 NationsListEndpoint nle = new NationsListEndpoint ();
99108 javalin .get (URLPath + "/nations" , ctx -> ctx .json (nle .lookup ()));
100109
101- new EmbargoesIntegration ();
102- new PactsIntegration ();
110+ new EmbargoesIntegration (). register () ;
111+ new PactsIntegration (). register () ;
103112 NationsEndpoint nationsEndpoint = new NationsEndpoint (plugin );
104113 javalin .post (URLPath + "/nations" , ctx -> {
105114 QueryBody parsedBody = parseBody (ctx .body ());
@@ -147,6 +156,7 @@ private void loadOnlinePlayersEndpoint() {
147156
148157 private void loadMysteryMasterEndpoint () {
149158 MysteryMasterIntegration mysteryMasterIntegration = new MysteryMasterIntegration ();
159+ mysteryMasterIntegration .register ();
150160 MysteryMasterEndpoint mysteryMasterEndpoint = new MysteryMasterEndpoint (plugin );
151161 javalin .get (URLPath + "/mm" , ctx -> {
152162 mysteryMasterIntegration .throwIfDisabled ();
@@ -157,6 +167,7 @@ private void loadMysteryMasterEndpoint() {
157167
158168 private void loadShopsEndpoint () {
159169 QuickShopIntegration quickShopIntegration = new QuickShopIntegration ();
170+ quickShopIntegration .register ();
160171 ShopEndpoint shopEndpoint = new ShopEndpoint (plugin );
161172 javalin .post (URLPath + "/shop" , ctx -> {
162173 quickShopIntegration .throwIfDisabled ();
@@ -166,8 +177,9 @@ private void loadShopsEndpoint() {
166177 });
167178 }
168179
169- private void loadMcMMoEndpoint () {
180+ private void loadmcMMoEndpoint () {
170181 McMMOIntegration mcMMOIntegration = new McMMOIntegration ();
182+ mcMMOIntegration .register ();
171183 McMMOEndpoint mcMMOEndpoint = new McMMOEndpoint (plugin );
172184 javalin .post (URLPath + "/mcmmo" , ctx -> {
173185 mcMMOIntegration .throwIfDisabled ();
@@ -187,6 +199,7 @@ private void loadMcMMoEndpoint() {
187199
188200 private void loadPursuitsEndpoint () {
189201 PursuitsIntegration pursuitsIntegration = new PursuitsIntegration ();
202+ pursuitsIntegration .register ();
190203 PursuitsEndpoint pursuitsEndpoint = new PursuitsEndpoint (plugin );
191204 javalin .post (URLPath + "/pursuits" , ctx -> {
192205 pursuitsIntegration .throwIfDisabled ();
@@ -198,6 +211,7 @@ private void loadPursuitsEndpoint() {
198211
199212 private void loadAdvancementsEndpoint () {
200213 AdvancementsIntegration advancementsIntegration = new AdvancementsIntegration ();
214+ advancementsIntegration .register ();
201215 AdvancementsEndpoint advancementsEndpoint = new AdvancementsEndpoint ();
202216 javalin .get (URLPath + "/advancements" , ctx -> {
203217 advancementsIntegration .throwIfDisabled ();
0 commit comments