diff --git a/.poggit.yml b/.poggit.yml index 8ca4d3f..1104f05 100644 --- a/.poggit.yml +++ b/.poggit.yml @@ -4,4 +4,5 @@ branches: projects: Spooky: path: "" + icon: "icon.png" ... diff --git a/icon.png b/icon.png new file mode 100755 index 0000000..ecef025 Binary files /dev/null and b/icon.png differ diff --git a/plugin.yml b/plugin.yml index eca88ed..94159b8 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,7 +1,7 @@ --- name: Spooky author: Ad5001 -version: 1.0 +version: 1.0.1 api: [3.0.0-ALPHA9] main: Ad5001\Spooky\Main commands: [] diff --git a/src/Ad5001/Spooky/Main.php b/src/Ad5001/Spooky/Main.php index 44cdf8f..5503e6a 100644 --- a/src/Ad5001/Spooky/Main.php +++ b/src/Ad5001/Spooky/Main.php @@ -44,6 +44,9 @@ class Main extends PluginBase implements Listener{ $this->getServer()->getScheduler()->scheduleRepeatingTask(new TickTask($this), 2); $this->getServer()->getPluginManager()->registerEvents($this, $this); // Resource pack + if(!file_exists($this->getDataFolder())){ + mkdir($this->getDataFolder()); + } $downRP = false; if(!file_exists($this->getDataFolder() . "Spooky.mcpack")) { $downRP = true; diff --git a/src/Ad5001/Spooky/entity/Ghost.php b/src/Ad5001/Spooky/entity/Ghost.php index 08d2488..1005f8e 100644 --- a/src/Ad5001/Spooky/entity/Ghost.php +++ b/src/Ad5001/Spooky/entity/Ghost.php @@ -430,7 +430,7 @@ class Ghost extends Human { $pk->headYaw = $this->yaw; $pk->pitch = $this->pitch; $this->getPlayer()->dataPacket($pk); - $this->getPlayer()->sendPopup("He's " . ($this->x - $this->getPlayer()->x) . ", " . ($this->y - $this->getPlayer()->y) . ", " . ($this->z - $this->getPlayer()->z) . " blocks away"); + $this->getPlayer()->sendPopup("He's " . round($this->x - $this->getPlayer()->x, 1) . ", " . round($this->y - $this->getPlayer()->y, 1) . ", " . round($this->z - $this->getPlayer()->z, 1) . " blocks away"); }