diff --git a/protocol/src/main/java/net/md_5/mendax/PacketDefinitions.java b/protocol/src/main/java/net/md_5/mendax/PacketDefinitions.java index c80a0599f..2730585d6 100644 --- a/protocol/src/main/java/net/md_5/mendax/PacketDefinitions.java +++ b/protocol/src/main/java/net/md_5/mendax/PacketDefinitions.java @@ -6,7 +6,7 @@ public class PacketDefinitions { private static final int MAX_PACKET = 256; - public static final OpCode[][] opCodes = new OpCode[ MAX_PACKET ][]; + public static final OpCode[][] opCodes = new OpCode[ MAX_PACKET * 2 ][]; public static final int VANILLA_PROTOCOL = 0; public static final int FORGE_PROTOCOL = MAX_PACKET; diff --git a/proxy/src/main/java/net/md_5/bungee/command/CommandServer.java b/proxy/src/main/java/net/md_5/bungee/command/CommandServer.java index 64cdb9774..ab34dcf9d 100644 --- a/proxy/src/main/java/net/md_5/bungee/command/CommandServer.java +++ b/proxy/src/main/java/net/md_5/bungee/command/CommandServer.java @@ -2,6 +2,7 @@ package net.md_5.bungee.command; import java.util.Map; import net.md_5.bungee.BungeeCord; +import net.md_5.bungee.UserConnection; import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.config.ServerInfo; @@ -26,7 +27,7 @@ public class CommandServer extends Command { return; } - ProxiedPlayer player = (ProxiedPlayer) sender; + UserConnection player = (UserConnection) sender; Map servers = BungeeCord.getInstance().config.getServers(); if ( args.length == 0 ) { @@ -49,7 +50,7 @@ public class CommandServer extends Command player.sendMessage( ChatColor.RED + "You are already on this server." ); } else { - player.connect( server ); + player.connect( server, true ); } } }