How to use the CardinalAPI - NikV2/CardinalAPI GitHub Wiki
First, Let's get the API Instance
CardinalAPI api = CardinalAPIProvider.getAPI();
Let's try to get the Player's Ping as an example
api.getPing(player); //Returns an integer of the player's Ping using Reflection
Now, Let's try to use an Event and add a Broadcast message as an example
@EventHandler
public void onLag(ServerLagEvent e) {
Bukkit.getServer().broadcastMessage("Oh my god the Server is lagging! TPS: " + e.getTPS());
}