Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -210,4 +210,9 @@ public int runTaskAsyncLater(Runnable task, int timeInMillisecondsLater) {
public boolean isPluginLoaded(String pluginName) {
return getProxy().getPluginManager().getPlugin(pluginName) != null;
}

@Override
public boolean hasLimbo() {
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public interface CorePlugin {
int runTaskAsyncLater(Runnable task, int timeInMillisecondsLater);

boolean isPluginLoaded(String pluginName);
boolean hasLimbo();

CoreCommandSender getConsole();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void onServerConnected(@NotNull CorePlayer player, @NotNull CoreBackendSe
if (!stateStore.isConnected(player)) {
handleJoin(player, server);
} else {
boolean fromLimbo = plugin.getServerType() == ServerType.VELOCITY && previousServer == null;
boolean fromLimbo = plugin.hasLimbo() && previousServer == null;
handleSwap(player, server, fromLimbo);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,11 @@ public boolean isPluginLoaded(String pluginName) {
return proxy.getPluginManager().isLoaded(pluginName.toLowerCase());
}

@Override
public boolean hasLimbo() {
return isLimboAPIAvailable;
}

@Override
public CorePlayer createPlayer(UUID uuid) {
Optional<Player> player = proxy.getPlayer(uuid);
Expand Down
Loading