| Total Complexity | 4 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | final class BukkitCommandWrapper extends CoreCommandWrapper |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Command list |
||
| 12 | */ |
||
| 13 | const VERSION_COMMAND = 'version'; |
||
| 14 | const PLUGINS_COMMAND = 'plugins'; |
||
| 15 | const RELOAD_COMMAND = 'reload'; |
||
| 16 | const TIMINGS_COMMAND = 'timings'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Gives the version number of CraftBukkit which is installed on the server. |
||
| 20 | * |
||
| 21 | * @return bool|mixed |
||
| 22 | */ |
||
| 23 | public function version() |
||
| 24 | { |
||
| 25 | return $this->sendCommand(self::VERSION_COMMAND); |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Lists all installed plugins on the server. |
||
| 30 | * |
||
| 31 | * @return bool|mixed |
||
| 32 | */ |
||
| 33 | public function plugins() |
||
| 34 | { |
||
| 35 | return $this->sendCommand(self::PLUGINS_COMMAND); |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Stops and restarts all plugins on the server. |
||
| 40 | * |
||
| 41 | * @return bool|mixed |
||
| 42 | */ |
||
| 43 | public function reload() |
||
| 44 | { |
||
| 45 | return $this->sendCommand(self::RELOAD_COMMAND); |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Records timings for all plugin events. |
||
| 50 | * |
||
| 51 | * @param string $option |
||
| 52 | * |
||
| 53 | * @return bool|mixed |
||
| 54 | */ |
||
| 55 | public function timings(string $option) |
||
| 62 | } |
||
| 63 | } |
||
| 64 |