Fix not creating plugin data folder; Round position broadcast; add icon

Bump version to 1.0.1
This commit is contained in:
Tim (robske_110) 2017-10-31 18:56:38 +01:00
vecāks dd4c3d95e8
revīzija 57dbbe2f6c
5 mainīti faili ar 6 papildinājumiem un 2 dzēšanām

Parādīt failu

@ -4,4 +4,5 @@ branches:
projects:
Spooky:
path: ""
icon: "icon.png"
...

Binārs
icon.png Executable file

Bināro failu nav iespējams attēlot.

Pēc

Platums:  |  Augstums:  |  Izmērs: 240 B

Parādīt failu

@ -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: []

Parādīt failu

@ -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;

Parādīt failu

@ -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");
}