mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 04:59:46 +00:00
small tweaks
This commit is contained in:
parent
a7ebdb35bd
commit
c3750014a9
4 changed files with 5 additions and 6 deletions
|
|
@ -511,7 +511,7 @@ class BlockAPI{
|
||||||
if(($player->gamemode & 0x01) === 0x00){
|
if(($player->gamemode & 0x01) === 0x00){
|
||||||
--$item->count;
|
--$item->count;
|
||||||
if($item->count <= 0){
|
if($item->count <= 0){
|
||||||
$player->setSlot($player->slot, BlockAPI::getItem(AIR, 0, 0), true);
|
$player->setSlot($player->slot, BlockAPI::getItem(AIR, 0, 0), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1747,7 +1747,7 @@ class Player{
|
||||||
}elseif($s->getID() !== AIR and $slot->getID() !== AIR and ($slot->getID() !== $s->getID() or $slot->getMetadata() !== $s->getMetadata()) and ($sl = $this->hasItem($s->getID())) !== false){
|
}elseif($s->getID() !== AIR and $slot->getID() !== AIR and ($slot->getID() !== $s->getID() or $slot->getMetadata() !== $s->getMetadata()) and ($sl = $this->hasItem($s->getID())) !== false){
|
||||||
$item = $this->armor[$i];
|
$item = $this->armor[$i];
|
||||||
$this->armor[$i] = $this->getSlot($sl);
|
$this->armor[$i] = $this->getSlot($sl);
|
||||||
$this->setSlot($sl, $item, true);
|
$this->setSlot($sl, $item, false);
|
||||||
}else{
|
}else{
|
||||||
$packet->slots[$i] = 255;
|
$packet->slots[$i] = 255;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -350,7 +350,7 @@ class PocketMinecraftServer{
|
||||||
$hnid = $this->handCnt++;
|
$hnid = $this->handCnt++;
|
||||||
$this->handlers[$hnid] = $callable;
|
$this->handlers[$hnid] = $callable;
|
||||||
$this->query("INSERT INTO handlers (ID, name, priority) VALUES (" . $hnid . ", '" . str_replace("'", "\\'", $event) . "', " . $priority . ");");
|
$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;
|
return $hnid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -596,7 +596,7 @@ class PocketMinecraftServer{
|
||||||
$this->preparedSQL->updateAction->bindValue(":time", $time, SQLITE3_FLOAT);
|
$this->preparedSQL->updateAction->bindValue(":time", $time, SQLITE3_FLOAT);
|
||||||
$this->preparedSQL->updateAction->bindValue(":id", $cid, SQLITE3_INTEGER);
|
$this->preparedSQL->updateAction->bindValue(":id", $cid, SQLITE3_INTEGER);
|
||||||
$this->preparedSQL->updateAction->execute();
|
$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;
|
$return = false;
|
||||||
}else{
|
}else{
|
||||||
++$actionCount;
|
++$actionCount;
|
||||||
|
|
|
||||||
|
|
@ -14,4 +14,3 @@ if exist bin\php\php.exe (
|
||||||
php -d enable_dl=On PocketMine-MP.php %*
|
php -d enable_dl=On PocketMine-MP.php %*
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue