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 authored and Erik Broes committed 2011-03-26 15:07:55 +01:00
1 parent 8e53077efe
commit abf7f8581e
3 files changed
+15 -3

No files matched your search

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