From 80f4cb127f39cceb4e760140ccb70f957d0ba841 Mon Sep 17 00:00:00 2001 From: genboy Date: Sun, 17 Jun 2018 20:38:51 +0200 Subject: [PATCH 01/13] add tnt flag --- README.md | 7 ++-- resources/config.yml | 14 ++++++-- src/genboy/Festival/Main.php | 69 ++++++++++++++++++++++++++++++++++-- 3 files changed, 83 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f1acfaa..1b0493e 100644 --- a/README.md +++ b/README.md @@ -55,8 +55,9 @@ Create a festival with this custom area events plugin for Pocketmine Server ALPH - effects: player can not keep using effects in the area (v.1.0.5-12) - msg: do not display area enter/leave messages - passage: no passage for non-whitelisted players! (previously barrier flag) - - perms: player permissions are used to determine area command execution (experiment) - drop: players can not drop things + - tnt: entities can not exploded + - perms: player permissions are used to determine area command execution (experiment) **Events & Commands** @@ -155,13 +156,13 @@ and all [other iProtector devs](https://github.com/LDX-MCPE/iProtector/network). Festival v1.0.1-11 introduced a fast toggle for flags: - /fe + /fe Area flag defaults are set in the config.yml), server defaults and world specific default flag. The basic command to control area flags: - /fe flag(f) + /fe flag(f) Area flag listing diff --git a/resources/config.yml b/resources/config.yml index 452fba0..d826c2f 100644 --- a/resources/config.yml +++ b/resources/config.yml @@ -42,6 +42,9 @@ Default: # Keep players from dropping items in the area? Drop: false + # No explosions allowed in the area? + TNT: false + # Keep players from executing area event commands without specific perms Perms: false @@ -74,9 +77,13 @@ Worlds: # Prevent players from enter/leaving the area? (barrier) Passage: false - # Keep players from dropping items in the area? + # No explosions allowed in the area? Drop: false + # No explosions allowed in the area? + TNT: false + + # Keep players from executing area event commands without specific perms Perms: false @@ -108,6 +115,9 @@ Worlds: # Keep players from dropping items in the area? Drop: false - + + # No explosions allowed in the area? + TNT: false + # Keep players from executing area event commands without specific perms Perms: false diff --git a/src/genboy/Festival/Main.php b/src/genboy/Festival/Main.php index 203e797..69a0e28 100644 --- a/src/genboy/Festival/Main.php +++ b/src/genboy/Festival/Main.php @@ -11,6 +11,7 @@ use pocketmine\event\block\BlockPlaceEvent; use pocketmine\event\entity\EntityDamageEvent; use pocketmine\event\entity\EntityDamageByEntityEvent; +use pocketmine\event\entity\EntityExplodeEvent; use pocketmine\event\Listener; use pocketmine\level\Position; use pocketmine\math\Vector3; @@ -134,6 +135,11 @@ public function onEnable() : void{ $flags["flight"] = false; $newchange['Flight'] = "! Area Flight flag missing, now updated to 'false'; please see /resources/config.yml"; } + //new flags v 1.0.7 + if( !isset($datum["flags"]["tnt"]) ){ + $flags["tnt"] = false; + $newchange['TNT'] = "! Area TNT flag missing, now updated to 'false'; please see /resources/config.yml"; + } new Area($datum["name"], $datum["desc"], $flags, new Vector3($datum["pos1"]["0"], $datum["pos1"]["1"], $datum["pos1"]["2"]), new Vector3($datum["pos2"]["0"], $datum["pos2"]["1"], $datum["pos2"]["2"]), $datum["level"], $datum["whitelist"], $datum["commands"], $datum["events"], $this); } @@ -203,6 +209,13 @@ public function onEnable() : void{ if(!isset($c["Default"]["Flight"])) { $c["Default"]["Flight"] = false; } + // new in v1.0.7 + if(!isset($c["Default"]["TNT"])) { + $c["Default"]["TNT"] = false; + } + + + $this->god = $c["Default"]["God"]; $this->edit = $c["Default"]["Edit"]; @@ -215,10 +228,13 @@ public function onEnable() : void{ $this->drop = $c["Default"]["Drop"]; // new in v1.0.5-12 $this->effects = $c["Default"]["Effects"]; - $this->flagset = $c['Default']; + $this->flagset = $c['Default']; // new in v1.0.6-13 $this->pvp = $c["Default"]["PVP"]; $this->flight = $c["Default"]["Flight"]; + // new in v1.0.7 + $this->tnt = $c["Default"]["TNT"]; + // world default flag settings if(is_array( $c["Worlds"] )){ @@ -252,7 +268,10 @@ public function onEnable() : void{ if( !isset($flags["Flight"]) ){ $flags["Flight"] = $this->flight; } - + // new v1.0.7 + if( !isset($flags["TNT"]) ){ + $flags["TNT"] = $this->tnt; + } $this->levels[$level] = $flags; } } @@ -290,6 +309,7 @@ public function isFlag( $str ){ "edit","build","break","place", "touch","interact", "effects","magic","effect", + "tnt","explode", "drop", "msg","message", "passage","pass","barrier", @@ -323,6 +343,9 @@ public function isFlag( $str ){ if( $str == "pass" || $str == "barrier" ){ $flag = "passage"; } + if( $str == "tnt" || $str == "explode" ){ + $flag = "tnt"; + } if( $str == "effect" || $str == "effects" ){ $flag = "effects"; } @@ -591,6 +614,8 @@ public function onCommand(CommandSender $sender, Command $cmd, string $label, ar case "barrier": case "perm": case "perms": + case "tnt": + case "explode": case "drop": if($sender->hasPermission("festival") || $sender->hasPermission("festival.command") || $sender->hasPermission("festival.command.fe") || $sender->hasPermission("festival.command.fe.flag")){ if(isset($args[1])){ @@ -1157,6 +1182,46 @@ public function onBlockTouch(PlayerInteractEvent $event) : void{ } } + /** on Explode entity + * EntityExplodeEvent + * @param EntityExplodeEvent $event + * @return void + */ + public function onEntityExplode(EntityExplodeEvent $event){ + if (!$this->canExplode($event->getPosition(), $event->getEntity()->getLevel())) { + $event->setCancelled(); + } + } + + /** + * canExplode() + * Checks if entity can explode on given position + * @param pocketmine\level\Position $pos + * @param pocketmine\level\Level $level + * @return bool + */ + public function canExplode(Position $pos, Level $level): bool{ + $o = true; + $g = (isset($this->levels[$level->getName()]) ? $this->levels[$level->getName()]["TNT"] : $this->tnt); + if ($g) { + $o = false; + } + foreach ($this->areas as $area) { + if ($area->contains(new Vector3($pos->getX(), $pos->getY(), $pos->getZ()), $level->getName())) { + if ($area->getFlag("tnt")) { + $o = false; + break; + } + if ($area->getFlag("tnt") && $g) { + $o = true; + break; + } + } + } + return $o; + } + + /** Item drop * @param itemDropEvent $event * @ignoreCancelled true From 888ec27490b78d857fff1391f43159b27bc36557 Mon Sep 17 00:00:00 2001 From: genboy Date: Sun, 17 Jun 2018 21:22:56 +0200 Subject: [PATCH 02/13] tnt level fix --- src/genboy/Festival/Main.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/genboy/Festival/Main.php b/src/genboy/Festival/Main.php index 69a0e28..fb83379 100644 --- a/src/genboy/Festival/Main.php +++ b/src/genboy/Festival/Main.php @@ -1188,7 +1188,7 @@ public function onBlockTouch(PlayerInteractEvent $event) : void{ * @return void */ public function onEntityExplode(EntityExplodeEvent $event){ - if (!$this->canExplode($event->getPosition(), $event->getEntity()->getLevel())) { + if (!$this->canExplode( $event->getPosition() )) { $event->setCancelled(); } } @@ -1200,14 +1200,14 @@ public function onEntityExplode(EntityExplodeEvent $event){ * @param pocketmine\level\Level $level * @return bool */ - public function canExplode(Position $pos, Level $level): bool{ + public function canExplode( Position $pos ): bool{ $o = true; - $g = (isset($this->levels[$level->getName()]) ? $this->levels[$level->getName()]["TNT"] : $this->tnt); + $g = (isset($this->levels[$pos->getLevel()->getName()]) ? $this->levels[$pos->getLevel()->getName()]["TNT"] : $this->tnt); if ($g) { $o = false; } foreach ($this->areas as $area) { - if ($area->contains(new Vector3($pos->getX(), $pos->getY(), $pos->getZ()), $level->getName())) { + if ($area->contains(new Vector3($pos->getX(), $pos->getY(), $pos->getZ()), $pos->getLevel()->getName() )) { if ($area->getFlag("tnt")) { $o = false; break; From d1830c003c0044d7b22cac97341ffe64279e9ac4 Mon Sep 17 00:00:00 2001 From: genboy Date: Tue, 19 Jun 2018 23:51:52 +0200 Subject: [PATCH 03/13] New hunger flag --- README.md | 24 ++++++----- resources/config.yml | 8 ++++ src/genboy/Festival/Main.php | 79 ++++++++++++++++++++++++++++++++---- 3 files changed, 92 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 1b0493e..12dd47e 100644 --- a/README.md +++ b/README.md @@ -40,23 +40,24 @@ Create a festival with this custom area events plugin for Pocketmine Server ALPH - add area description - whitelist players for the area - tp to an area - - show area’s info at current position + - show area’s info at current position **Flags** - Set area flags true means - - edit: area is save from building/breaking + - edit: the area is save from building/breaking - god: players in the area are save in god mode - pvp: players in the area are save from PVP - flight: players in the area are not allowed to fly - touch: area is save from player interaction with chests/signs etc. - - effects: player can not keep using effects in the area (v.1.0.5-12) + - effects: player can not keep using effects in the area - msg: do not display area enter/leave messages - passage: no passage for non-whitelisted players! (previously barrier flag) - drop: players can not drop things - tnt: entities can not exploded + - hunger: player can not exhaust / hunger - perms: player permissions are used to determine area command execution (experiment) @@ -75,7 +76,7 @@ Create a festival with this custom area events plugin for Pocketmine Server ALPH - World: Default & world specific flags in config.yml - Flight: if server allows flight, and level flight-flag is true, an area in that level has still flight enabled untill flight flag is set true - - Perms: Area event commands are executed by default with op-permissions by players from the area. In v1.0.4-11 an experimental perms flag is added, perms flag true: area uses the player permissions + - Perms: Area event commands are executed by default with op-permissions by players or, if perms flag true: area uses the player permissions ###### Created by [Genboy](https://genboy.net) 2018 @@ -108,7 +109,7 @@ and all [other iProtector devs](https://github.com/LDX-MCPE/iProtector/network). **Since v1.0.3-11+** - - pass(passage) flag replaces the barrier flag + - pass(passage) flag gives the area a barrier for non ops/whitelisted - configuration for area messages (taken out of chat) - Msgtype: tip or pop (prefer depend on other plugin message display) - Msgdisplay: @@ -131,6 +132,9 @@ and all [other iProtector devs](https://github.com/LDX-MCPE/iProtector/network). - /fe list LEVELNAME - Area list of all area's in all levels, or for specified level - configuration should be updated [resources/config.yml](https://github.com/genboy/Festival/blob/master/resources/config.yml) + **in progress v1.0.7** + - new TNT flag + - new Hunger flag #### Create area First command '/fe pos1' and tab a block for position 1, @@ -156,13 +160,13 @@ and all [other iProtector devs](https://github.com/LDX-MCPE/iProtector/network). Festival v1.0.1-11 introduced a fast toggle for flags: - /fe + /fe Area flag defaults are set in the config.yml), server defaults and world specific default flag. The basic command to control area flags: - /fe flag(f) + /fe flag(f) Area flag listing @@ -267,7 +271,7 @@ Thank you - Messages persist display to ops (off/op/on) - Auto whitelist area creator (on/off) - [x] Effects flag: remove players effects in area - - [x] Perms flag: player perms used for area commands (vs OP pems) [experimental] + - [x] Perms flag: player perms used for area commands (vs OP pems) - [x] Drop flag: player can not drop things - [x] PVP flag: players can not PvP (warn message) - [x] Flight flag: players can not fly (incl. no fall damage & allowed messages) @@ -281,7 +285,5 @@ Thank you The area code derives from the [iProctector plugin](https://github.com/LDX-MCPE/iProtector). All credits for the area creation and protection code go to the iProtector creator [LDX-MCPE](https://github.com/LDX-MCPE) and [other iProtector devs](https://github.com/LDX-MCPE/iProtector/network). -In a first fork from [poggit-orphanage](https://github.com/poggit-orphanage/iProtector) the new code was extending the area with enter and leave messages and adding options to attach separate event-objects to an area and trigger specific events with commands. These test versions kept the core iProtector areas unchanged (to be able to use excisting area's). - -These first adjustments worked well being a test plugin but keeping iProtector area's while adding separate event data made me create a split command structure (wich isn't logical or handy) and separate event objects are only needed if the original area class should stay the same. So, for a better plugin command structure and performance the iProtector Area code was used to create the setup for what now has become the Festival Plugin. +The Festival code is written and tested by Genboy and first released on 12 Feb 2018, first extendomg the area object with area events (enter and leave messages) and soon added functions and ingame commands to attach a commandstring to a area-event. Since v1.0.7 the area's and players can be protected with 12 flags, and trigger commands on areaEnter, areaCenter and areaLeave. diff --git a/resources/config.yml b/resources/config.yml index d826c2f..31085a7 100644 --- a/resources/config.yml +++ b/resources/config.yml @@ -45,6 +45,9 @@ Default: # No explosions allowed in the area? TNT: false + # Keep players from hunger(exhaust) in the area? + Hunger: false + # Keep players from executing area event commands without specific perms Perms: false @@ -83,6 +86,8 @@ Worlds: # No explosions allowed in the area? TNT: false + # Keep players from hunger(exhaust) in the area? + Hunger: false # Keep players from executing area event commands without specific perms Perms: false @@ -119,5 +124,8 @@ Worlds: # No explosions allowed in the area? TNT: false + # Keep players from hunger(exhaust) in the area? + Hunger: false + # Keep players from executing area event commands without specific perms Perms: false diff --git a/src/genboy/Festival/Main.php b/src/genboy/Festival/Main.php index fb83379..708a101 100644 --- a/src/genboy/Festival/Main.php +++ b/src/genboy/Festival/Main.php @@ -22,6 +22,7 @@ use pocketmine\event\player\PlayerMoveEvent; use pocketmine\event\player\PlayerInteractEvent; use pocketmine\event\player\PlayerCommandPreprocessEvent; +use pocketmine\event\player\PlayerExhaustEvent; use pocketmine\event\player\PlayerDropItemEvent; use pocketmine\event\player\PlayerQuitEvent; @@ -53,9 +54,13 @@ class Main extends PluginBase implements Listener{ /** @var bool */ private $passage = false; /** @var bool */ - private $perms = false; - /** @var bool */ private $drop = false; + /** @var bool */ + private $tnt = false; + /** @var bool */ + private $hunger = false; + /** @var bool */ + private $perms = false; /** @var bool[] */ private $selectingFirst = []; @@ -140,6 +145,10 @@ public function onEnable() : void{ $flags["tnt"] = false; $newchange['TNT'] = "! Area TNT flag missing, now updated to 'false'; please see /resources/config.yml"; } + if( !isset($datum["flags"]["hunger"]) ){ + $flags["hunger"] = false; + $newchange['Hunger'] = "! Area Hunger flag missing, now updated to 'false'; please see /resources/config.yml"; + } new Area($datum["name"], $datum["desc"], $flags, new Vector3($datum["pos1"]["0"], $datum["pos1"]["1"], $datum["pos1"]["2"]), new Vector3($datum["pos2"]["0"], $datum["pos2"]["1"], $datum["pos2"]["2"]), $datum["level"], $datum["whitelist"], $datum["commands"], $datum["events"], $this); } @@ -213,7 +222,9 @@ public function onEnable() : void{ if(!isset($c["Default"]["TNT"])) { $c["Default"]["TNT"] = false; } - + if(!isset($c["Default"]["Hunger"])) { + $c["Default"]["Hunger"] = false; + } @@ -234,6 +245,7 @@ public function onEnable() : void{ $this->flight = $c["Default"]["Flight"]; // new in v1.0.7 $this->tnt = $c["Default"]["TNT"]; + $this->tnt = $c["Default"]["Hunger"]; // world default flag settings @@ -272,6 +284,9 @@ public function onEnable() : void{ if( !isset($flags["TNT"]) ){ $flags["TNT"] = $this->tnt; } + if( !isset($flags["Hunger"]) ){ + $flags["Hunger"] = $this->hunger; + } $this->levels[$level] = $flags; } } @@ -279,16 +294,17 @@ public function onEnable() : void{ // all save :) $this->saveAreas(); - // console output - $this->codeSigned(); + /** console output */ + // codesign + $this->codeSigned(); + // plugin area info $ca = 0; foreach( $this->areas as $a ){ $ca = $ca + count( $a->getCommands() ); } $this->getLogger()->info( " ". $ca ." commands in " . count($this->areas) . " areas" ); - - //v1.0.6-13-dev + // warnings changes if( count($newchange) > 0 ){ foreach($newchange as $ttl => $txt){ $this->getLogger()->info( $ttl . ": " . $txt ); @@ -310,6 +326,7 @@ public function isFlag( $str ){ "touch","interact", "effects","magic","effect", "tnt","explode", + "hunger","starve", "drop", "msg","message", "passage","pass","barrier", @@ -349,6 +366,9 @@ public function isFlag( $str ){ if( $str == "effect" || $str == "effects" ){ $flag = "effects"; } + if( $str == "hunger" || $str == "starve" ){ + $flag = "hunger"; + } } return $flag; } @@ -614,6 +634,8 @@ public function onCommand(CommandSender $sender, Command $cmd, string $label, ar case "barrier": case "perm": case "perms": + case "hunger": + case "starve": case "tnt": case "explode": case "drop": @@ -1182,6 +1204,48 @@ public function onBlockTouch(PlayerInteractEvent $event) : void{ } } + /** hunger + * PlayerExhaustEvent + * @param PlayerExhaustEvent $event + * @return void + */ + + public function Hunger(PlayerExhaustEvent $event){ + if ( !$this->canHunger( $event->getPlayer()->getPosition() ) ) { + $event->setCancelled(); + } + } + + /** + * canhunger() + * Checks if player can exhaust (hunger) + * @param pocketmine\level\Position $pos + * @param pocketmine\level\Level $level + * @return bool + */ + public function canHunger( Position $pos ): bool{ + $o = true; + $g = (isset($this->levels[$pos->getLevel()->getName()]) ? $this->levels[$pos->getLevel()->getName()]["Hunger"] : $this->hunger); + if ($g) { + $o = false; + } + foreach ($this->areas as $area) { + if ($area->contains(new Vector3($pos->getX(), $pos->getY(), $pos->getZ()), $pos->getLevel()->getName() )) { + if ($area->getFlag("hunger")) { + $o = false; + break; + } + if ($area->getFlag("hunger") && $g) { + $o = true; + break; + } + } + } + return $o; + } + + + /** on Explode entity * EntityExplodeEvent * @param EntityExplodeEvent $event @@ -1221,7 +1285,6 @@ public function canExplode( Position $pos ): bool{ return $o; } - /** Item drop * @param itemDropEvent $event * @ignoreCancelled true From da176b5e3c74e1c3467287fa459aebb3a01c5ee1 Mon Sep 17 00:00:00 2001 From: genboy Date: Sun, 8 Jul 2018 02:11:28 +0200 Subject: [PATCH 04/13] API 3.0.0 - 4.0.0 --- plugin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.yml b/plugin.yml index fd96597..ace915e 100644 --- a/plugin.yml +++ b/plugin.yml @@ -3,7 +3,7 @@ author: Genboy version: 1.0.6-13 main: genboy\Festival\Main load: POSTWORLD -api: [3.0.0-ALPHA10,3.0.0-ALPHA11,3.0.0-ALPHA12] +api: [3.0.0,4.0.0] website: "https://github.com/genboy/Festival" commands: fe: From 499f8639cdce2a478adecb9a9148d1d880fd02f0 Mon Sep 17 00:00:00 2001 From: genboy Date: Sun, 8 Jul 2018 02:49:59 +0200 Subject: [PATCH 05/13] Future bump 5.0.0 --- plugin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.yml b/plugin.yml index ace915e..d0109e2 100644 --- a/plugin.yml +++ b/plugin.yml @@ -3,7 +3,7 @@ author: Genboy version: 1.0.6-13 main: genboy\Festival\Main load: POSTWORLD -api: [3.0.0,4.0.0] +api: [3.0.0,4.0.0,5.0.0] website: "https://github.com/genboy/Festival" commands: fe: From 65934a73a0a7d7168196fb28837f0e9481c5f0f5 Mon Sep 17 00:00:00 2001 From: genboy Date: Sun, 22 Jul 2018 00:32:07 +0200 Subject: [PATCH 06/13] event player onDamage false extinguish fire --- plugin.yml | 4 ++-- src/genboy/Festival/Main.php | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugin.yml b/plugin.yml index d0109e2..f7c5234 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,6 +1,6 @@ name: Festival author: Genboy -version: 1.0.6-13 +version: 1.0.7-dev main: genboy\Festival\Main load: POSTWORLD api: [3.0.0,4.0.0,5.0.0] @@ -8,7 +8,7 @@ website: "https://github.com/genboy/Festival" commands: fe: description: "Allows you to manage Festival area's and events." - usage: "See info: /fe ; Create area: select 2 positions /fe , then /fe create ; Toggle flags: /fe ; Set commands: /fe command ; (Edit)del command: /fe command <(edit)/del> (); Change command event: /fe command event " + usage: "See info: /fe ; Create area: select 2 positions /fe , then /fe create ; Toggle flags: /fe ; Set commands: /fe command ; (Edit)del command: /fe command <(edit)/del> (); Change event for command: /fe command event " permission: festival.command.fe permissions: festival: diff --git a/src/genboy/Festival/Main.php b/src/genboy/Festival/Main.php index 708a101..055c75d 100644 --- a/src/genboy/Festival/Main.php +++ b/src/genboy/Festival/Main.php @@ -1095,6 +1095,9 @@ public function canDamage(EntityDamageEvent $ev) : bool{ $player = $ev->getEntity(); $playerName = strtolower($player->getName()); if(!$this->canGetHurt($player)){ + if( $player->isOnFire() ){ + $player->extinguish(); // 1.0.7-dev + } $ev->setCancelled(); return false; } @@ -1245,7 +1248,6 @@ public function canHunger( Position $pos ): bool{ } - /** on Explode entity * EntityExplodeEvent * @param EntityExplodeEvent $event From f05a111d8f20a3337aec01e908426c4fa6aac496 Mon Sep 17 00:00:00 2001 From: genboy Date: Sat, 4 Aug 2018 21:00:27 +0200 Subject: [PATCH 07/13] Version Release prep --- README.md | 64 ++++++++++++++++++++++++++++++++++++++++++------------ plugin.yml | 4 ++-- 2 files changed, 52 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 12dd47e..cf39e0b 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ ## Festival -If you like Festival please leave a thumb up at [poggit](https://poggit.pmmp.io/p/Festival/1.0.6-13) to help getting the Festival plugin approved, thank you!_ +If you like Festival please leave a thumb up at [poggit](https://poggit.pmmp.io/ci/genboy/Festival/Festival) to help getting the Festival plugin approved, thank you!_ ![Festival plugin logo large](https://genboy.net/wp-content/uploads/2018/02/festival_plugin_logo.png) -Create a festival with this custom area events plugin for Pocketmine Server ALPHA10+: +Create a festival with this custom area events plugin for Pocketmine Server: ### Manage area's and run commmands attachted to area events. -![Festival creation & usage](https://genboy.net/wp-content/uploads/2018/06/festival_usage_1.0.6-13x.png) +![Festival creation & usage](https://genboy.net/wp-content/uploads/2018/08/festival_usage_1.0.7.png) ###### Copyright [Genboy](https://genboy.net) 2018 @@ -21,7 +21,7 @@ Create a festival with this custom area events plugin for Pocketmine Server ALPH # Festival -[![](https://poggit.pmmp.io/shield.state/Festival)](https://poggit.pmmp.io/p/Festival) +[![](https://poggit.pmmp.io/shield.state/Festival)](https://poggit.pmmp.io/p/Festival) [![](https://poggit.pmmp.io/shield.api/Festival)](https://poggit.pmmp.io/p/Festival) [![](https://poggit.pmmp.io/shield.dl.total/Festival)](https://poggit.pmmp.io/p/Festival) [![](https://poggit.pmmp.io/shield.dl/Festival)](https://poggit.pmmp.io/p/Festival) @@ -56,8 +56,8 @@ Create a festival with this custom area events plugin for Pocketmine Server ALPH - msg: do not display area enter/leave messages - passage: no passage for non-whitelisted players! (previously barrier flag) - drop: players can not drop things - - tnt: entities can not exploded - - hunger: player can not exhaust / hunger + - tnt: explosions protected area + - hunger: player does not exhaust / hunger - perms: player permissions are used to determine area command execution (experiment) @@ -102,7 +102,7 @@ and all [other iProtector devs](https://github.com/LDX-MCPE/iProtector/network). ### Updates - + Updates available at [poggit](https://poggit.pmmp.io/ci/genboy/Festival/Festival) and [github](https://github.com/genboy/Festival/releases) ##### !Before update always copy your config.yml and areas.json files to a save place, with this you can revert your Festival installation - after .phar install and first restart/reload plugins; check console info and your areas.json and config.yml; restart after adjusted correctly @@ -132,13 +132,28 @@ and all [other iProtector devs](https://github.com/LDX-MCPE/iProtector/network). - /fe list LEVELNAME - Area list of all area's in all levels, or for specified level - configuration should be updated [resources/config.yml](https://github.com/genboy/Festival/blob/master/resources/config.yml) - **in progress v1.0.7** + **New in v1.0.7** - new TNT flag - new Hunger flag - + - Fire is now extinguished when player does not get damage (aka. in area with god flag on) + + + + #### Usage Graphic + + ##### A visualisation of Festival command usage + + ![Festival creation & usage](https://genboy.net/wp-content/uploads/2018/08/festival_usage_1.0.7.png) + + ###### Copyright [Genboy](https://genboy.net) 2018 + + + #### Create area First command '/fe pos1' and tab a block for position 1, - then command '/fe pos2' and ab a block to set position2, + + then command '/fe pos2' and tab a block to set position2, + these are the endpoints of the area longest diagonal. /fe pos1 @@ -175,6 +190,8 @@ and all [other iProtector devs](https://github.com/LDX-MCPE/iProtector/network). #### Position info + See area information at position + /fe here #### List all area's @@ -184,7 +201,10 @@ and all [other iProtector devs](https://github.com/LDX-MCPE/iProtector/network). #### Teleport to area /fe tp - + + + + #### Set description /fe desc @@ -196,16 +216,32 @@ and all [other iProtector devs](https://github.com/LDX-MCPE/iProtector/network). #### Delete an area /fe delete(del,remove) + + + + #### Area event commands - /fe command - + **This is the fun part of Festival: assign commands to area events** + + When an area is created 3 events are available; + - enter; when a player enters the area + - center; when a player reaches the center (3x3xareaHeight blocks) + - leave; when a player leaves the area + + To add a command you need at least; - an areaname, - an unique id for the command - - make sure the command works! (when you are op). + - make sure the command works! (when you are op) + + + /fe command + + + #### Add a command: /fe command add diff --git a/plugin.yml b/plugin.yml index f7c5234..2ed44e7 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,9 +1,9 @@ name: Festival author: Genboy -version: 1.0.7-dev +version: 1.0.7 main: genboy\Festival\Main load: POSTWORLD -api: [3.0.0,4.0.0,5.0.0] +api: [3.0.0-ALPHA10,3.0.0-ALPHA11,3.0.0-ALPHA12,3.0.0] website: "https://github.com/genboy/Festival" commands: fe: From a2028fee2ab2d9cdc73ca7273e8acf26cc5c0463 Mon Sep 17 00:00:00 2001 From: genboy Date: Sat, 4 Aug 2018 21:06:50 +0200 Subject: [PATCH 08/13] new usage image --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cf39e0b..6825c71 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Create a festival with this custom area events plugin for Pocketmine Server: ### Manage area's and run commmands attachted to area events. -![Festival creation & usage](https://genboy.net/wp-content/uploads/2018/08/festival_usage_1.0.7.png) +![Festival creation & usage](https://genboy.net/wp-content/uploads/2018/08/festival_usage_1.0.7-1.png) ###### Copyright [Genboy](https://genboy.net) 2018 @@ -143,7 +143,7 @@ and all [other iProtector devs](https://github.com/LDX-MCPE/iProtector/network). ##### A visualisation of Festival command usage - ![Festival creation & usage](https://genboy.net/wp-content/uploads/2018/08/festival_usage_1.0.7.png) + ![Festival creation & usage](https://genboy.net/wp-content/uploads/2018/08/festival_usage_1.0.7-1.png) ###### Copyright [Genboy](https://genboy.net) 2018 From a8dd724a827cbc07dce52125dc576bdcbcdc217f Mon Sep 17 00:00:00 2001 From: genboy Date: Sat, 4 Aug 2018 21:07:04 +0200 Subject: [PATCH 09/13] .. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6825c71..2474f2a 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ and all [other iProtector devs](https://github.com/LDX-MCPE/iProtector/network). Now the area is ready to use You might want to set or edit the area description line - + /fe desc From 5a9aff7a6e859d1941ec986a63f7b78409479cb9 Mon Sep 17 00:00:00 2001 From: genboy Date: Sat, 4 Aug 2018 21:41:30 +0200 Subject: [PATCH 10/13] Including latest api --- plugin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.yml b/plugin.yml index 2ed44e7..6f207ab 100644 --- a/plugin.yml +++ b/plugin.yml @@ -3,7 +3,7 @@ author: Genboy version: 1.0.7 main: genboy\Festival\Main load: POSTWORLD -api: [3.0.0-ALPHA10,3.0.0-ALPHA11,3.0.0-ALPHA12,3.0.0] +api: [3.0.0-ALPHA10,3.0.0-ALPHA11,3.0.0-ALPHA12,3.0.0,4.0.0] website: "https://github.com/genboy/Festival" commands: fe: From 95f124c2dbf25bdc8732199c54d908769583ce67 Mon Sep 17 00:00:00 2001 From: genboy Date: Sat, 4 Aug 2018 22:06:27 +0200 Subject: [PATCH 11/13] prep poggit reference --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2474f2a..c825133 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Festival -If you like Festival please leave a thumb up at [poggit](https://poggit.pmmp.io/ci/genboy/Festival/Festival) to help getting the Festival plugin approved, thank you!_ +If you like Festival please leave a thumb up at [poggit](https://poggit.pmmp.io/p/Festival/1.0.7) to help getting the Festival plugin approved, thank you!_ ![Festival plugin logo large](https://genboy.net/wp-content/uploads/2018/02/festival_plugin_logo.png) @@ -9,7 +9,7 @@ Create a festival with this custom area events plugin for Pocketmine Server: ### Manage area's and run commmands attachted to area events. - + ![Festival creation & usage](https://genboy.net/wp-content/uploads/2018/08/festival_usage_1.0.7-1.png) From 39fe731c7137c58467edc23771dceed77cdd7fd9 Mon Sep 17 00:00:00 2001 From: genboy Date: Sat, 4 Aug 2018 22:09:19 +0200 Subject: [PATCH 12/13] *_= --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c825133..aff0bb2 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,13 @@ If you like Festival please leave a thumb up at [poggit](https://poggit.pmmp.io/p/Festival/1.0.7) to help getting the Festival plugin approved, thank you!_ -![Festival plugin logo large](https://genboy.net/wp-content/uploads/2018/02/festival_plugin_logo.png) + +![Festival plugin logo large](https://genboy.net/wp-content/uploads/2018/02/festival_plugin_logo.png) Create a festival with this custom area events plugin for Pocketmine Server: -### Manage area's and run commmands attachted to area events. +### Manage area's and run commmands attachted to area events. ![Festival creation & usage](https://genboy.net/wp-content/uploads/2018/08/festival_usage_1.0.7-1.png) @@ -15,7 +16,7 @@ Create a festival with this custom area events plugin for Pocketmine Server: ###### Copyright [Genboy](https://genboy.net) 2018 ---- +--- ## Info From 1b124d55c709596783d31514792215815346731d Mon Sep 17 00:00:00 2001 From: genboy Date: Sat, 4 Aug 2018 22:13:46 +0200 Subject: [PATCH 13/13] O_* --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index aff0bb2..a7c0236 100644 --- a/README.md +++ b/README.md @@ -301,7 +301,7 @@ Thank you - [x] Passage flag; turning the area into a barrier, no one in, no one out. - [x] /fe tp now sends player to the area top-center and prevents fall damage -### Milestones v1.0.3-11 - v1.0.6-13 +### Milestones v1.0.3-11 - v1.0.7 - [x] Config options: - Messages out of chat (tip/pop) @@ -313,6 +313,9 @@ Thank you - [x] PVP flag: players can not PvP (warn message) - [x] Flight flag: players can not fly (incl. no fall damage & allowed messages) - [x] Area Commands: playerName can be used as **{player}** or **@p** in area event commands + - [x] TNT flag: explosion free area's + - [x] Hunger flag: players do not exhaust + - [x] Fire (animation) extinguished when player is save ------