mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-12 21:54:06 +01:00
Added Server.broadcastMessage().
This commit is contained in:
parent
4d1c1fe5ed
commit
f6d4979aa2
@ -78,6 +78,16 @@ public final class CraftServer implements Server {
|
|||||||
|
|
||||||
return null;
|
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) {
|
public Player getPlayer(final EntityPlayerMP entity) {
|
||||||
return entity.a.getPlayer();
|
return entity.a.getPlayer();
|
||||||
|
Loading…
Reference in New Issue
Block a user