Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
Added Server.broadcastMessage().
Dieser Commit ist enthalten in:
Ursprung
4d1c1fe5ed
Commit
f6d4979aa2
@ -79,6 +79,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();
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren