geforkt von Mirrors/Paper
Tweak to PlayerChatEvent, allow plugins to set the player that the chat/command executes as
By: Dinnerbone <dinnerbone@dinnerbone.com>
Dieser Commit ist enthalten in:
Ursprung
b63f46250a
Commit
304ad67759
@ -52,4 +52,14 @@ public class PlayerChatEvent extends PlayerEvent {
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the player that this message will display as, or command will be
|
||||
* executed as
|
||||
*
|
||||
* @param player New player which this event will execute as
|
||||
*/
|
||||
public void setPlayer(final Player player) {
|
||||
this.player = player;
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import org.bukkit.event.Event;
|
||||
* Represents a player related event
|
||||
*/
|
||||
public class PlayerEvent extends Event {
|
||||
private final Player player;
|
||||
protected Player player;
|
||||
|
||||
public PlayerEvent(final Event.Type type, final Player who) {
|
||||
super(type);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren