From e39ba776c95e66e68ee7aa9e2d6093cac2ba075a Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Fri, 7 Jan 2011 13:31:16 +0000 Subject: [PATCH] Added PlayerChatEvent.getFormat/setFormat By: Dinnerbone --- .../bukkit/event/player/PlayerChatEvent.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerChatEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerChatEvent.java index f67ebd8627..b97ac5a6a9 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerChatEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerChatEvent.java @@ -10,6 +10,7 @@ import org.bukkit.event.Cancellable; public class PlayerChatEvent extends PlayerEvent implements Cancellable { private boolean cancel = false; private String message; + private String format = "<%1$s> %2$s"; public PlayerChatEvent(final Type type, final Player player, final String message) { super(type, player); @@ -63,4 +64,22 @@ public class PlayerChatEvent extends PlayerEvent implements Cancellable { public void setPlayer(final 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; + } }