Quick fix for /server, will do a better job later
This commit is contained in:
parent
9c5e02e20a
commit
25d2902240
@ -6,7 +6,7 @@ public class PacketDefinitions
|
|||||||
{
|
{
|
||||||
|
|
||||||
private static final int MAX_PACKET = 256;
|
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 VANILLA_PROTOCOL = 0;
|
||||||
public static final int FORGE_PROTOCOL = MAX_PACKET;
|
public static final int FORGE_PROTOCOL = MAX_PACKET;
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ package net.md_5.bungee.command;
|
|||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import net.md_5.bungee.BungeeCord;
|
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.ChatColor;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.config.ServerInfo;
|
import net.md_5.bungee.api.config.ServerInfo;
|
||||||
@ -26,7 +27,7 @@ public class CommandServer extends Command
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ProxiedPlayer player = (ProxiedPlayer) sender;
|
UserConnection player = (UserConnection) sender;
|
||||||
Map<String, ServerInfo> servers = BungeeCord.getInstance().config.getServers();
|
Map<String, ServerInfo> servers = BungeeCord.getInstance().config.getServers();
|
||||||
if ( args.length == 0 )
|
if ( args.length == 0 )
|
||||||
{
|
{
|
||||||
@ -49,7 +50,7 @@ public class CommandServer extends Command
|
|||||||
player.sendMessage( ChatColor.RED + "You are already on this server." );
|
player.sendMessage( ChatColor.RED + "You are already on this server." );
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
player.connect( server );
|
player.connect( server, true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user