DeveloperAPI

Developer API

Event

Clicks Per Second currently has a single Event, which is currently being developed.

EventHandler
public void onCPSWarn(ClickWarningEvent e){
     //Code here
}

Variables

//Get Player that got the Warning
Player p = event.getPlayer();

//Get the amount of clicks the player has (Basically the Max CPS of the server)
int clicks = event.getClickAmount();

//Check if the player is going to be kicked
boolean isKicked = event.isKicked();

//The list of commands to be run
List<String> commands = event.getCommands();

//Set if the player is getting kicked or not
event.setKicked(isKicked);

//Set the commands to be run
event.setCommands(List<String> commands);

Comments

Posts Quoted:
Reply
Clear All Quotes