mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-31 21:37:39 +01:00
Added PlayerChatEvent.getFormat/setFormat
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
8574cf2cb0
commit
e39ba776c9
@ -10,6 +10,7 @@ import org.bukkit.event.Cancellable;
|
|||||||
public class PlayerChatEvent extends PlayerEvent implements Cancellable {
|
public class PlayerChatEvent extends PlayerEvent implements Cancellable {
|
||||||
private boolean cancel = false;
|
private boolean cancel = false;
|
||||||
private String message;
|
private String message;
|
||||||
|
private String format = "<%1$s> %2$s";
|
||||||
|
|
||||||
public PlayerChatEvent(final Type type, final Player player, final String message) {
|
public PlayerChatEvent(final Type type, final Player player, final String message) {
|
||||||
super(type, player);
|
super(type, player);
|
||||||
@ -63,4 +64,22 @@ public class PlayerChatEvent extends PlayerEvent implements Cancellable {
|
|||||||
public void setPlayer(final Player player) {
|
public void setPlayer(final Player player) {
|
||||||
this.player = player;
|
this.player = player;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the format to use to display this chat message
|
||||||
|
*
|
||||||
|
* @return String.Format compatible format string
|
||||||
|
*/
|
||||||
|
public String getFormat() {
|
||||||
|
return format;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the format to use to display this chat message
|
||||||
|
*
|
||||||
|
* @param format String.Format compatible format string
|
||||||
|
*/
|
||||||
|
public void setFormat(final String format) {
|
||||||
|
this.format = format;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user