mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 04:17:07 +00:00
Improved the option to cancel handling events
This commit is contained in:
parent
6742273644
commit
00fea6461c
@ -198,7 +198,7 @@ class PocketMinecraftServer extends stdClass{
|
|||||||
$this->preparedSQL->selectHandlers->bindValue(":name", $event, SQLITE3_TEXT);
|
$this->preparedSQL->selectHandlers->bindValue(":name", $event, SQLITE3_TEXT);
|
||||||
$handlers = $this->preparedSQL->selectHandlers->execute();
|
$handlers = $this->preparedSQL->selectHandlers->execute();
|
||||||
$result = true;
|
$result = true;
|
||||||
if($handlers !== false and $handlers !== true){
|
if($handlers !== false and $handlers !== true){
|
||||||
while(false !== ($hn = $handlers->fetchArray(SQLITE3_ASSOC)) and $result !== false){
|
while(false !== ($hn = $handlers->fetchArray(SQLITE3_ASSOC)) and $result !== false){
|
||||||
$handler = $this->handlers[(int) $hn["ID"]];
|
$handler = $this->handlers[(int) $hn["ID"]];
|
||||||
if(is_array($handler)){
|
if(is_array($handler)){
|
||||||
@ -209,8 +209,10 @@ class PocketMinecraftServer extends stdClass{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$handlers->finalize();
|
$handlers->finalize();
|
||||||
$this->trigger($event, $data);
|
if($result !== false){
|
||||||
|
$this->trigger($event, $data);
|
||||||
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user