mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
names were fixed, ->loop->stop();
This commit is contained in:
parent
50006a0189
commit
f6897cf862
242 changed files with 111 additions and 166 deletions
|
|
@ -573,11 +573,7 @@ class BlockAPI{
|
|||
|
||||
public function nextRandomUpdate(Position $pos){
|
||||
if(!isset($this->scheduledUpdates[$pos->x . "." . $pos->y . "." . $pos->z . "." . $pos->level->getName() . "." . BLOCK_UPDATE_RANDOM])){
|
||||
$X = (($pos->x >> 4) << 4);
|
||||
$Y = (($pos->y >> 4) << 4);
|
||||
$Z = (($pos->z >> 4) << 4);
|
||||
$time = microtime(true);
|
||||
$i = 0;
|
||||
$offset = 0;
|
||||
while(true){
|
||||
$t = $offset + Utils::getRandomUpdateTicks() * 0.05;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ class ConsoleAPI{
|
|||
$this->loop->notify();
|
||||
//@fclose($this->loop->fp);
|
||||
usleep(50000);
|
||||
$this->loop->kill();
|
||||
//$this->loop->join();
|
||||
}
|
||||
}
|
||||
|
|
@ -294,7 +293,6 @@ class ConsoleLoop extends Thread{
|
|||
public $base;
|
||||
public $ev;
|
||||
public $fp;
|
||||
|
||||
public function __construct(){
|
||||
$this->line = false;
|
||||
$this->stop = false;
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class EntityAPI{
|
|||
}
|
||||
$mobName = ucfirst(array_flip($mob)[$type]);
|
||||
|
||||
if((strtolower($args[1] === "baby") or strtolower($args[2] === "baby")) and !Utils::in_range($type, 10, 13)){
|
||||
if((isset($args[1]) || isset($args[2])) && (strtolower($args[1] === "baby") or strtolower($args[2] === "baby")) and !Utils::in_range($type, 10, 13)){
|
||||
$output .= "$mobName cannot be a baby!";
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,5 @@
|
|||
<?php
|
||||
|
||||
interface OtherPluginRequirement{
|
||||
|
||||
public function getRequiredPlugins();
|
||||
}
|
||||
|
||||
interface Plugin{
|
||||
|
||||
public function __construct(ServerAPI $api, $server = false);
|
||||
|
||||
public function init();
|
||||
|
||||
//public function __destruct(); useless
|
||||
}
|
||||
|
||||
class PluginAPI extends stdClass{
|
||||
|
||||
private $server;
|
||||
|
|
@ -323,14 +309,4 @@ class RequiredPluginEntry{ //Use this as object of requirements array
|
|||
}
|
||||
}
|
||||
|
||||
class DummyPlugin implements Plugin{
|
||||
|
||||
public function __construct(ServerAPI $api, $server = false){
|
||||
}
|
||||
|
||||
public function init(){
|
||||
}
|
||||
|
||||
public function __destruct(){
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue