small tweaks

This commit is contained in:
GameHerobrine 2023-01-28 13:32:28 +03:00
parent a7ebdb35bd
commit c3750014a9
4 changed files with 5 additions and 6 deletions

View file

@ -350,7 +350,7 @@ class PocketMinecraftServer{
$hnid = $this->handCnt++;
$this->handlers[$hnid] = $callable;
$this->query("INSERT INTO handlers (ID, name, priority) VALUES (" . $hnid . ", '" . str_replace("'", "\\'", $event) . "', " . $priority . ");");
console("[INTERNAL] New handler " . (is_array($callable) ? get_class($callable[0]) . "::" . $callable[1] : $callable) . " to special event " . $event . " (ID " . $hnid . ")", true, true, 3);
//console("[INTERNAL] New handler " . (is_array($callable) ? get_class($callable[0]) . "::" . $callable[1] : $callable) . " to special event " . $event . " (ID " . $hnid . ")", true, true, 3);
return $hnid;
}
@ -596,7 +596,7 @@ class PocketMinecraftServer{
$this->preparedSQL->updateAction->bindValue(":time", $time, SQLITE3_FLOAT);
$this->preparedSQL->updateAction->bindValue(":id", $cid, SQLITE3_INTEGER);
$this->preparedSQL->updateAction->execute();
if(!@is_callable($this->schedule[$cid][0])){
if(!isset($this->schedule[$cid]) || !isset($this->schedule[$cid][0]) || !@is_callable($this->schedule[$cid][0])){
$return = false;
}else{
++$actionCount;