mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 01:51:51 +00:00
Added more Ban APIs. Now you can directly ban
This commit is contained in:
parent
78bfe7ce24
commit
0d3cf74636
@ -148,6 +148,22 @@ class BanAPI{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function ban($username){
|
||||||
|
$this->commandHandler("ban", array("add", $username));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function pardon($username){
|
||||||
|
$this->commandHandler("ban", array("pardon", $username));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function banIP($username){
|
||||||
|
$this->commandHandler("banip", array("add", $username));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function pardonIP($username){
|
||||||
|
$this->commandHandler("banip", array("pardon", $username));
|
||||||
|
}
|
||||||
|
|
||||||
public function isIPBanned($ip){
|
public function isIPBanned($ip){
|
||||||
if($this->server->api->dhandle("api.ban.ip.check", $ip) === false){
|
if($this->server->api->dhandle("api.ban.ip.check", $ip) === false){
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user