mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +08:00
[Fix] Fix ping method usage on Paper
This commit is contained in:
parent
916a0d3aed
commit
acfa885a0d
@ -122,7 +122,7 @@ public class PingCountTimerBukkit extends AbsRunnable implements Listener {
|
|||||||
private static boolean isPingMethodAvailable() {
|
private static boolean isPingMethodAvailable() {
|
||||||
try {
|
try {
|
||||||
//Only available in Paper
|
//Only available in Paper
|
||||||
Class.forName("org.bukkit.entity.Player.Spigot").getDeclaredMethod("getPing");
|
Class.forName("org.bukkit.entity.Player$Spigot").getDeclaredMethod("getPing");
|
||||||
return true;
|
return true;
|
||||||
} catch (ClassNotFoundException | NoSuchMethodException noSuchMethodEx) {
|
} catch (ClassNotFoundException | NoSuchMethodException noSuchMethodEx) {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user