Skip to content

Commit 1f83a65

Browse files
author
games647
authored
Merge pull request #629 from Krakenied/main
Fix #627 - skip Floodgate config validation if there's no Floodgate installed
2 parents 28480a0 + d7e0a44 commit 1f83a65

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

bukkit/src/main/java/com/github/games647/fastlogin/bukkit/FastLoginBukkit.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,10 @@ public void onEnable() {
148148
private boolean initializeFloodgate() {
149149
if (getServer().getPluginManager().getPlugin("Floodgate") != null) {
150150
floodgateService = new FloodgateService(FloodgateApi.getInstance(), core);
151-
}
152151

153-
// Check Floodgate config values
154-
if (!floodgateService.isValidFloodgateConfigString("autoLoginFloodgate")
155-
|| !floodgateService.isValidFloodgateConfigString("allowFloodgateNameConflict")) {
156-
return false;
152+
// Check Floodgate config values and return
153+
return floodgateService.isValidFloodgateConfigString("autoLoginFloodgate")
154+
&& floodgateService.isValidFloodgateConfigString("allowFloodgateNameConflict");
157155
}
158156

159157
return true;
@@ -168,7 +166,10 @@ public void onDisable() {
168166
core.close();
169167
}
170168

171-
bungeeManager.cleanup();
169+
if (bungeeManager != null) {
170+
bungeeManager.cleanup();
171+
}
172+
172173
if (premiumPlaceholder != null && getServer().getPluginManager().isPluginEnabled("PlaceholderAPI")) {
173174
try {
174175
premiumPlaceholder.unregister();

0 commit comments

Comments
 (0)