Revert "Bungee join / part messages"

This reverts commit 7108bd4deb.
This commit is contained in:
md_5 2013-04-13 18:28:11 +10:00
parent 7108bd4deb
commit a9ad4889f7
4 changed files with 3 additions and 37 deletions

View File

@ -247,11 +247,4 @@ public abstract class ProxyServer
* @return the server's {@link AsyncHttpClient} instance
*/
public abstract AsyncHttpClient getHttpClient();
/**
* Send a message to all connected players.
*
* @param message the message to send
*/
public abstract void broadcast(String message);
}

View File

@ -403,13 +403,4 @@ public class BungeeCord extends ProxyServer
{
return ConsoleCommandSender.getInstance();
}
@Override
public void broadcast(String message)
{
for ( ProxiedPlayer player : getPlayers() )
{
player.sendMessage( message );
}
}
}

View File

@ -10,7 +10,6 @@ import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.socket.nio.NioSocketChannel;
import java.net.InetSocketAddress;
import java.text.MessageFormat;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
@ -86,9 +85,6 @@ public final class UserConnection implements ProxiedPlayer
{
addGroups( s );
}
//TODO: Here?
bungee.broadcast( MessageFormat.format( BungeeCord.getInstance().config.getJoinMessage(), getDisplayName() ) );
}
public void sendPacket(DefinedPacket p)
@ -192,8 +188,6 @@ public final class UserConnection implements ProxiedPlayer
{
server.disconnect( "Quitting" );
}
bungee.broadcast( MessageFormat.format( BungeeCord.getInstance().config.getPartMessage(), getDisplayName() ) );
}
}
@ -201,19 +195,13 @@ public final class UserConnection implements ProxiedPlayer
public void chat(String message)
{
Preconditions.checkState( server != null, "Not connected to server" );
if ( message != null && !message.isEmpty() )
{
server.getCh().write( new Packet3Chat( message ) );
}
server.getCh().write( new Packet3Chat( message ) );
}
@Override
public void sendMessage(String message)
{
if ( message != null && !message.isEmpty() )
{
ch.write( new Packet3Chat( message ) );
}
ch.write( new Packet3Chat( message ) );
}
@Override

View File

@ -5,7 +5,6 @@ import java.util.Collection;
import java.util.Map;
import java.util.UUID;
import lombok.Getter;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.config.ConfigurationAdapter;
import net.md_5.bungee.api.config.ListenerInfo;
@ -50,8 +49,6 @@ public class Configuration
*/
private boolean onlineMode = true;
private int playerLimit = -1;
private String joinMessage = "&b{0} has joined the network";
private String partMessage = "&b{0} has left the network";
public void load()
{
@ -63,10 +60,7 @@ public class Configuration
onlineMode = adapter.getBoolean( "online_mode", onlineMode );
playerLimit = adapter.getInt( "player_limit", playerLimit );
joinMessage = ChatColor.translateAlternateColorCodes( '&', adapter.getString( "messages.join", joinMessage ) );
partMessage = ChatColor.translateAlternateColorCodes( '&', adapter.getString( "messages.part", partMessage ) );
DefaultTabList tab = DefaultTabList.valueOf( adapter.getString( "tab_list", "GLOBAL_PING" ).toUpperCase() );
DefaultTabList tab = DefaultTabList.valueOf( adapter.getString( "tab_list", "GLOBAL_PING" ) );
if ( tab == null )
{
tab = DefaultTabList.GLOBAL_PING;