Browse Source

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

Bump version to 1.0.1
pull/3/head
Tim (robske_110) 2 years ago
parent
commit
57dbbe2f6c
5 changed files with 6 additions and 2 deletions
  1. 1
    0
      .poggit.yml
  2. BIN
      icon.png
  3. 1
    1
      plugin.yml
  4. 3
    0
      src/Ad5001/Spooky/Main.php
  5. 1
    1
      src/Ad5001/Spooky/entity/Ghost.php

+ 1
- 0
.poggit.yml View File

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

BIN
icon.png View File


+ 1
- 1
plugin.yml View File

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

+ 3
- 0
src/Ad5001/Spooky/Main.php View File

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

+ 1
- 1
src/Ad5001/Spooky/entity/Ghost.php View File

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



Loading…
Cancel
Save