Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ifera-mc/cps

A simple plugin which checks the clicks of a player per second.
https://github.com/ifera-mc/cps

api clicks cps php plugin pmmp pocketmine-mp second

Last synced: 1 day ago
JSON representation

A simple plugin which checks the clicks of a player per second.

Awesome Lists containing this project

README

        

![CPS Banner](https://github.com/JackMD/CPS/blob/master/meta/cps.png)
# CPS

| License | Poggit |
|:--:|:--:|
|[![GitHub license](https://img.shields.io/github/license/JackMD/CPS.svg)](https://github.com/JackMD/CPS/blob/master/LICENSE)|[![Poggit-CI](https://poggit.pmmp.io/ci.shield/Ifera/CPS/CPS)](https://poggit.pmmp.io/ci/Ifera/CPS/CPS)|

### A simple plugin which checks the clicks of a player per second. With in-built support for ScoreHud version 6.0+.

### Available Tags:

| Tag | Description |
|:--:|:--:|
|`{cps.cps}`|Shows the cps of the player on ScoreHud|

### API

CPS provides a simple API for developers wishing to use this plugin.

- First you need to get hold of the plugin. You can do so by:

```php
$cps = Server::getInstance()->getPluginManager()->getPlugin("CPS");
if($cps instanceof \JackMD\CPS\CPS){
//do whatever
}
```
- Then you can get the click of a player via:

```php
/** @var pocketmine\Player $player */
$clicks = $cps->getClicks($player);
```
- You can take a look at [CPS](https://github.com/JackMD/CPS/blob/master/src/JackMD/CPS/CPS.php) for more info.

### Credits
[DaPigGuy](https://github.com/DaPigGuy) for most of the code.