mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Changes.
This commit is contained in:
parent
d5a6be70ac
commit
1e29cbbbeb
20 changed files with 98 additions and 96 deletions
|
|
@ -146,9 +146,9 @@ class BanAPI{
|
|||
case "op":
|
||||
$user = strtolower($params[0]);
|
||||
if($user == NULL){
|
||||
$output .= "Usage: /op <player>\n";
|
||||
break;
|
||||
}
|
||||
$output .= "Usage: /op <player>\n";
|
||||
break;
|
||||
}
|
||||
$player = $this->server->api->player->get($user);
|
||||
if(!($player instanceof Player)){
|
||||
$this->ops->set($user);
|
||||
|
|
|
|||
|
|
@ -120,9 +120,21 @@ class EntityAPI{
|
|||
if($item->getID() === AIR or $item->count <= 0){
|
||||
return;
|
||||
}
|
||||
$i = 0;
|
||||
do { // drop the block to the first supporting block
|
||||
$i++;
|
||||
$v = new Vector3($pos->x, $pos->y - $i, $pos->z);
|
||||
$b = $pos->level->getBlock($v);
|
||||
if($b->isSolid === true) break;
|
||||
if(($b instanceof LiquidBlock) or $b->getID() === COBWEB or $b->getID() === LADDER or $b->getID() === FENCE or $b->getID() === STONE_WALL)
|
||||
break;
|
||||
|
||||
}
|
||||
while ($i<200);
|
||||
if ($i==200) $i=0;
|
||||
$data = array(
|
||||
"x" => $pos->x + mt_rand(-10, 10) / 50,
|
||||
"y" => $pos->y + 0.19,
|
||||
"y" => $pos->y + 0.19 - $i + 1,
|
||||
"z" => $pos->z + mt_rand(-10, 10) / 50,
|
||||
"level" => $pos->level,
|
||||
//"speedX" => mt_rand(-3, 3) / 8,
|
||||
|
|
@ -130,6 +142,7 @@ class EntityAPI{
|
|||
//"speedZ" => mt_rand(-3, 3) / 8,
|
||||
"item" => $item,
|
||||
);
|
||||
|
||||
if($this->server->api->handle("item.drop", $data) !== false){
|
||||
for($count = $item->count; $count > 0; ){
|
||||
$item->count = min($item->getMaxStackSize(), $count);
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ class LevelAPI{
|
|||
|
||||
$timeu = microtime(true);
|
||||
foreach($blockUpdates->getAll() as $bupdate){
|
||||
$this->server->api->block->scheduleBlockUpdate(new Position((int) $bupdate["x"],(int) $bupdate["y"],(int) $bupdate["z"], $this->levels[$name]), (float) $bupdate["delay"], (int) $bupdate["type"]);
|
||||
$this->server->api->block->scheduleBlockUpdate(new Position((int) $bupdate["x"],(int) $bupdate["y"],(int) $bupdate["z"], $this->levels["name"]), (float) $bupdate["delay"], (int) $bupdate["type"]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,13 +28,6 @@ class PluginAPI extends stdClass{
|
|||
$this->randomNonce = Utils::getRandomBytes(16, false);
|
||||
}
|
||||
|
||||
public function __destruct(){
|
||||
foreach($this->plugins as $p){
|
||||
$p[0]->__destruct();
|
||||
}
|
||||
unset($plugins);
|
||||
}
|
||||
|
||||
public function getList(){
|
||||
$list = array();
|
||||
foreach($this->plugins as $p){
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ class ServerAPI{
|
|||
self::$serverRequest = $this->server;
|
||||
console("[INFO] This server is running PocketMine-MP version ".($version->isDev() ? FORMAT_YELLOW:"").MAJOR_VERSION.FORMAT_RESET." \"".CODENAME."\" (MCPE: ".CURRENT_MINECRAFT_VERSION.") (API ".CURRENT_API_VERSION.")", true, true, 0);
|
||||
console("[INFO] PocketMine-MP is distibuted under the LGPL License", true, true, 0);
|
||||
|
||||
|
||||
if(ADVANCED_CACHE == true){
|
||||
console("[INFO] Advanced cache enabled");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue