mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Correct line offset in Plugins
This commit is contained in:
parent
033a1673f0
commit
6f8963bdcd
2 changed files with 4 additions and 2 deletions
|
|
@ -56,7 +56,7 @@ class PluginAPI extends stdClass{
|
|||
}else{
|
||||
$content = file_get_contents($file);
|
||||
$info = strstr($content, "*/", true);
|
||||
$content = substr(strstr($content, "*/"),2);
|
||||
$content = str_repeat(PHP_EOL, substr_count($info, "\n")).substr(strstr($content, "*/"),2);
|
||||
if(preg_match_all('#([a-zA-Z0-9\-_]*)=([^\r\n]*)#u', $info, $matches) == 0){ //false or 0 matches
|
||||
console("[ERROR] Failed parsing of ".basename($file));
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -828,12 +828,14 @@ class Player{
|
|||
$arr = array();
|
||||
for($i = $this->counter[1]; $i < $data[0]; ++$i){
|
||||
$arr[] = $i;
|
||||
++$this->packetStats[1];
|
||||
}
|
||||
$this->send(0xa0, array($arr));
|
||||
$this->counter[1] = $data[0];
|
||||
}elseif($diff === 1){
|
||||
$this->counter[1] = $data[0];
|
||||
$this->counter[1] = $data[0];
|
||||
}
|
||||
++$this->packetStats[0];
|
||||
$this->send(0xc0, array(array($data[0])));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue