From f276b9aedfffaa50ce45f02d7f507141900eb74a Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Sun, 29 Oct 2017 18:27:35 +0100 Subject: [PATCH] Almost finsihed! Just need to do testing + finishing the reward item. --- README.md | 7 ++- src/Ad5001/Spooky/Main.php | 60 +++++++++++++++++- src/Ad5001/Spooky/entity/Ghost.php | 92 +++++++++++++++++++++++----- src/Ad5001/Spooky/tasks/TickTask.php | 82 +++++++++++++++++++++++++ timing | 7 +-- 5 files changed, 226 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 482cdba..591c89b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ # Spooky Halloween plugin. - +A new bossfight's waiting for you and your players. The GHost is here. +Build a structure like this one: (be sure to place the pumpkin in last!) + + + +Afterwards let the boss fight go! Music used here: NIVIRO - The Return Track's link: https://soundcloud.com/djniviro/thereturn diff --git a/src/Ad5001/Spooky/Main.php b/src/Ad5001/Spooky/Main.php index b8c7cbe..183d621 100644 --- a/src/Ad5001/Spooky/Main.php +++ b/src/Ad5001/Spooky/Main.php @@ -5,7 +5,10 @@ use pocketmine\command\Command; use pocketmine\plugin\PluginBase; use pocketmine\Server; use pocketmine\Player; +use pocketmine\event\Listener; use pocketmine\item\enchantment\Enchantment; +use pocketmine\event\block\BlockPlaceEvent; +use pocketmine\block\Block; use pocketmine\nbt\tag\ListTag; use pocketmine\nbt\tag\CompoundTag; @@ -18,7 +21,7 @@ use Ad5001\Spooky\entity\Ghost; use Ad5001\Spooky\tasks\TickTask; -class Main extends PluginBase{ +class Main extends PluginBase implements Listener{ public $ghosts = []; @@ -29,8 +32,9 @@ class Main extends PluginBase{ */ public function onEnable(){ // Registering some enchants - Enchantement::registerEnchantment(new Enchantement(Enchantement::SHARPNESS, "%enchantment.attack.sharpness", Enchantement::RARITY_COMMON, Enchantement::SLOT_SWORD)); - // $this->getServer()->getScheduler()->schedulerTask(new Task1($this),