mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-23 09:37:54 +01:00
[Fix] Fixed exception on CraftBukkit servers
Related to Ping gathering and Player.Spigot class
This commit is contained in:
parent
a131bb7dc8
commit
a531f23bef
@ -122,9 +122,9 @@ public class PingCountTimerBukkit extends AbsRunnable implements Listener {
|
||||
private static boolean isPingMethodAvailable() {
|
||||
try {
|
||||
//Only available in Paper
|
||||
Player.Spigot.class.getDeclaredMethod("getPing");
|
||||
Class.forName("org.bukkit.entity.Player.Spigot").getDeclaredMethod("getPing");
|
||||
return true;
|
||||
} catch (NoSuchMethodException noSuchMethodEx) {
|
||||
} catch (ClassNotFoundException | NoSuchMethodException noSuchMethodEx) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user