Skip to content

Commit

Permalink
chore: remove debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakShearman committed Mar 4, 2024
1 parent 0c8f17f commit bd7f995
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
import dev.emortal.api.model.matchmaker.Assignment;
import dev.emortal.api.model.matchmaker.Match;
import dev.emortal.api.model.matchmaker.Ticket;
import dev.emortal.velocity.adapter.player.PlayerProvider;
import dev.emortal.velocity.adapter.server.ServerProvider;
import dev.emortal.velocity.lang.ChatMessages;
import dev.emortal.velocity.messaging.MessagingModule;
import dev.emortal.velocity.adapter.player.PlayerProvider;
import net.kyori.adventure.text.Component;
import org.jetbrains.annotations.NotNull;

import java.util.UUID;
Expand Down Expand Up @@ -65,16 +64,14 @@ private void movePlayersToMatch(@NotNull Match match) {

RegisteredServer server = this.serverProvider.createServerFromAssignment(assignment);

// Weirdness required here. Register the server version with ViaVersion to allow for more seamless updates
// Some servers can be on old/new versions, and we need to handle that
// Retrieve ViaVersion, set the protocol version if available.
// This allows us to run old server versions for *some* games.
ViaServerProxyPlatform platform = (ViaServerProxyPlatform) Via.getPlatform();

if (assignment.hasProtocolVersion()) {
platform.protocolDetectorService().setProtocolVersion(assignment.getServerId(), (int) assignment.getProtocolVersion());
}

playerProvider.allPlayers().forEach(p -> p.sendMessage(Component.text("protocolVer: " + assignment.getProtocolVersion())));

ChatMessages.SENDING_TO_SERVER.send(player, serverId);
player.createConnectionRequest(server).fireAndForget();
}
Expand Down

0 comments on commit bd7f995

Please sign in to comment.