Add event to cancel or change chat messages sent from server
This commit is contained in:
parent
77bd22d3c1
commit
24cec145ca
1 changed files with 12 additions and 12 deletions
|
@ -4,15 +4,15 @@ import net.minecraft.src.EntityPlayerMP;
|
|||
|
||||
@Cancelable
|
||||
public class ServerChatEvent extends Event {
|
||||
public final String message, username;
|
||||
public final EntityPlayerMP player;
|
||||
public String line;
|
||||
public ServerChatEvent(EntityPlayerMP player, String message, String line)
|
||||
{
|
||||
super();
|
||||
this.message = message;
|
||||
this.player = player;
|
||||
this.username = player.username;
|
||||
this.line = "<" + username + "> " + message;
|
||||
}
|
||||
}
|
||||
public final String message, username;
|
||||
public final EntityPlayerMP player;
|
||||
public String line;
|
||||
public ServerChatEvent(EntityPlayerMP player, String message, String line)
|
||||
{
|
||||
super();
|
||||
this.message = message;
|
||||
this.player = player;
|
||||
this.username = player.username;
|
||||
this.line = "<" + username + "> " + message;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue