Hotfix dual checking of Schematics
All checks were successful
SteamWarCI Build successful

This commit is contained in:
2025-10-30 15:23:40 +01:00
parent f216ed0f0b
commit 6d8c765483

View File

@ -20,6 +20,7 @@
package de.steamwar.velocitycore.commands;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.ServerConnection;
import de.steamwar.command.SWCommand;
import de.steamwar.linkage.Linked;
import de.steamwar.messages.Chatter;
@ -157,6 +158,15 @@ public class CheckCommand extends SWCommand {
sender.system("CHECK_SCHEMATIC_OWN_TEAM");
return;
}
CheckSession checkSession = currentSchems.get(schem.getId());
if (checkSession != null) {
Optional<ServerConnection> serverConnection = checkSession.checker.getPlayer().getCurrentServer();
if (serverConnection.isPresent()) {
sender.getPlayer().createConnectionRequest(serverConnection.get().getServer()).fireAndForget();
return;
}
}
new CheckSession(sender, schem);
}