We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7dab003 commit 4e6c711Copy full SHA for 4e6c711
platform/platform-bukkit/src/main/kotlin/taboolib/platform/BukkitAdapter.kt
@@ -30,7 +30,11 @@ class BukkitAdapter : PlatformAdapter {
30
}
31
32
override fun onlinePlayers(): List<ProxyPlayer> {
33
- return Bukkit.getWorlds().flatMap { it.players }.filter { Bukkit.getPlayer(it.uniqueId) != null }.map { adaptPlayer(it) }
+ return try {
34
+ Bukkit.getOnlinePlayers().map { adaptPlayer(it) }
35
+ } catch (_: NoSuchMethodError) {
36
+ Bukkit.getWorlds().flatMap { it.players }.filter { Bukkit.getPlayer(it.uniqueId) != null }.map { adaptPlayer(it) }
37
+ }
38
39
40
override fun adaptPlayer(any: Any): ProxyPlayer {
0 commit comments