From 57dbbe2f6c6ff9bf09ba9d8f3a49824c2ba15ff7 Mon Sep 17 00:00:00 2001 From: "Tim (robske_110)" Date: Tue, 31 Oct 2017 18:56:38 +0100 Subject: [PATCH] Fix not creating plugin data folder; Round position broadcast; add icon Bump version to 1.0.1 --- .poggit.yml | 1 + icon.png | Bin 0 -> 240 bytes plugin.yml | 2 +- src/Ad5001/Spooky/Main.php | 3 +++ src/Ad5001/Spooky/entity/Ghost.php | 2 +- 5 files changed, 6 insertions(+), 2 deletions(-) create mode 100755 icon.png 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 0000000000000000000000000000000000000000..ecef0250cbc9c8932e4c766c6beb474aa8d56188 GIT binary patch literal 240 zcmVLOkH#cKvB8U qC@_3zdvTR(k4GPy#_j48j`C(E&gRfAZYrbz0000getServer()->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"); }