diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 38a825e1..0eec3d5b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -34,9 +34,9 @@ It is mainly [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accept
* Long arrays MAY be split across multiple lines, where each subsequent line is indented once.
* Files MUST use only the `` tag.
-* Code MUST NOT use namespaces. _(This restriction will be lifted on the Alpha_1.4 code)_
+* Code MUST NOT use namespaces. _(This restriction maybe will be lifted)_
* Strings SHOULD use the double quote `"` except when the single quote is required.
-* Arrays SHOULD be declared using `array()`, not the `[]` shortcut.
+* Arrays SHOULD be declared using `[]`, not the `array()` shortcut.
* Argument lists MAY NOT be split across multiple lines, except long arrays.
```php
@@ -52,14 +52,14 @@ class ExampleClass{
//do things
}elseif($firstArgument === "otherValue"){
$secondArgument = function(){
- return array(
+ return [
0 => "value1",
1 => "value2",
2 => "value3",
3 => "value4",
4 => "value5",
- 5 => "value6",
- );
+ 5 => "value6"
+ ];
}
}
}
diff --git a/README.md b/README.md
index f6933fa4..04479947 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,14 @@
-
+
# NostalgiaCore
NostalgiaCore is a fork of Legacy PocketMine-MP 1.3.12, which fixes bugs of Legacy PocketMine-MP, and adds new content
-Supported version: 0.8.1
+Supported MCPE versions: 0.8.0, 0.8.1 (maybe 0.8.2)
(Special thx to GullCraft Network and DartMiner43)
-# Why should you use NostalgiaCore to run a Minecraft Pocket Edition 0.8.1 server?
+
Why should you use NostalgiaCore to run a Minecraft Pocket Edition 0.8.1 server?
• Items are dropping normally.
@@ -16,35 +16,38 @@ Supported version: 0.8.1
• Player hotbar is saved.
-• Extra options (Only on NostalgiaCore!)
-
-• Server is starting faster (~0.7 sec).
+• Extra options (like in-game messages to discord)
• Vector2 is fixed.
-• Players can't join as "RCON" or "CONSOLE".
-
• Working Nether Reactor.
+• Mob AI
+
+• PHAR plugins support
+
...and etc.
-# Download Stable NostalgiaCore
+ Download Stable NostalgiaCore
https://github.com/kotyaralih/NostalgiaCore/releases/
+ PHP binaries download
-# How to use auto-restart?
+https://sourceforge.net/projects/pocketmine/files/builds/
+
+ How to use auto-restart?
Simply start your server using ./start.sh -l
-# Our discord server
+ Our discord server
https://discord.gg/uSHEWe6NC3
-## Want to contribute?
+ Want to contribute?
* Check the [Contributing Guidelines](CONTRIBUTING.md)
-## Third-party Libraries/Protocols Used
+ Third-party Libraries/Protocols Used
* __[PHP Sockets](http://php.net/manual/en/book.sockets.php)__
* __[PHP SQLite3](http://php.net/manual/en/book.sqlite3.php)__
* __[PHP BCMath](http://php.net/manual/en/book.bc.php)__
diff --git a/bin.7z b/bin.7z
deleted file mode 100644
index 3dce6c33..00000000
Binary files a/bin.7z and /dev/null differ
diff --git a/src/API/PluginAPI.php b/src/API/PluginAPI.php
index 7ac356a3..a5c935ab 100644
--- a/src/API/PluginAPI.php
+++ b/src/API/PluginAPI.php
@@ -134,6 +134,7 @@ class PluginAPI extends stdClass{
}
private function loadAll(){
+ $pharCnt = 0;
$dir = dir($this->pluginsPath());
while(false !== ($file = $dir->read())){
if($file[0] !== "."){
@@ -143,6 +144,7 @@ class PluginAPI extends stdClass{
$this->load($dir->path . $file);
}
if($ext2 === "phar"){
+ ++$pharCnt;
$pluginInfo = []; //TODO: A PluginInfo class?
$filePath = $this->pluginsPath().$file;
$p = new Phar($this->pluginsPath().$file, 0);
@@ -154,8 +156,7 @@ class PluginAPI extends stdClass{
break;
}
}
- console("[INFO] Loading {$pluginInfo["name"]} by {$pluginInfo["author"]}...");
- console("[WARNING] PHAR Plugin format is experemental and might cause bugs.");
+ console("[INFO] Loading PHAR plugin \"".FORMAT_GREEN.$pluginInfo["name"].FORMAT_RESET."\" ".FORMAT_AQUA.$pluginInfo["version"].FORMAT_RESET." by ".FORMAT_AQUA.$pluginInfo["author"].FORMAT_RESET);
$aver = CURRENT_API_VERSION;
if($pluginInfo["api"] != $aver){
@@ -182,6 +183,9 @@ class PluginAPI extends stdClass{
}
}
}
+ if($pharCnt > 0){
+ console("[WARNING] PHAR Plugin format is experemental and might cause bugs.");
+ }
}
public function load($file){
diff --git a/src/structure/Structure.php b/src/structure/Structure.php
index 99b25432..2be51bd2 100644
--- a/src/structure/Structure.php
+++ b/src/structure/Structure.php
@@ -30,23 +30,24 @@ abstract class Structure{
}
protected function placeBlock($level, $sym, &$tv){
- console("@@@");
+ //console("@@@");
if($level instanceof Level){
$idm = $this->getMappingFor($sym);
- var_dump($idm);
+ if(!isset($idm[1])) $idm[1] = 0;
+ //var_dump($idm);
if($idm === Structure::MAP_NO_KEY){
- console("Failed to receive id");
+ //console("Failed to receive id");
return false;
}
$block = $this->api->block->get($idm[0], $idm[1], $tv); //TODO: meta
- console($block);
+ //console($block);
$level->setBlock($tv, $block, true, false, true);
}
}
public function build($level, $centerX, $centerY, $centerZ){
- console("b");
+ //console("b");
$tempVector = new Vector3(0,0,0);
$x = $centerX - $this->radius;
$z = $centerZ - $this->radius;
@@ -54,7 +55,7 @@ abstract class Structure{
foreach($blocksXZ as $blocks){
foreach(str_split($blocks) as $block){
$tempVector->setXYZ($x, $centerY + $offsetY, $z);
- console("6#&_+7$:373-");
+ //console("6#&_+7$:373-");
$this->placeBlock($level, $block, $tempVector);
++$x;
}