Added ability to disable the join/leave notices by setting the message to null in the event. The join message is moved to the onJoinEvent rather than during login

This commit is contained in:
Raphfrk
2011-03-26 11:31:48 +00:00
committed by Erik Broes
parent 8e53077efe
commit abf7f8581e
3 changed files with 15 additions and 3 deletions

View File

@@ -90,7 +90,10 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
// Send the possibly modified leave message
this.b.a((Packet) (new Packet255KickDisconnect( event.getReason() )));
this.b.c();
this.d.f.a((Packet) (new Packet3Chat( event.getLeaveMessage() )));
leaveMessage = event.getLeaveMessage();
if (leaveMessage != null) {
this.d.f.a((Packet) (new Packet3Chat(leaveMessage)));
}
// CraftBukkit end
this.d.f.c(this.e);