Added show- and hideOnlinePlayers() method

This commit is contained in:
bluefireoly
2020-10-30 18:21:12 +01:00
parent 9a3a226186
commit bc3a8005ab

View File

@@ -84,6 +84,20 @@ fun Player.appear() {
onlinePlayers.filter { it != this }.forEach { it.showPlayer(KSpigotMainInstance, this) }
}
/**
* Hides all online players from this player.
*/
fun Player.hideOnlinePlayers() {
onlinePlayers.filter { it != this }.forEach { this.hidePlayer(KSpigotMainInstance, it) }
}
/**
* Shows all online players to this player.
*/
fun Player.showOnlinePlayers() {
onlinePlayers.filter { it != this }.forEach { this.showPlayer(KSpigotMainInstance, it) }
}
/**
* Kicks the player from the server.
*/