Use cleaner equals check and actually set member field

This commit is contained in:
md_5 2013-06-02 10:23:21 +10:00
parent 0b0d09427d
commit d1dd7379b1
2 changed files with 3 additions and 2 deletions

View File

@ -36,7 +36,8 @@ public class PacketD1Team extends DefinedPacket
public PacketD1Team(String name)
{
this();
mode = 1;
this.name = name;
this.mode = 1;
}
@Override

View File

@ -266,7 +266,7 @@ public class ServerConnector extends PacketHandler
@Override
public void handle(PacketFAPluginMessage pluginMessage) throws Exception
{
if ( pluginMessage.getData().length == 0 && pluginMessage.getTag().equals( "BungeeCord" ) )
if ( pluginMessage.equals( PacketConstants.I_AM_BUNGEE) )
{
throw new IllegalStateException( "May not connect to another BungeCord!" );
}