mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Added Server.broadcastMessage().
By: sk89q <the.sk89q@gmail.com>
This commit is contained in:
parent
39e667c78e
commit
397ddecd61
1 changed files with 10 additions and 0 deletions
|
@ -78,6 +78,16 @@ public final class CraftServer implements Server {
|
|||
|
||||
return null;
|
||||
}
|
||||
|
||||
public int broadcastMessage(String message) {
|
||||
Player[] players = getOnlinePlayers();
|
||||
|
||||
for (Player player : players) {
|
||||
player.sendMessage(message);
|
||||
}
|
||||
|
||||
return players.length;
|
||||
}
|
||||
|
||||
public Player getPlayer(final EntityPlayerMP entity) {
|
||||
return entity.a.getPlayer();
|
||||
|
|
Loading…
Reference in a new issue