Merge pull request #3 from robske110/master
Fix not creating plugin data folder; Round position broadcast; add icon
This commit is contained in:
commit
0203f6e9a0
5 changed files with 6 additions and 2 deletions
|
@ -4,4 +4,5 @@ branches:
|
||||||
projects:
|
projects:
|
||||||
Spooky:
|
Spooky:
|
||||||
path: ""
|
path: ""
|
||||||
|
icon: "icon.png"
|
||||||
...
|
...
|
||||||
|
|
BIN
icon.png
Executable file
BIN
icon.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 240 B |
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
name: Spooky
|
name: Spooky
|
||||||
author: Ad5001
|
author: Ad5001
|
||||||
version: 1.0
|
version: 1.0.1
|
||||||
api: [3.0.0-ALPHA9]
|
api: [3.0.0-ALPHA9]
|
||||||
main: Ad5001\Spooky\Main
|
main: Ad5001\Spooky\Main
|
||||||
commands: []
|
commands: []
|
||||||
|
|
|
@ -44,6 +44,9 @@ class Main extends PluginBase implements Listener{
|
||||||
$this->getServer()->getScheduler()->scheduleRepeatingTask(new TickTask($this), 2);
|
$this->getServer()->getScheduler()->scheduleRepeatingTask(new TickTask($this), 2);
|
||||||
$this->getServer()->getPluginManager()->registerEvents($this, $this);
|
$this->getServer()->getPluginManager()->registerEvents($this, $this);
|
||||||
// Resource pack
|
// Resource pack
|
||||||
|
if(!file_exists($this->getDataFolder())){
|
||||||
|
mkdir($this->getDataFolder());
|
||||||
|
}
|
||||||
$downRP = false;
|
$downRP = false;
|
||||||
if(!file_exists($this->getDataFolder() . "Spooky.mcpack")) {
|
if(!file_exists($this->getDataFolder() . "Spooky.mcpack")) {
|
||||||
$downRP = true;
|
$downRP = true;
|
||||||
|
|
|
@ -430,7 +430,7 @@ class Ghost extends Human {
|
||||||
$pk->headYaw = $this->yaw;
|
$pk->headYaw = $this->yaw;
|
||||||
$pk->pitch = $this->pitch;
|
$pk->pitch = $this->pitch;
|
||||||
$this->getPlayer()->dataPacket($pk);
|
$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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue