Quick fix for /server, will do a better job later

This commit is contained in:
md_5 2013-02-10 21:36:37 +11:00
parent 9c5e02e20a
commit 25d2902240
2 changed files with 4 additions and 3 deletions

View File

@ -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;

View File

@ -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<String, ServerInfo> 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 );
}
}
}