├── icon.png ├── .gitignore ├── .editorconfig ├── .poggit.yml ├── src ├── genboy │ └── Festival │ │ ├── lang │ │ └── Language.php │ │ ├── Level.php │ │ ├── Area.php │ │ └── Helper.php ├── xenialdan │ └── customui │ │ ├── Form.php │ │ ├── ModalForm.php │ │ ├── SimpleForm.php │ │ └── CustomForm.php └── neitanod │ └── ForceUTF8 │ └── Encoding.php ├── COPYRIGHT ├── plugin.yml ├── resources ├── config.yml ├── en.json ├── pl.json ├── nl.json ├── ru.json ├── fr.json └── es.json ├── LICENSE └── README.md /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/genboy/Festival/HEAD/icon.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /config.yml 2 | /areas.json 3 | /areas_bup.json 4 | /areas_test.json 5 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org/ 2 | root = yes 3 | 4 | [*] 5 | indent_size = 4 6 | indent_style = tab 7 | -------------------------------------------------------------------------------- /.poggit.yml: -------------------------------------------------------------------------------- 1 | --- # Poggit-CI Manifest. Open the CI at https://poggit.pmmp.io/ci/genboy/Festival 2 | branches: 3 | - stable 4 | - development 5 | projects: 6 | Festival: 7 | path: "" 8 | ... 9 | -------------------------------------------------------------------------------- /src/genboy/Festival/lang/Language.php: -------------------------------------------------------------------------------- 1 | owner = $owner; 10 | $this->trans = $langjson; 11 | self::$instance = $this; 12 | } 13 | static function translate($key){ 14 | $txt = self::$instance->trans[$key]; 15 | if (strpos($txt, "%n") != false) { 16 | $text = str_replace("%n", "\n", $txt); 17 | } else { 18 | $text = $txt; 19 | } 20 | return $text; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/xenialdan/customui/Form.php: -------------------------------------------------------------------------------- 1 | callable = $callable; 22 | } 23 | 24 | 25 | 26 | /** 27 | * @deprecated 28 | * @see Player::sendForm() 29 | * 30 | * @param Player $player 31 | */ 32 | public function sendToPlayer(Player $player) : void { 33 | $player->sendForm($this); 34 | } 35 | 36 | public function getCallable() : ?callable { 37 | return $this->callable; 38 | } 39 | 40 | public function setCallable(?callable $callable) { 41 | $this->callable = $callable; 42 | } 43 | 44 | public function handleResponse(Player $player, $data) : void { 45 | $this->processData($data); 46 | $callable = $this->getCallable(); 47 | if($callable !== null) { 48 | $callable($player, $data); 49 | } 50 | } 51 | 52 | public function processData(&$data) : void { 53 | } 54 | 55 | public function jsonSerialize(){ 56 | return $this->data; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/xenialdan/customui/ModalForm.php: -------------------------------------------------------------------------------- 1 | data["type"] = "modal"; 18 | $this->data["title"] = ""; 19 | $this->data["content"] = $this->content; 20 | $this->data["button1"] = ""; 21 | $this->data["button2"] = ""; 22 | } 23 | 24 | /** 25 | * @param string $title 26 | */ 27 | public function setTitle(string $title) : void { 28 | $this->data["title"] = $title; 29 | } 30 | 31 | /** 32 | * @return string 33 | */ 34 | public function getTitle() : string { 35 | return $this->data["title"]; 36 | } 37 | 38 | /** 39 | * @return string 40 | */ 41 | public function getContent() : string { 42 | return $this->data["content"]; 43 | } 44 | 45 | /** 46 | * @param string $content 47 | */ 48 | public function setContent(string $content) : void { 49 | $this->data["content"] = $content; 50 | } 51 | 52 | /** 53 | * @param string $text 54 | */ 55 | public function setButton1(string $text) : void { 56 | $this->data["button1"] = $text; 57 | } 58 | 59 | /** 60 | * @return string 61 | */ 62 | public function getButton1() : string { 63 | return $this->data["button1"]; 64 | } 65 | 66 | /** 67 | * @param string $text 68 | */ 69 | public function setButton2(string $text) : void { 70 | $this->data["button2"] = $text; 71 | } 72 | 73 | /** 74 | * @return string 75 | */ 76 | public function getButton2() : string { 77 | return $this->data["button2"]; 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/xenialdan/customui/SimpleForm.php: -------------------------------------------------------------------------------- 1 | data["type"] = "form"; 23 | $this->data["title"] = ""; 24 | $this->data["content"] = $this->content; 25 | } 26 | 27 | public function processData(&$data) : void { 28 | $data = $this->labelMap[$data] ?? null; 29 | } 30 | 31 | /** 32 | * @param string $title 33 | */ 34 | public function setTitle(string $title) : void { 35 | $this->data["title"] = $title; 36 | } 37 | 38 | /** 39 | * @return string 40 | */ 41 | public function getTitle() : string { 42 | return $this->data["title"]; 43 | } 44 | 45 | /** 46 | * @return string 47 | */ 48 | public function getContent() : string { 49 | return $this->data["content"]; 50 | } 51 | 52 | /** 53 | * @param string $content 54 | */ 55 | public function setContent(string $content) : void { 56 | $this->data["content"] = $content; 57 | } 58 | 59 | /** 60 | * @param string $text 61 | * @param int $imageType 62 | * @param string $imagePath 63 | * @param string $label 64 | */ 65 | public function addButton(string $text, int $imageType = -1, string $imagePath = "", ?string $label = null) : void { 66 | $content = ["text" => $text]; 67 | if($imageType !== -1) { 68 | $content["image"]["type"] = $imageType === 0 ? "path" : "url"; 69 | $content["image"]["data"] = $imagePath; 70 | } 71 | $this->data["buttons"][] = $content; 72 | $this->labelMap[] = $label ?? count($this->labelMap); 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /src/genboy/Festival/Level.php: -------------------------------------------------------------------------------- 1 | name = $name; 27 | $this->desc = $desc; 28 | $this->options = $options; 29 | $this->flags = $flags; 30 | $this->plugin = $plugin; 31 | $this->save(); 32 | } 33 | 34 | /** 35 | * @return string 36 | */ 37 | public function getName() : string { 38 | return $this->name; 39 | } 40 | 41 | /** 42 | * @return string 43 | */ 44 | public function getDesc() : string { 45 | return $this->desc; 46 | } 47 | 48 | /** 49 | * @return string[] 50 | */ 51 | public function getFlags() : array{ 52 | return $this->flags; 53 | } 54 | 55 | /** 56 | * @param string $flag 57 | * @return bool 58 | */ 59 | public function getFlag(string $flag) : bool{ 60 | if(isset($this->flags[$flag])){ 61 | return $this->flags[$flag]; 62 | } 63 | return false; 64 | } 65 | 66 | /** 67 | * @param string $flag 68 | * @param bool $value 69 | * @return bool 70 | */ 71 | public function setFlag(string $flag, bool $value) : bool{ 72 | if(isset($this->flags[$flag])){ 73 | $this->flags[$flag] = $value; 74 | $this->plugin->helper->saveAreas(); 75 | 76 | return true; 77 | } 78 | 79 | return false; 80 | } 81 | 82 | /** 83 | * @param string $flag 84 | * @return bool 85 | */ 86 | public function toggleFlag(string $flag) : bool{ 87 | if(isset($this->flags[$flag])){ 88 | $this->flags[$flag] = !$this->flags[$flag]; 89 | $this->plugin->saveAreas(); 90 | 91 | return $this->flags[$flag]; 92 | } 93 | 94 | return false; 95 | } 96 | 97 | /** 98 | * @return string[] 99 | */ 100 | public function getOptions() : array{ 101 | return $this->options; 102 | } 103 | 104 | /** 105 | * @param string $option 106 | * @return bool 107 | */ 108 | public function getOption(string $opt) { 109 | if(isset($this->options[$opt])){ 110 | return $this->options[$opt]; 111 | } 112 | return false; 113 | } 114 | 115 | /** 116 | * @param string $opt 117 | * @param bool $value 118 | * @return bool 119 | */ 120 | public function setOption(string $opt, $value) : bool{ 121 | if(isset($this->options[$opt])){ 122 | $this->options[$opt] = $value; 123 | $this->plugin->helper->saveLevels(); 124 | 125 | return true; 126 | } 127 | 128 | return false; 129 | } 130 | 131 | 132 | /** 133 | * @return string 134 | */ 135 | public function getLevelName() : string{ 136 | return $this->levelName; 137 | } 138 | 139 | /** 140 | * @return null|Level 141 | */ 142 | public function getLevel() : ?Level{ 143 | return $this->plugin->getServer()->getLevelByName($this->levelName); 144 | } 145 | 146 | public function delete() : void{ 147 | unset($this->plugin->levels[$this->getName()]); 148 | $this->plugin->data->saveLevels(); 149 | } 150 | 151 | public function save() : void{ 152 | $this->plugin->levels[strtolower($this->name)] = $this; 153 | } 154 | 155 | } 156 | -------------------------------------------------------------------------------- /src/xenialdan/customui/CustomForm.php: -------------------------------------------------------------------------------- 1 | data["type"] = "custom_form"; 17 | $this->data["title"] = ""; 18 | $this->data["content"] = []; 19 | } 20 | 21 | public function processData(&$data) : void { 22 | if(is_array($data)) { 23 | $new = []; 24 | foreach ($data as $i => $v) { 25 | $new[$this->labelMap[$i]] = $v; 26 | } 27 | $data = $new; 28 | } 29 | } 30 | 31 | /** 32 | * @param string $title 33 | */ 34 | public function setTitle(string $title) : void { 35 | $this->data["title"] = $title; 36 | } 37 | 38 | /** 39 | * @return string 40 | */ 41 | public function getTitle() : string { 42 | return $this->data["title"]; 43 | } 44 | 45 | /** 46 | * @param string $text 47 | * @param string|null $label 48 | */ 49 | public function addLabel(string $text, ?string $label = null) : void { 50 | $this->addContent(["type" => "label", "text" => $text]); 51 | $this->labelMap[] = $label ?? count($this->labelMap); 52 | } 53 | 54 | 55 | /** 56 | * @param string $text 57 | * @param bool|null $default 58 | * @param string|null $label 59 | */ 60 | public function addToggle(string $text, bool $default = null, ?string $label = null) : void { 61 | $content = ["type" => "toggle", "text" => $text]; 62 | if($default !== null) { 63 | $content["default"] = $default; 64 | } 65 | $this->addContent($content); 66 | $this->labelMap[] = $label ?? count($this->labelMap); 67 | } 68 | 69 | /** 70 | * @param string $text 71 | * @param int $min 72 | * @param int $max 73 | * @param int $step 74 | * @param int $default 75 | * @param string|null $label 76 | */ 77 | public function addSlider(string $text, int $min, int $max, int $step = -1, int $default = -1, ?string $label = null) : void { 78 | $content = ["type" => "slider", "text" => $text, "min" => $min, "max" => $max]; 79 | if($step !== -1) { 80 | $content["step"] = $step; 81 | } 82 | if($default !== -1) { 83 | $content["default"] = $default; 84 | } 85 | $this->addContent($content); 86 | $this->labelMap[] = $label ?? count($this->labelMap); 87 | } 88 | 89 | /** 90 | * @param string $text 91 | * @param array $steps 92 | * @param int $defaultIndex 93 | * @param string|null $label 94 | */ 95 | public function addStepSlider(string $text, array $steps, int $defaultIndex = -1, ?string $label = null) : void { 96 | $content = ["type" => "step_slider", "text" => $text, "steps" => $steps]; 97 | if($defaultIndex !== -1) { 98 | $content["default"] = $defaultIndex; 99 | } 100 | $this->addContent($content); 101 | $this->labelMap[] = $label ?? count($this->labelMap); 102 | } 103 | 104 | /** 105 | * @param string $text 106 | * @param array $options 107 | * @param int $default 108 | * @param string|null $label 109 | */ 110 | public function addDropdown(string $text, array $options, int $default = null, ?string $label = null) : void { 111 | $this->addContent(["type" => "dropdown", "text" => $text, "options" => $options, "default" => $default]); 112 | $this->labelMap[] = $label ?? count($this->labelMap); 113 | } 114 | 115 | /** 116 | * @param string $text 117 | * @param string $placeholder 118 | * @param string $default 119 | * @param string|null $label 120 | */ 121 | public function addInput(string $text, string $placeholder = "", string $default = null, ?string $label = null) : void { 122 | $this->addContent(["type" => "input", "text" => $text, "placeholder" => $placeholder, "default" => $default]); 123 | $this->labelMap[] = $label ?? count($this->labelMap); 124 | } 125 | 126 | 127 | /** 128 | * @param array $content 129 | */ 130 | private function addContent(array $content) : void { 131 | $this->data["content"][] = $content; 132 | } 133 | 134 | } 135 | -------------------------------------------------------------------------------- /COPYRIGHT: -------------------------------------------------------------------------------- 1 | Genboy Copyright 2019 2 | 3 | Festival Copyright statement, 27 April 2019 4 | 5 | 1) This Copyright statement is the Festival Copyright statement explaining the terms and conditions of the Copyright statement restrictions in the English vocabulary used by entities worldwide since 2015. 6 | 7 | 1.a) Festival is the complete software package with HTML/CSS, Javascript, JSON, PHP, visual design elements and concepts, including any version or branch but excluding the explicit named files hereafter, available at github.com/genboy/Festival, hereby called the Product. Files excluded from the Festival Copyright restrictions, if included in the Product, respecting their owners intellectual property rights, copyrights or licenses are: 8 | poggit.yml, .editorconfig, Encoding.php, CustomForm.php, Form.php, ModalForm.php and SimpleForm.php. 9 | 10 | 1.b) Genboy is the name of the digital identity and trademark of the legal human entity and natural person who is registered as the domainname holder of genboy.net and who is the owner of the GitHub's Service user account github.com/genboy named Genboy at the github.com website by GitHub Inc., Genboy is hereby called the Owner. 11 | 12 | 1.c) The terms 'use' en 'uses' in this Copyright statement refer to the actions use, duplicate, copy, fork, adjust, market, remarket, sell and reuse by any person, legal entity, service or software. 13 | 14 | 1.d) The term 'you' and 'User' in this Copyright statement refers to the legal entity that is you, your company, your employer or any software in ownership or used by you, your company, your employer or any other person, legal entity or service that uses the Product and thereby agreed to respect this Copyright statement, hereby called the User. 15 | 16 | 1.e) The term 'GLA' and 'license' in this Copyright statement refer to the legal binding writing in the form of a part or the whole copy of an original license agreement written by the Owner, also called The Genboy License Agreement, hereby called the GLA. The GLA explains the rights and restrictions the User has to use any portion of the Product in the English vocabulary used by legal entities since 2015. 17 | 18 | 1.f) The term 'law', 'legislation' and 'copyright' in this Copyright statement refer to any law or legislation that does not contradict this Copyright statement or the GLA. 19 | Any other written law or legislation that does contradict this Copyright statement or the GLA does not apply to this Copyright statement or the GLA. 20 | 21 | 1.g) This Copyright statement and the GLA, in case there is the GLA (Genboy License Agreement or LICENSE) embedded besides this Copyright statement in the Product, can not be changed by any entity except the Owner 22 | 23 | 1.h) This Copyright statement and the GLA can be changed by the Owner at any time. The owner will announce any changes of this Copyright statement or the GLA inside the README.md file of the Product in the English vocabulary used by entities worldwide since 2015. 24 | 25 | 1.i) The user is allowed to translate a copy of the Festival Copyright statement and the GLA into another language only to understand the legal bindings between the Owner, the User and the Product. 26 | 27 | 1.j) Trademarks: Genboy, Genboy Lum, Festival, the Festival Logo and all Genboy product names are trademarks and service marks of Genboy (collectively “Genboy Trademarks”), and nothing in these copyrights shall be construed as granting any license or right to use the Genboy Trademarks without Genboy’s prior written consent. All trademarks, service marks and logos included on the Site (“Marks”) are the property of Genboy or third parties, and you may not use such Marks without the express, prior written consent of Genboy or the applicable third party. 28 | 29 | 2) The Owner retains ownership of all intellectual property rights of any kind related to the Product. 30 | The Owner reserves all rights that are not expressly granted to the User under this Copyright statement or by law. 31 | The look and feel of the Product is copyright © Genboy. All rights reserved. 32 | The User may not use any portion of the Product without express written permission from the Owner. 33 | 34 | 3) If the User does use any portion of the Product the User agrees to 35 | 36 | 3.a) have read and understand this Copyright statement and in case there is no GLA (Genboy License Agreement or LICENSE) embedded in the Product 37 | 3.b) contact the Owner, through email msg@genboy.net or other means, to ask permission to use any portion of the Product and 38 | 3.c) communicate the end means of use of the Product to the Owner and 39 | 3.d) pay the fee the Owner communicated to the User for giving out the GLA and 40 | 3.e) be aware of the rights of the Owner to take legal action if no express written permission was given in the form of the GLA to the User. 41 | 42 | Genboy Copyright 2019 -------------------------------------------------------------------------------- /plugin.yml: -------------------------------------------------------------------------------- 1 | name: Festival 2 | author: Genboy 3 | version: 2.1.2.3 4 | main: genboy\Festival\Festival 5 | load: POSTWORLD 6 | api: [3.0.0] 7 | website: "https://github.com/genboy/Festival" 8 | commands: 9 | fe: 10 | description: "Allows you to manage Festival area's and events." 11 | usage: "\n§dFestival Commands & options \n§bAcces Menu: §f/fe menu(ui/form) \n§bChoose language: §f/fe lang \n§bToggle floating area titles: §f/fe titles \n§bSee area info at location: §f/fe \n§5Create cube area: §f/fe pos1 §6select 1 corner, §f/fe pos2 §6select opposite diagonal corner and §f/fe create §6to name the area. \n§5Create sphere area: §f/fe pos1 §6select radius or diameter start, §f/fe rad(darius) §6select radius distance or §f/fe dia(diameter) §6select diameter direction and distance and §f/fe create §6to name the area. \n§6Delete area: §f/fe del(delete) \n§9Flags: §fhurt, pvp, flight, edit, touch, mobs, animals, effects, msg, pass, drop, tnt, fire, explode, shoot, hunger, perms, fall, cmd \n§9Toggle area flags: §f/fe \n§5Add an area event command: \n§f/fe command \n§5Edit or delete command: \n§f/fe command <(edit)/del> () \n§5Change command event: \n§f/fe command event \n§5Whitelist players: \n§f/fe whitelist \n§5Area Priority level: \n§f/fe priority set \n§5Area y-scaling: \n§f/fe scale <1-9998> (0 = default, 9999 = infinite) \n§5Use compass: §f/fe compass " 12 | permission: festival.command.fe 13 | permissions: 14 | festival: 15 | description: "Allows access to all Festival features." 16 | default: false 17 | children: 18 | festival.access: 19 | description: "Allows access to editing festival areas and events." 20 | default: op 21 | festival.command: 22 | description: "Allows access to all Festival commands." 23 | default: false 24 | children: 25 | festival.command.fe: 26 | description: "Allows access to the Festival area command." 27 | default: op 28 | children: 29 | festival.command.fe.lang: 30 | description: "Allows access to the Festival lang subcommand." 31 | default: op 32 | festival.command.fe.priority: 33 | description: "Allows access to the Festival priority subcommand." 34 | default: op 35 | festival.command.fe.titles: 36 | description: "Allows access to the Festival titles subcommand." 37 | default: op 38 | festival.command.fe.pos1: 39 | description: "Allows access to the Festival pos1 subcommand." 40 | default: op 41 | festival.command.fe.pos2: 42 | description: "Allows access to the Festival pos2 subcommand." 43 | default: op 44 | festival.command.fe.rad: 45 | description: "Allows access to the Festival radius subcommand." 46 | default: op 47 | festival.command.fe.dia: 48 | description: "Allows access to the Festival diameter subcommand." 49 | default: op 50 | festival.command.fe.create: 51 | description: "Allows access to the Festival create subcommand." 52 | default: op 53 | festival.command.fe.list: 54 | description: "Allows access to the Festival list subcommand." 55 | default: op 56 | festival.command.fe.here: 57 | description: "Allows access to the Festival here subcommand." 58 | default: op 59 | festival.command.fe.tp: 60 | description: "Allows access to the Festival tp subcommand." 61 | default: op 62 | festival.command.fe.rename: 63 | description: "Allows access to the Festival rename subcommand." 64 | default: op 65 | festival.command.fe.desc: 66 | description: "Allows access to the Festival description subcommand." 67 | default: op 68 | festival.command.fe.priority: 69 | description: "Allows access to the Festival scale subcommand." 70 | default: op 71 | festival.command.fe.scale: 72 | description: "Allows access to the Festival scale subcommand." 73 | default: op 74 | festival.command.fe.flag: 75 | description: "Allows access to the Festival flag subcommand." 76 | default: op 77 | festival.command.fe.delete: 78 | description: "Allows access to the Festival delete subcommand." 79 | default: op 80 | festival.command.fe.whitelist: 81 | description: "Allows access to the Festival whitelist subcommand." 82 | default: op 83 | festival.command.fe.command: 84 | description: "Allows access to the Festival command subcommand." 85 | default: op 86 | -------------------------------------------------------------------------------- /resources/config.yml: -------------------------------------------------------------------------------- 1 | # Config file for Festival 2.1.1 2 | 3 | # Festival options 4 | Options: 5 | # select a language: English = en, Dutch = nl, Español = es, Polskie = pl ( todo: fr = france, 日本人 = ja, 中文 = zh, 한국어 = ko, русский = ru, italiano = it, Indonesia = in, translate please) 6 | Language: en 7 | 8 | # Hold Magic block/item to enter Menu and tab area positions 9 | ItemID: 201 10 | 11 | # Area Messages Display position (msg/title/tip/pop) 12 | Msgtype: msg 13 | 14 | # Area Floatingtext title display (off/op/on) 15 | Areadisplay: op 16 | 17 | # Area Messages persist display (off/op/on) 18 | Msgdisplay: op 19 | 20 | # Use flight flag (on/off) - since v.1.1.3 flight flag usage can be turn off 21 | FlightControl: on 22 | 23 | # Use level flag protection system (on/off) - defaults are still used for area's 24 | LevelControl: off 25 | 26 | # Auto whitelist area creator (on/off) 27 | AutoWhitelist: off 28 | 29 | # Flag settings for unprotected areas 30 | # Flag rule: a flag protects the area and the players in it 31 | # These are the old default flag names, to be able to copy settings from previous config.yml versions 32 | Default: 33 | 34 | # Keep players from getting hurt? (true = Player god mode) 35 | Hurt: false 36 | 37 | # Keep players from getting hurt by other players? (true = NoPVP) 38 | PVP: false 39 | 40 | # Keep players from flying? (true = NoFlight) 41 | Flight: false 42 | 43 | # Keep players from editing the world? (true = NoEdit) 44 | Edit: true 45 | 46 | # Keep players from touching blocks and activating things like chests? (true = NoTouching) 47 | Touch: false 48 | 49 | # Prevent Animal Entities from spawning? (true = NoAnimals) 50 | Animals: false 51 | 52 | # Prevent Mob Entities from spawning? (true = NoMobs) 53 | Mobs: false 54 | 55 | # Keep players from having effects like speed or night vision? (true = NoEffects) 56 | Effects: false 57 | 58 | # Keep players from seeing enter/leave/description messages? (true = NoMessages) 59 | Msg: false 60 | 61 | # Prevent players from enter/leaving the area? (barrier) (true = NoPassage) 62 | Passage: false 63 | 64 | # Keep players from dropping items in the area? (true = NoDropping) 65 | Drop: false 66 | 67 | # No explosions allowed in the area? (true = No TNT Explosions) 68 | TNT: true 69 | 70 | # No exploding mobs allowed in the area? (true = No creeper explosions etc.) 71 | Explode: true 72 | 73 | # No fire allowed in the area? (true = no fire) 74 | Fire: false 75 | 76 | # No shooting allowed in the area? (true = NoShooting) 77 | Shoot: false 78 | 79 | # Keep players from hunger(exhaust) in the area? (true = NoExhaust) 80 | Hunger: false 81 | 82 | # Keep players from executing area event commands without specific perms (true = No Op Permissons) 83 | Perms: false 84 | 85 | # Keep players from taking fall damage (true = NoFallDamage) 86 | Fall: true 87 | 88 | # Keep area event commands from executing for non-ops (command test mode) 89 | CMD: false 90 | 91 | # Flag settings for unprotected areas in individual worlds: 92 | Worlds: 93 | 94 | # New worlds (ie. automatic generated) 95 | DEFAULT: 96 | 97 | # Keep players from getting hurt? (true = Player god mode) 98 | Hurt: false 99 | 100 | # Keep players from getting hurt by other players? (true = NoPVP) 101 | PVP: false 102 | 103 | # Keep players from flying? (true = NoFlight) 104 | Flight: false 105 | 106 | # Keep players from editing the world? (true = NoEdit) 107 | Edit: true 108 | 109 | # Keep players from touching blocks and activating things like chests? (true = NoTouching) 110 | Touch: false 111 | 112 | # Prevent Animal Entities from spawning? (true = NoAnimals) 113 | Animals: false 114 | 115 | # Prevent Mob Entities from spawning? (true = NoMobs) 116 | Mobs: false 117 | 118 | # Keep players from having effects like speed or night vision? (true = NoEffects) 119 | Effects: false 120 | 121 | # Keep players from seeing enter/leave/description messages? (true = NoMessages) 122 | Msg: false 123 | 124 | # Prevent players from enter/leaving the area? (barrier) (true = NoPassage) 125 | Passage: false 126 | 127 | # Keep players from dropping items in the area? (true = NoDropping) 128 | Drop: false 129 | 130 | # No explosions allowed in the area? (true = NoExplosions) 131 | TNT: false 132 | 133 | # No exploding mobs allowed in the area? (true = No creeper explosions etc.) 134 | Explode: false 135 | 136 | # No fire allowed in the area? (true = no fire) 137 | Fire: false 138 | 139 | # No shooting allowed in the area? (true = NoShooting) 140 | Shoot: false 141 | 142 | # Keep players from hunger(exhaust) in the area? (true = NoExhaust) 143 | Hunger: false 144 | 145 | # Keep players from executing area event commands without specific perms (true = No Op Permissons) 146 | Perms: false 147 | 148 | # Keep players from taking fall damage (true = NoFallDamage) 149 | Fall: true 150 | 151 | # Keep area event commands from executing for non-ops (command test mode) 152 | CMD: false 153 | 154 | # Example specific level called 'world' specific default flags (copy and replace 'world' with your levelname) 155 | world: 156 | # Keep players from getting hurt? (true = Player god mode) 157 | Hurt: false 158 | 159 | # Keep players from getting hurt by other players? (true = NoPVP) 160 | PVP: false 161 | 162 | # Keep players from flying? (true = NoFlight) 163 | Flight: false 164 | 165 | # Keep players from editing the world? (true = NoEdit) 166 | Edit: true 167 | 168 | # Keep players from touching blocks and activating things like chests? (true = NoTouching) 169 | Touch: false 170 | 171 | # Prevent Animal Entities from spawning? (true = NoAnimals) 172 | Animals: false 173 | 174 | # Prevent Mob Entities from spawning? (true = NoMobs) 175 | Mobs: false 176 | 177 | # Keep players from having effects like speed or night vision? (true = NoEffects) 178 | Effects: false 179 | 180 | # Keep players from seeing enter/leave/description messages? (true = NoMessages) 181 | Msg: false 182 | 183 | # Prevent players from enter/leaving the area? (barrier) (true = NoPassage) 184 | Passage: false 185 | 186 | # Keep players from dropping items in the area? (true = NoDropping) 187 | Drop: false 188 | 189 | # No explosions allowed in the area? (true = NoExplosions) 190 | TNT: false 191 | 192 | # No exploding mobs allowed in the area? (true = No creeper explosions etc.) 193 | Explode: false 194 | 195 | # No fire allowed in the area? (true = no fire) 196 | Fire: false 197 | 198 | # No shooting allowed in the area? (true = NoShooting) 199 | Shoot: false 200 | 201 | # Keep players from hunger(exhaust) in the area? (true = NoExhaust) 202 | Hunger: false 203 | 204 | # Keep players from executing area event commands without specific perms (true = No Op Permissons) 205 | Perms: false 206 | 207 | # Keep players from taking fall damage (true = NoFallDamage) 208 | Fall: true 209 | 210 | # Keep area event commands from executing for non-ops (command test mode) 211 | CMD: false 212 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Genboy License Agreement, GLA Public Version 1, 27 April 2019 2 | 3 | Genboy Copyright (C) 2019 4 | 5 | This version of the GLA incorporates the terms and conditions of the Festival Copyright statement and the terms and conditions of version 3 of the GNU General Public 6 | License, supplemented by the additional permissions listed below. 7 | 8 | 0. Additional Definitions. 9 | 10 | As used herein, "this License" refers to version 3 of the GNU Lesser 11 | General Public License, and the "GNU GPL" refers to version 3 of the GNU 12 | General Public License. 13 | 14 | "The Library" refers to a covered work governed by this License, 15 | other than an Application or a Combined Work as defined below. 16 | 17 | An "Application" is any work that makes use of an interface provided 18 | by the Library, but which is not otherwise based on the Library. 19 | Defining a subclass of a class defined by the Library is deemed a mode 20 | of using an interface provided by the Library. 21 | 22 | A "Combined Work" is a work produced by combining or linking an 23 | Application with the Library. The particular version of the Library 24 | with which the Combined Work was made is also called the "Linked 25 | Version". 26 | 27 | The "Minimal Corresponding Source" for a Combined Work means the 28 | Corresponding Source for the Combined Work, excluding any source code 29 | for portions of the Combined Work that, considered in isolation, are 30 | based on the Application, and not on the Linked Version. 31 | 32 | The "Corresponding Application Code" for a Combined Work means the 33 | object code and/or source code for the Application, including any data 34 | and utility programs needed for reproducing the Combined Work from the 35 | Application, but excluding the System Libraries of the Combined Work. 36 | 37 | 1. Exception to Section 3 of the GNU GPL. 38 | 39 | You may convey a covered work under sections 3 and 4 of this License 40 | without being bound by section 3 of the GNU GPL. 41 | 42 | 2. Conveying Modified Versions. 43 | 44 | If you modify a copy of the Library, and, in your modifications, a 45 | facility refers to a function or data to be supplied by an Application 46 | that uses the facility (other than as an argument passed when the 47 | facility is invoked), then you may convey a copy of the modified 48 | version: 49 | 50 | a) under this License, provided that you make a good faith effort to 51 | ensure that, in the event an Application does not supply the 52 | function or data, the facility still operates, and performs 53 | whatever part of its purpose remains meaningful, or 54 | 55 | b) under the GNU GPL, with none of the additional permissions of 56 | this License applicable to that copy. 57 | 58 | 3. Object Code Incorporating Material from Library Header Files. 59 | 60 | The object code form of an Application may incorporate material from 61 | a header file that is part of the Library. You may convey such object 62 | code under terms of your choice, provided that, if the incorporated 63 | material is not limited to numerical parameters, data structure 64 | layouts and accessors, or small macros, inline functions and templates 65 | (ten or fewer lines in length), you do both of the following: 66 | 67 | a) Give prominent notice with each copy of the object code that the 68 | Library is used in it and that the Library and its use are 69 | covered by this License. 70 | 71 | b) Accompany the object code with a copy of the GNU GPL and this license 72 | document. 73 | 74 | 4. Combined Works. 75 | 76 | You may convey a Combined Work under terms of your choice that, 77 | taken together, effectively do not restrict modification of the 78 | portions of the Library contained in the Combined Work and reverse 79 | engineering for debugging such modifications, if you also do each of 80 | the following: 81 | 82 | a) Give prominent notice with each copy of the Combined Work that 83 | the Library is used in it and that the Library and its use are 84 | covered by this License. 85 | 86 | b) Accompany the Combined Work with a copy of the GNU GPL and this license 87 | document. 88 | 89 | c) For a Combined Work that displays copyright notices during 90 | execution, include the copyright notice for the Library among 91 | these notices, as well as a reference directing the user to the 92 | copies of the GNU GPL and this license document. 93 | 94 | d) Do one of the following: 95 | 96 | 0) Convey the Minimal Corresponding Source under the terms of this 97 | License, and the Corresponding Application Code in a form 98 | suitable for, and under terms that permit, the user to 99 | recombine or relink the Application with a modified version of 100 | the Linked Version to produce a modified Combined Work, in the 101 | manner specified by section 6 of the GNU GPL for conveying 102 | Corresponding Source. 103 | 104 | 1) Use a suitable shared library mechanism for linking with the 105 | Library. A suitable mechanism is one that (a) uses at run time 106 | a copy of the Library already present on the user's computer 107 | system, and (b) will operate properly with a modified version 108 | of the Library that is interface-compatible with the Linked 109 | Version. 110 | 111 | e) Provide Installation Information, but only if you would otherwise 112 | be required to provide such information under section 6 of the 113 | GNU GPL, and only to the extent that such information is 114 | necessary to install and execute a modified version of the 115 | Combined Work produced by recombining or relinking the 116 | Application with a modified version of the Linked Version. (If 117 | you use option 4d0, the Installation Information must accompany 118 | the Minimal Corresponding Source and Corresponding Application 119 | Code. If you use option 4d1, you must provide the Installation 120 | Information in the manner specified by section 6 of the GNU GPL 121 | for conveying Corresponding Source.) 122 | 123 | 5. Combined Libraries. 124 | 125 | You may place library facilities that are a work based on the 126 | Library side by side in a single library together with other library 127 | facilities that are not Applications and are not covered by this 128 | License, and convey such a combined library under terms of your 129 | choice, if you do both of the following: 130 | 131 | a) Accompany the combined library with a copy of the same work based 132 | on the Library, uncombined with any other library facilities, 133 | conveyed under the terms of this License. 134 | 135 | b) Give prominent notice with the combined library that part of it 136 | is a work based on the Library, and explaining where to find the 137 | accompanying uncombined form of the same work. 138 | 139 | 6. Revised Versions of the GNU Lesser General Public License. 140 | 141 | The Free Software Foundation may publish revised and/or new versions 142 | of the GNU Lesser General Public License from time to time. Such new 143 | versions will be similar in spirit to the present version, but may 144 | differ in detail to address new problems or concerns. 145 | 146 | Each version is given a distinguishing version number. If the 147 | Library as you received it specifies that a certain numbered version 148 | of the GNU Lesser General Public License "or any later version" 149 | applies to it, you have the option of following the terms and 150 | conditions either of that published version or of any later version 151 | published by the Free Software Foundation. If the Library as you 152 | received it does not specify a version number of the GNU Lesser 153 | General Public License, you may choose any version of the GNU Lesser 154 | General Public License ever published by the Free Software Foundation. 155 | 156 | If the Library as you received it specifies that a proxy can decide 157 | whether future versions of the GNU Lesser General Public License shall 158 | apply, that proxy's public statement of acceptance of any version is 159 | permanent authorization for you to choose that version for the 160 | Library. 161 | -------------------------------------------------------------------------------- /src/neitanod/ForceUTF8/Encoding.php: -------------------------------------------------------------------------------- 1 | 33 | * @package Encoding 34 | * @version 2.0 35 | * @link https://github.com/neitanod/forceutf8 36 | * @example https://github.com/neitanod/forceutf8 37 | * @license Revised BSD 38 | */ 39 | 40 | namespace neitanod\ForceUTF8; 41 | 42 | class Encoding { 43 | 44 | const ICONV_TRANSLIT = "TRANSLIT"; 45 | const ICONV_IGNORE = "IGNORE"; 46 | const WITHOUT_ICONV = ""; 47 | 48 | protected static $win1252ToUtf8 = array( 49 | 128 => "\xe2\x82\xac", 50 | 51 | 130 => "\xe2\x80\x9a", 52 | 131 => "\xc6\x92", 53 | 132 => "\xe2\x80\x9e", 54 | 133 => "\xe2\x80\xa6", 55 | 134 => "\xe2\x80\xa0", 56 | 135 => "\xe2\x80\xa1", 57 | 136 => "\xcb\x86", 58 | 137 => "\xe2\x80\xb0", 59 | 138 => "\xc5\xa0", 60 | 139 => "\xe2\x80\xb9", 61 | 140 => "\xc5\x92", 62 | 63 | 142 => "\xc5\xbd", 64 | 65 | 66 | 145 => "\xe2\x80\x98", 67 | 146 => "\xe2\x80\x99", 68 | 147 => "\xe2\x80\x9c", 69 | 148 => "\xe2\x80\x9d", 70 | 149 => "\xe2\x80\xa2", 71 | 150 => "\xe2\x80\x93", 72 | 151 => "\xe2\x80\x94", 73 | 152 => "\xcb\x9c", 74 | 153 => "\xe2\x84\xa2", 75 | 154 => "\xc5\xa1", 76 | 155 => "\xe2\x80\xba", 77 | 156 => "\xc5\x93", 78 | 79 | 158 => "\xc5\xbe", 80 | 159 => "\xc5\xb8" 81 | ); 82 | 83 | protected static $brokenUtf8ToUtf8 = array( 84 | "\xc2\x80" => "\xe2\x82\xac", 85 | 86 | "\xc2\x82" => "\xe2\x80\x9a", 87 | "\xc2\x83" => "\xc6\x92", 88 | "\xc2\x84" => "\xe2\x80\x9e", 89 | "\xc2\x85" => "\xe2\x80\xa6", 90 | "\xc2\x86" => "\xe2\x80\xa0", 91 | "\xc2\x87" => "\xe2\x80\xa1", 92 | "\xc2\x88" => "\xcb\x86", 93 | "\xc2\x89" => "\xe2\x80\xb0", 94 | "\xc2\x8a" => "\xc5\xa0", 95 | "\xc2\x8b" => "\xe2\x80\xb9", 96 | "\xc2\x8c" => "\xc5\x92", 97 | 98 | "\xc2\x8e" => "\xc5\xbd", 99 | 100 | 101 | "\xc2\x91" => "\xe2\x80\x98", 102 | "\xc2\x92" => "\xe2\x80\x99", 103 | "\xc2\x93" => "\xe2\x80\x9c", 104 | "\xc2\x94" => "\xe2\x80\x9d", 105 | "\xc2\x95" => "\xe2\x80\xa2", 106 | "\xc2\x96" => "\xe2\x80\x93", 107 | "\xc2\x97" => "\xe2\x80\x94", 108 | "\xc2\x98" => "\xcb\x9c", 109 | "\xc2\x99" => "\xe2\x84\xa2", 110 | "\xc2\x9a" => "\xc5\xa1", 111 | "\xc2\x9b" => "\xe2\x80\xba", 112 | "\xc2\x9c" => "\xc5\x93", 113 | 114 | "\xc2\x9e" => "\xc5\xbe", 115 | "\xc2\x9f" => "\xc5\xb8" 116 | ); 117 | 118 | protected static $utf8ToWin1252 = array( 119 | "\xe2\x82\xac" => "\x80", 120 | 121 | "\xe2\x80\x9a" => "\x82", 122 | "\xc6\x92" => "\x83", 123 | "\xe2\x80\x9e" => "\x84", 124 | "\xe2\x80\xa6" => "\x85", 125 | "\xe2\x80\xa0" => "\x86", 126 | "\xe2\x80\xa1" => "\x87", 127 | "\xcb\x86" => "\x88", 128 | "\xe2\x80\xb0" => "\x89", 129 | "\xc5\xa0" => "\x8a", 130 | "\xe2\x80\xb9" => "\x8b", 131 | "\xc5\x92" => "\x8c", 132 | 133 | "\xc5\xbd" => "\x8e", 134 | 135 | 136 | "\xe2\x80\x98" => "\x91", 137 | "\xe2\x80\x99" => "\x92", 138 | "\xe2\x80\x9c" => "\x93", 139 | "\xe2\x80\x9d" => "\x94", 140 | "\xe2\x80\xa2" => "\x95", 141 | "\xe2\x80\x93" => "\x96", 142 | "\xe2\x80\x94" => "\x97", 143 | "\xcb\x9c" => "\x98", 144 | "\xe2\x84\xa2" => "\x99", 145 | "\xc5\xa1" => "\x9a", 146 | "\xe2\x80\xba" => "\x9b", 147 | "\xc5\x93" => "\x9c", 148 | 149 | "\xc5\xbe" => "\x9e", 150 | "\xc5\xb8" => "\x9f" 151 | ); 152 | 153 | static function toUTF8($text){ 154 | /** 155 | * Function \ForceUTF8\Encoding::toUTF8 156 | * 157 | * This function leaves UTF8 characters alone, while converting almost all non-UTF8 to UTF8. 158 | * 159 | * It assumes that the encoding of the original string is either Windows-1252 or ISO 8859-1. 160 | * 161 | * It may fail to convert characters to UTF-8 if they fall into one of these scenarios: 162 | * 163 | * 1) when any of these characters: ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞß 164 | * are followed by any of these: ("group B") 165 | * ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶•¸¹º»¼½¾¿ 166 | * For example: %ABREPRESENT%C9%BB. «REPRESENTÉ» 167 | * The "«" (%AB) character will be converted, but the "É" followed by "»" (%C9%BB) 168 | * is also a valid unicode character, and will be left unchanged. 169 | * 170 | * 2) when any of these: àáâãäåæçèéêëìíîï are followed by TWO chars from group B, 171 | * 3) when any of these: ðñòó are followed by THREE chars from group B. 172 | * 173 | * @name toUTF8 174 | * @param string $text Any string. 175 | * @return string The same string, UTF8 encoded 176 | * 177 | */ 178 | 179 | if(is_array($text)) 180 | { 181 | foreach($text as $k => $v) 182 | { 183 | $text[$k] = self::toUTF8($v); 184 | } 185 | return $text; 186 | } 187 | 188 | if(!is_string($text)) { 189 | return $text; 190 | } 191 | 192 | $max = self::strlen($text); 193 | 194 | $buf = ""; 195 | for($i = 0; $i < $max; $i++){ 196 | $c1 = $text[$i]; 197 | if($c1>="\xc0"){ //Should be converted to UTF8, if it's not UTF8 already 198 | $c2 = $i+1 >= $max? "\x00" : $text[$i+1]; 199 | $c3 = $i+2 >= $max? "\x00" : $text[$i+2]; 200 | $c4 = $i+3 >= $max? "\x00" : $text[$i+3]; 201 | if($c1 >= "\xc0" & $c1 <= "\xdf"){ //looks like 2 bytes UTF8 202 | if($c2 >= "\x80" && $c2 <= "\xbf"){ //yeah, almost sure it's UTF8 already 203 | $buf .= $c1 . $c2; 204 | $i++; 205 | } else { //not valid UTF8. Convert it. 206 | $cc1 = (chr(ord($c1) / 64) | "\xc0"); 207 | $cc2 = ($c1 & "\x3f") | "\x80"; 208 | $buf .= $cc1 . $cc2; 209 | } 210 | } elseif($c1 >= "\xe0" & $c1 <= "\xef"){ //looks like 3 bytes UTF8 211 | if($c2 >= "\x80" && $c2 <= "\xbf" && $c3 >= "\x80" && $c3 <= "\xbf"){ //yeah, almost sure it's UTF8 already 212 | $buf .= $c1 . $c2 . $c3; 213 | $i = $i + 2; 214 | } else { //not valid UTF8. Convert it. 215 | $cc1 = (chr(ord($c1) / 64) | "\xc0"); 216 | $cc2 = ($c1 & "\x3f") | "\x80"; 217 | $buf .= $cc1 . $cc2; 218 | } 219 | } elseif($c1 >= "\xf0" & $c1 <= "\xf7"){ //looks like 4 bytes UTF8 220 | if($c2 >= "\x80" && $c2 <= "\xbf" && $c3 >= "\x80" && $c3 <= "\xbf" && $c4 >= "\x80" && $c4 <= "\xbf"){ //yeah, almost sure it's UTF8 already 221 | $buf .= $c1 . $c2 . $c3 . $c4; 222 | $i = $i + 3; 223 | } else { //not valid UTF8. Convert it. 224 | $cc1 = (chr(ord($c1) / 64) | "\xc0"); 225 | $cc2 = ($c1 & "\x3f") | "\x80"; 226 | $buf .= $cc1 . $cc2; 227 | } 228 | } else { //doesn't look like UTF8, but should be converted 229 | $cc1 = (chr(ord($c1) / 64) | "\xc0"); 230 | $cc2 = (($c1 & "\x3f") | "\x80"); 231 | $buf .= $cc1 . $cc2; 232 | } 233 | } elseif(($c1 & "\xc0") === "\x80"){ // needs conversion 234 | if(isset(self::$win1252ToUtf8[ord($c1)])) { //found in Windows-1252 special cases 235 | $buf .= self::$win1252ToUtf8[ord($c1)]; 236 | } else { 237 | $cc1 = (chr(ord($c1) / 64) | "\xc0"); 238 | $cc2 = (($c1 & "\x3f") | "\x80"); 239 | $buf .= $cc1 . $cc2; 240 | } 241 | } else { // it doesn't need conversion 242 | $buf .= $c1; 243 | } 244 | } 245 | return $buf; 246 | } 247 | 248 | static function toWin1252($text, $option = self::WITHOUT_ICONV) { 249 | if(is_array($text)) { 250 | foreach($text as $k => $v) { 251 | $text[$k] = self::toWin1252($v, $option); 252 | } 253 | return $text; 254 | } elseif(is_string($text)) { 255 | return static::utf8_decode($text, $option); 256 | } else { 257 | return $text; 258 | } 259 | } 260 | 261 | static function toISO8859($text, $option = self::WITHOUT_ICONV) { 262 | return self::toWin1252($text, $option); 263 | } 264 | 265 | static function toLatin1($text, $option = self::WITHOUT_ICONV) { 266 | return self::toWin1252($text, $option); 267 | } 268 | 269 | static function fixUTF8($text, $option = self::WITHOUT_ICONV){ 270 | if(is_array($text)) { 271 | foreach($text as $k => $v) { 272 | $text[$k] = self::fixUTF8($v, $option); 273 | } 274 | return $text; 275 | } 276 | 277 | if(!is_string($text)) { 278 | return $text; 279 | } 280 | 281 | $last = ""; 282 | while($last <> $text){ 283 | $last = $text; 284 | $text = self::toUTF8(static::utf8_decode($text, $option)); 285 | } 286 | $text = self::toUTF8(static::utf8_decode($text, $option)); 287 | return $text; 288 | } 289 | 290 | static function UTF8FixWin1252Chars($text){ 291 | // If you received an UTF-8 string that was converted from Windows-1252 as it was ISO8859-1 292 | // (ignoring Windows-1252 chars from 80 to 9F) use this function to fix it. 293 | // See: http://en.wikipedia.org/wiki/Windows-1252 294 | 295 | return str_replace(array_keys(self::$brokenUtf8ToUtf8), array_values(self::$brokenUtf8ToUtf8), $text); 296 | } 297 | 298 | static function removeBOM($str=""){ 299 | if(substr($str, 0,3) === pack("CCC",0xef,0xbb,0xbf)) { 300 | $str=substr($str, 3); 301 | } 302 | return $str; 303 | } 304 | 305 | protected static function strlen($text){ 306 | return (function_exists('mb_strlen') && ((int) ini_get('mbstring.func_overload')) & 2) ? 307 | mb_strlen($text,'8bit') : strlen($text); 308 | } 309 | 310 | public static function normalizeEncoding($encodingLabel) 311 | { 312 | $encoding = strtoupper($encodingLabel); 313 | $encoding = preg_replace('/[^a-zA-Z0-9\s]/', '', $encoding); 314 | $equivalences = array( 315 | 'ISO88591' => 'ISO-8859-1', 316 | 'ISO8859' => 'ISO-8859-1', 317 | 'ISO' => 'ISO-8859-1', 318 | 'LATIN1' => 'ISO-8859-1', 319 | 'LATIN' => 'ISO-8859-1', 320 | 'UTF8' => 'UTF-8', 321 | 'UTF' => 'UTF-8', 322 | 'WIN1252' => 'ISO-8859-1', 323 | 'WINDOWS1252' => 'ISO-8859-1' 324 | ); 325 | 326 | if(empty($equivalences[$encoding])){ 327 | return 'UTF-8'; 328 | } 329 | 330 | return $equivalences[$encoding]; 331 | } 332 | 333 | public static function encode($encodingLabel, $text) 334 | { 335 | $encodingLabel = self::normalizeEncoding($encodingLabel); 336 | if($encodingLabel === 'ISO-8859-1') return self::toLatin1($text); 337 | return self::toUTF8($text); 338 | } 339 | 340 | protected static function utf8_decode($text, $option = self::WITHOUT_ICONV) 341 | { 342 | if ($option == self::WITHOUT_ICONV || !function_exists('iconv')) { 343 | $o = utf8_decode( 344 | str_replace(array_keys(self::$utf8ToWin1252), array_values(self::$utf8ToWin1252), self::toUTF8($text)) 345 | ); 346 | } else { 347 | $o = iconv("UTF-8", "Windows-1252" . ($option === self::ICONV_TRANSLIT ? '//TRANSLIT' : ($option === self::ICONV_IGNORE ? '//IGNORE' : '')), $text); 348 | } 349 | return $o; 350 | } 351 | } 352 | -------------------------------------------------------------------------------- /resources/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "language-name": "English", 3 | "language-selected": "Now selected English.", 4 | 5 | "enabled-console-msg": "Festival now enabled, English selected (adjust with /fe lang ).", 6 | 7 | "cmd-ingameonly-msg": "Festival command only to be used in-game.", 8 | "cmd-unknown-msg": "Unknown Festival command", 9 | "cmd-noperms-msg": "You can not use this Festival command", 10 | "cmd-noperms-subcommand": "You do not have permission to use this subcommand.", 11 | 12 | "pos-select-active": "You're already selecting a position!", 13 | "select-both-pos-first":"Please select 2 coordinates by placing or breaking 2 positions first.", 14 | "pos1": "position 1", 15 | "pos2": "position 2", 16 | "make-pos1": "Please place or break the first position.", 17 | "make-pos2": "Please place or break position 2 to set the longest diagonal in the new cube area.", 18 | "make-radius-distance": "Please place or break position 2 to set the radius for new sphere area.", 19 | "radius-distance-to-position": "Radius distance to position", 20 | "make-diameter-distance": "Please place or break position 2 to set the diameter for new sphere area.", 21 | "diameter-distance-to-position": "Diameter distance to position", 22 | "give-area-name": "Please specify a name for this area. Use: /fe create ", 23 | 24 | "in-unknown-area": "You are in an unknown area", 25 | 26 | "area": "Area", 27 | "areas": "areas", 28 | "level": "level", 29 | "levels": "levels", 30 | "player": "player", 31 | "players": "players", 32 | "the-area": "The area", 33 | "the-level": "The level", 34 | "cube-area-created": "Cube area created!", 35 | "sphere-area-created": "Sphere area created!", 36 | "created-by":"created by", 37 | "area-here": "Area here", 38 | "area-no-area-available": "No area available", 39 | "area-no-area-to-edit": "There are no areas that you can edit", 40 | "area-name-excist": "An area with that name already exists.", 41 | "area-not-excist": "Area does not exist.", 42 | "cannot-be-found": "cannot be found.", 43 | "area-list" : "Area list", 44 | "players-in-area": "players in area", 45 | "area-whitelist": "whitelist", 46 | "area-no-commands": "no commands attached", 47 | "player-has-been-whitelisted": "has been whitelisted in area", 48 | "player-allready-whitelisted": "is allready whitelisted in area", 49 | "player-has-been-unwhitelisted": "has been unwhitelisted from area", 50 | "player-allready-unwhitelisted": "is allready unwhitelisted from area", 51 | "whitelist-specify-action": "Please specify a valid action. Use: /area whitelist for ", 52 | "whitelist-specify-for-area": "Please use 'for' in this command string. Use: /area whitelist for ", 53 | 54 | "area-floating-titles": "Area floating titles", 55 | 56 | "name-saved": "renamed to", 57 | "name-write-usage": "Assign a new name. Use: /fe rename to <..>", 58 | "name-specify-area": "Please specify an area to rename. Use: /fe rename to ", 59 | "name-specify-to-area": "Please use 'to' in this command string. Use: /fe rename to ", 60 | 61 | "desc-saved": "description saved.", 62 | "desc-write-usage": "Please write the description. Use: /fe desc set <..>", 63 | "desc-specify-area": "Please specify an area to edit the description. Use: /fe desc set ", 64 | "desc-specify-set-area": "Please use 'set' in this command string. Use: /fe desc set ", 65 | 66 | "priority-saved": "priority saved.", 67 | "priority-specify-set-area": "Please use 'set' in this command string. Use: /fe priority set ", 68 | "priority-write-usage": "Please assign a number. Use: /fe priority set ", 69 | "priority-number-usage": "Please assign a number, 0 is default, 1 - 999 assigns higher priority. Use: /fe priority set ", 70 | "priority-specify-area": "Please specify an area to edit the priority. Use: /fe priority set ", 71 | 72 | "scaling-height-saved": "area scaling height saved.", 73 | "scaling-floor-saved": "area scaling floor saved.", 74 | "scaling-specify-set-area": "Please use 'up'(top) or 'down'(bottom) in this command string. Use: /fe scale ", 75 | "scaling-write-usage": "Please assign a number. Use: /fe scale ", 76 | "scaling-number-usage": "Please assign a number, 0 is default, 1 - 9998 assigns scaling, 9999 is unlimited. Use: /fe scale ", 77 | "scaling-specify-area": "Please specify an area to edit the scaling (top/bottom). Use: /fe scale ", 78 | 79 | "area-deleted": "Area deleted!", 80 | "deleted-by":"deleted by", 81 | "specify-to-delete":"Please specify an area to delete.", 82 | 83 | "flag": "Flag", 84 | "flags": "flags", 85 | "flag-not-found-list": "Flag not found. (Flag names: hurt, pvp, flight, edit, touch, animals, mobs, effect, msg, pass, drop, tnt, shoot, hunger, perms, fall)", 86 | "flag-not-specified-list": "Please specify a flag. Usage /fe (Flag names: hurt, pvp, flight, edit, touch, animals, mobs, effect, msg, pass, drop, tnt, shoot, hunger, perms, fall)", 87 | "specify-to-flag": "Please specify the area you would like to flag.", 88 | 89 | "tp-to-area-active": "You are teleporting to Area", 90 | "specify-excisting-area-name": "Please specify an existing Area name. (Info: /fe list)", 91 | 92 | "cmd": "command", 93 | "cmds": "commands", 94 | "cmd-id": "Command id", 95 | "cmd-list": "Command list", 96 | "-event": "-event", 97 | "set-for-area": "set for area", 98 | "added-to-area": "added to area", 99 | "allready-used-for": "allready used for", 100 | "allready-set-for-area": "allready set for area", 101 | "edit-id-or-other": ", edit this id or use another id", 102 | "cmd-specify-id-and-command-usage": "Please specify the command ID and command string to add. Use: /fe command ", 103 | "cmd-valid-areaname": "Area not found, please submit a valid name. Use: /fe command .", 104 | 105 | "cmd-id-not-found": "Command ID not found. See the commands with /fe command list'", 106 | "cmd-specify-id-to-delete": "Please specify the command ID to delete. Usage /fe command del ", 107 | "cmd-specify-action": "Please add an action to perform with command. Usage: /fe command .", 108 | 109 | "event": "event", 110 | "event-is-now": "event is now", 111 | "change-failed": "change-failed!", 112 | 113 | "not-available": "not available", 114 | "deleted": "deleted", 115 | "select-and": "and", 116 | "select-in": "in", 117 | "select-yes": "Yes", 118 | "select-no": "No", 119 | "status-on": "on", 120 | "status-off": "off", 121 | "set-to": "set to", 122 | "for-area": "for area", 123 | "number-to-write": "Assign a number", 124 | 125 | "all-players-are-save": "All players are save in this Area!", 126 | "no-pvp-area": "You are in a No-PVP Area!", 127 | "no-flight-area": "NO Flying here!", 128 | "flight-area": "Flying allowed here!", 129 | "no-shoot-area": "NO Shooting here", 130 | 131 | "leaving-area": "leaving", 132 | "enter-area": "enter", 133 | "leaving-center-area": "Leaving the center of area", 134 | "enter-center-area": "Enter the center of area", 135 | "cannot-enter-area": "You can not enter area", 136 | "cannot-leave-area": "You can not leave area", 137 | "enter-barrier-area": "just past a barrier!", 138 | 139 | "option-missing-in-config": "option missing in config.yml, now set to", 140 | "flag-missing-in-config": "flag defaults missing, now set to", 141 | "barrier-is-passage-flag": "Old Barrier config was used, now set to 'false'; please rename 'Barrier' to 'Passage' in config.yml", 142 | "no-is-falldamage-flag": "Old NoFalldamage config was used, now set to 'false'; please rename 'NoFalldamage' to 'Falldamage' in config.yml", 143 | "option-see-configfile": "please see original configs in /resources/config.yml", 144 | 145 | "compass-dir-wsp": "Compass direction set to world spawn point", 146 | "compass-dir-area": "Compass direction set to area ", 147 | "compass-dir-notset": "Direction could not be set on compass", 148 | "compass-inthisworld": "In this world ", 149 | "compass-level-reset": "Compass level reset", 150 | 151 | "ui-compass-title": "Set compass direction", 152 | "ui-compass-use-compass": "Use festival compass directions", 153 | "ui-compass-selected-wsp": "Selected world spawnpoint", 154 | "ui-compass-selected-this": "Selected ", 155 | "ui-compass-not-found": "Selected area could not be found", 156 | "ui-compass-wsp-default": "World spawnpoint (default)", 157 | 158 | "ui-festival-manager": "Festival Manager", 159 | "ui-new-area-setup": "New area setup", 160 | "ui-select-an-option": "Select an option", 161 | "ui-select-area": "Select area", 162 | "ui-go-back": "Go back", 163 | "ui-saved": "saved!", 164 | "ui-new": "new", 165 | "ui-deleted": "deleted!", 166 | "ui-not-found": "not found!", 167 | "ui-try-again": "Try again", 168 | 169 | "ui-area-teleport": "Area Teleport", 170 | "ui-teleport-to-area": "Teleport to Area", 171 | "ui-teleport-select-destination": "Select destination area", 172 | "ui-tp-to-area": "TP to area", 173 | 174 | "ui-area-management": "Area Management", 175 | "ui-area-manager": "Festival Area Manager", 176 | "ui-create-area": "Create new area", 177 | "ui-edit-area-options": "Edit flags & options", 178 | "ui-edit-area-commands": "Edit commands", 179 | "ui-edit-area-whitelist": "Edit whitelist", 180 | "ui-delete-area": "Delete an area", 181 | 182 | "ui-manage-area": "Manage area", 183 | "ui-manage-areas": "Manage area's", 184 | "ui-name": "Name", 185 | "ui-description": "Description", 186 | "ui-priority": "Priority", 187 | "ui-select-edit-area": "Select to edit an area", 188 | "ui-cmd-id-not-found": "Command ID not found! Try again or select another option", 189 | "ui-cmd-empty-not-saved": "Command empty and not saved! Try again or select another option", 190 | 191 | "ui-scale-height": "Scale height", 192 | "ui-scale-floor": "Scale floor", 193 | 194 | "ui-area-maker": "Festival Area Maker", 195 | "ui-select-new-area-type": "Select new area creation type", 196 | "ui-make-cube-diagonal": "Cube Diagonal - select 2 diagonal positions", 197 | "ui-make-sphere-radius": "Sphere Radius - select center and radius distance", 198 | "ui-make-sphere-diameter": "Sphere Diameter - select 2 diameter positions", 199 | "ui-area-name": "Area name", 200 | "ui-area-desc": "Area description", 201 | "ui-new-area-named": "New area named", 202 | "ui-created": "created!", 203 | "ui-tab-pos1-diagonal": "Tab the first diagonal position for new cube area", 204 | "ui-tab-pos1-radius": "Tab the center position for the new sphere area", 205 | "ui-tab-pos1-diameter": "Tab the first diameter position for the new sphere area", 206 | 207 | "ui-manage-area-commands": "Manage area commands", 208 | "ui-area-command-list": "Area command list", 209 | "ui-area-add-command": "Add new or edit command:", 210 | "ui-area-add-command-event": "Add command event type", 211 | "ui-area-add-new-command": "Insert command:", 212 | "ui-area-change-command": "Change/edit command", 213 | "ui-area-type-command-id-change": "Edit cmd id:", 214 | "ui-area-del-command": "Delete command", 215 | "ui-area-type-command-id-del": "Delete cmd id:", 216 | 217 | "ui-manage-area-whitelist": "Manage area whitelist", 218 | "ui-area-whitelist-saved": "Whitelist saved.", 219 | "ui-whitelist-select-area": "Select whitelist area", 220 | "ui-formdate-not-available-try-again": "Form data corrupted or not available, please try again.", 221 | "ui-areaname-allready-used-try-again": "New area name not correct or allready used. Please try another name:", 222 | 223 | "ui-delete-an-area":"Delete an area", 224 | "ui-select-area-delete":"Select area to delete", 225 | "ui-select-to-delete-area":"Select to delete area", 226 | "ui-delete-this-area": "! Delete area", 227 | "ui-gonna-delete-area": "You are going to delete area", 228 | 229 | "ui-level-management": "Level Management", 230 | "ui-manage-levels": "Manage levels", 231 | "ui-level-select": "Level select", 232 | "ui-select-level-edit": "Select level to edit flags", 233 | "ui-level-flag-management": "Manage level flags", 234 | "ui-level": "Level", 235 | "ui-flags-saved": "flagset saved!", 236 | "ui-subtitle-level-options": "Level options:", 237 | "ui-toggle-flag-control": "use level flags", 238 | "ui-subtitle-level-flags": "Level flags:", 239 | 240 | "ui-config-management": "Configuration", 241 | "ui-festival-configuration": "Festival Configuration", 242 | "ui-config-flags-options": "Config Options & default flags", 243 | "ui-config-msg-position": "Area messages position", 244 | "ui-config-msg-visible": "Area messages visible", 245 | "ui-config-floating-titles": "Area floating titles visible", 246 | "ui-config-auto-whitelist": "Auto whitelist", 247 | "ui-config-flight-control": "Flight Control", 248 | "ui-config-action-itemid": "Action item id", 249 | "ui-configs-saved": "Configs saved" 250 | 251 | } 252 | -------------------------------------------------------------------------------- /src/genboy/Festival/Area.php: -------------------------------------------------------------------------------- 1 | name = $name; 47 | $this->desc = $desc; 48 | $this->priority = $priority; 49 | $this->flags = $flags; 50 | $this->pos1 = $pos1; 51 | $this->pos2 = $pos2; 52 | $this->radius = $radius; 53 | $this->top = $top; 54 | $this->bottom = $bottom; 55 | $this->levelName = $levelName; 56 | $this->whitelist = $whitelist; 57 | $this->commands = $commands; 58 | $this->events = $events; 59 | $this->plugin = $plugin; 60 | $this->save(); 61 | } 62 | 63 | /** 64 | * @return str 65 | */ 66 | public function getName() : string { 67 | return $this->name; 68 | } 69 | 70 | /** 71 | * @param str 72 | */ 73 | public function setName( $str ) : string { 74 | $this->name = $str; 75 | return $this->name; 76 | } 77 | 78 | /** 79 | * @return str 80 | */ 81 | public function getDesc() : string { 82 | return $this->desc; 83 | } 84 | 85 | /** 86 | * @param string 87 | */ 88 | public function setDesc( $str ) : string { 89 | $this->desc = $str; 90 | return $this->desc; 91 | } 92 | 93 | 94 | /** 95 | * @param int 96 | */ 97 | public function setPriority( $int ) : int{ 98 | $this->priority = $int; 99 | return $int; 100 | } 101 | /** 102 | * @return int 103 | */ 104 | public function getPriority() : int{ 105 | return $this->priority; 106 | } 107 | 108 | /** 109 | * @return Vector3 110 | */ 111 | public function getFirstPosition() : Vector3{ 112 | return $this->pos1; 113 | } 114 | 115 | /** 116 | * @return Vector3 117 | */ 118 | public function getSecondPosition() : Vector3{ 119 | return $this->pos2; 120 | } 121 | 122 | /** 123 | * @param int 124 | */ 125 | public function setRadius( $int ) : int{ 126 | $this->radius = $int; 127 | return $int; 128 | } 129 | /** 130 | * @return int 131 | */ 132 | public function getRadius() : int{ 133 | return $this->radius; 134 | } 135 | 136 | /** 137 | * @param int 138 | */ 139 | public function setTop( int $int ) : int{ 140 | $this->top = $int; 141 | return $int; 142 | } 143 | /** 144 | * @return int 145 | */ 146 | public function getTop() : int{ 147 | return $this->top; 148 | } 149 | 150 | 151 | /** 152 | * @param int 153 | */ 154 | public function setBottom( $int ) : int{ 155 | $this->bottom = $int; 156 | return $int; 157 | } 158 | /** 159 | * @return int 160 | */ 161 | public function getBottom() : int{ 162 | return $this->bottom; 163 | } 164 | 165 | 166 | /** 167 | * @return string[] 168 | */ 169 | public function getFlags() : array{ 170 | return $this->flags; 171 | } 172 | 173 | /** 174 | * @param string $flag 175 | * @return bool 176 | */ 177 | public function getFlag(string $flag) : bool{ 178 | if(isset($this->flags[$flag])){ 179 | return $this->flags[$flag]; 180 | } 181 | return false; 182 | } 183 | 184 | /** 185 | * @param string $flag 186 | * @param bool $value 187 | * @return bool 188 | */ 189 | public function setFlag(string $flag, bool $value) : bool{ 190 | if(isset($this->flags[$flag])){ 191 | $this->flags[$flag] = $value; 192 | $this->plugin->helper->saveAreas(); 193 | 194 | return true; 195 | } 196 | 197 | return false; 198 | } 199 | 200 | /** 201 | * @return string[] 202 | * @return array 203 | */ 204 | public function getCommands() : array{ 205 | 206 | $arr = []; 207 | if(is_array($this->commands)){ 208 | foreach($this->commands as $id => $cmd){ 209 | if( $cmd != '' && $cmd != ' ' && $cmd != 'null' ){ 210 | $arr[$id] = $cmd; 211 | } 212 | } 213 | } 214 | return $arr; 215 | 216 | } 217 | 218 | /** 219 | * @param string $flag 220 | * @return bool 221 | */ 222 | public function getCommand(string $id) : bool{ 223 | if(isset($this->commands[$id])){ 224 | return $this->commands[$id]; 225 | } 226 | 227 | return false; 228 | } 229 | 230 | 231 | /** 232 | * @return string[] 233 | * @return array 234 | */ 235 | public function getEvents() : array{ 236 | 237 | $arr = []; 238 | if(is_array($this->events)){ 239 | foreach($this->events as $nm => $ids){ 240 | if( $ids != '' && $ids != ' ' && $ids != 'null' ){ 241 | $arr[$nm] = $ids; 242 | } 243 | } 244 | } 245 | 246 | return $arr; 247 | } 248 | 249 | /** 250 | * @return string[] 251 | */ 252 | public function setEvent( string $type, string $cmdid) : array{ 253 | return true; 254 | } 255 | 256 | 257 | /** 258 | * @param Vector3 $pos 259 | * @param string $levelName 260 | * @return bool 261 | */ 262 | public function contains(Vector3 $pos, string $levelName) : bool{ 263 | 264 | // check if area is sphere or cube (given radius) 265 | if( isset( $this->radius ) && $this->radius > 0 && isset( $this->pos1 ) ){ 266 | 267 | // in sphere area 268 | $r = $this->radius; 269 | if( $this->getTop() > 0 || $this->getBottom() > 0){ 270 | 271 | $cy1 = $this->pos1->getY() + $r; 272 | if( $this->getTop() == 9999 ){ 273 | $cy1 = 999999; 274 | }else if( $this->getTop() > 0 ){ 275 | $cy1 = $cy1 + $this->getTop(); 276 | } 277 | $cy2 = $this->pos1->getY() - $r; 278 | if( $this->getBottom() == 9999 ){ 279 | $cy2 = -999999; 280 | }else if( $this->getBottom() > 0 ){ 281 | $cy2 = $cy2 - $this->getBottom(); 282 | } 283 | $distance2d = $this->plugin->get_flat_distance($this->pos1, $pos); 284 | if( $distance2d <= $r && $cy1 >= $pos->getY() && $cy2 <= $pos->getY() ){ 285 | return true; // point outside radius + y height 286 | } 287 | 288 | }else{ 289 | 290 | $distance3d = $this->plugin->get_3d_distance($this->pos1, $pos); 291 | if( $distance3d <= $r ){ 292 | return true; //point in radius 293 | } 294 | } 295 | return false; // point outside radius 296 | 297 | }else if( isset( $this->pos1 ) && isset( $this->pos2 ) ){ 298 | // in cube area 299 | // if scale limit $cy1,$cy2 > 0 300 | $cy1 = max($this->pos1->getY(), $this->pos2->getY()); 301 | if( $this->getTop() == 9999 ){ 302 | $cy1 = 999999; 303 | }else if( $this->getTop() > 0 ){ 304 | $cy1 = max( $this->pos2->getY(), $this->pos1->getY()) + $this->getTop(); 305 | } 306 | $cy2 = min($this->pos1->getY(), $this->pos2->getY()); 307 | if( $this->getBottom() == 9999 ){ 308 | $cy2 = -999999; 309 | }else if( $this->getBottom() > 0 ){ 310 | $cy2 = min( $this->pos2->getY(), $this->pos1->getY()) - $this->getBottom(); 311 | } 312 | 313 | if((min($this->pos1->getX(), $this->pos2->getX()) <= $pos->getX()) 314 | && (max($this->pos1->getX(), $this->pos2->getX()) >= $pos->getX()) 315 | && ($cy2 <= $pos->getY()) //&& (min($this->pos1->getY(), $this->pos2->getY()) <= $pos->getY()) 316 | && ($cy1 >= $pos->getY())//&& (max($this->pos1->getY(), $this->pos2->getY()) >= $pos->getY()) 317 | && (min($this->pos1->getZ(), $this->pos2->getZ()) <= $pos->getZ()) 318 | && (max($this->pos1->getZ(), $this->pos2->getZ()) >= $pos->getZ()) 319 | && strtolower( $this->levelName ) === strtolower( $levelName ) ){ 320 | return true; 321 | } 322 | } 323 | return false; 324 | 325 | } 326 | 327 | 328 | /** 329 | * @param Vector3 $pos 330 | * @param string $levelName 331 | * @return bool 332 | */ 333 | public function centerContains(Vector3 $pos, string $levelName) : bool{ 334 | 335 | if( isset( $this->radius ) && $this->radius > 0 && isset( $this->pos1 ) ){ 336 | // Sphere radius.. 337 | $r = 2; // $this->radius max. 2 blocks from center; 338 | 339 | if( $this->getTop() > 0 || $this->getBottom() > 0){ 340 | 341 | $cy1 = $this->pos1->getY() + $r; 342 | if( $this->getTop() == 9999 ){ 343 | $cy1 = 999999; 344 | }else if( $this->getTop() > 0 ){ 345 | $cy1 = $cy1 + $this->getTop(); 346 | } 347 | $cy2 = $this->pos1->getY() - $r; 348 | if( $this->getBottom() == 9999 ){ 349 | $cy2 = -999999; 350 | }else if( $this->getBottom() > 0 ){ 351 | $cy2 = $cy2 - $this->getBottom(); 352 | } 353 | 354 | $distance2d = $this->plugin->get_flat_distance($this->pos1, $pos); 355 | if( $distance2d <= $r && $cy1 >= $pos->getY() && $cy2 <= $pos->getY() ){ 356 | return true; // point outside radius + y height 357 | } 358 | return false; 359 | 360 | }else{ 361 | 362 | $dis = $this->plugin->get_3d_distance($this->pos1, $pos); 363 | if( $dis <= $r ){ 364 | return true; // point in radius 365 | } 366 | return false; 367 | 368 | } 369 | return false; // point outside radius + -y height 370 | 371 | }else if( isset( $this->pos1 ) && isset( $this->pos2 ) ){ 372 | 373 | // in cube area center 374 | $cx = $this->pos2->getX() + ( ( $this->pos1->getX() - $this->pos2->getX() ) / 2 ); 375 | $cz = $this->pos2->getZ() + ( ( $this->pos1->getZ() - $this->pos2->getZ() ) / 2 ); 376 | 377 | // check y scaling 378 | $cy1 = max($this->pos1->getY(), $this->pos2->getY()); 379 | if( $this->getTop() == 9999 ){ 380 | $cy1 = 999999; 381 | }else if( $this->getTop() > 0 ){ 382 | $cy1 = max( $this->pos2->getY(), $this->pos1->getY()) + $this->getTop(); 383 | } 384 | $cy2 = min($this->pos1->getY(), $this->pos2->getY()); 385 | if( $this->getBottom() == 9999 ){ 386 | $cy2 = -999999; 387 | }else if( $this->getBottom() > 0 ){ 388 | $cy2 = min( $this->pos2->getY(), $this->pos1->getY()) - $this->getBottom(); 389 | } 390 | 391 | $px = $pos->getX(); 392 | $py = $pos->getY(); 393 | $pz = $pos->getZ(); 394 | if( $px >= ($cx - 1) && $px <= ($cx + 1) && $pz >= ($cz - 1) && $pz <= ($cz + 1) && $py >= $cy2 && $py <= $cy1 && strtolower( $this->levelName ) === strtolower( $levelName ) ){ 395 | return true; 396 | } 397 | return false; 398 | 399 | } 400 | return false; 401 | 402 | } 403 | 404 | 405 | /** 406 | * @param string $flag 407 | * @return bool 408 | */ 409 | public function toggleFlag(string $flag) : bool{ 410 | if(isset($this->flags[$flag])){ 411 | $this->flags[$flag] = !$this->flags[$flag]; 412 | $this->plugin->helper->saveAreas(); 413 | return $this->flags[$flag]; 414 | } 415 | return false; 416 | } 417 | 418 | /** 419 | * @return string 420 | */ 421 | public function getLevelName() : string{ 422 | return $this->levelName; 423 | } 424 | 425 | /** 426 | * @return null|Level 427 | */ 428 | public function getLevel() : ?Level{ 429 | return $this->plugin->getServer()->getLevelByName($this->levelName); 430 | } 431 | 432 | /** 433 | * @param string $playerName 434 | * @return bool 435 | */ 436 | public function isWhitelisted(string $playerName) : bool{ 437 | if(in_array($playerName, $this->whitelist)){ 438 | return true; 439 | } 440 | return false; 441 | } 442 | 443 | /** 444 | * @param string $name 445 | * @param bool $value 446 | * @return bool 447 | */ 448 | public function setWhitelisted(string $name, bool $value = true) : bool{ 449 | if($value){ 450 | if(!in_array($name, $this->whitelist)){ 451 | $this->whitelist[] = $name; 452 | $this->plugin->helper->saveAreas(); 453 | 454 | return true; 455 | } 456 | }else{ 457 | if(in_array($name, $this->whitelist)){ 458 | $key = array_search($name, $this->whitelist); 459 | array_splice($this->whitelist, $key, 1); 460 | $this->plugin->helper->saveAreas(); 461 | 462 | return true; 463 | } 464 | } 465 | return false; 466 | } 467 | 468 | /** 469 | * @return string[] 470 | */ 471 | public function getWhitelist() : array{ 472 | return $this->whitelist; 473 | } 474 | 475 | public function delete() : void{ 476 | unset($this->plugin->areas[$this->getName()]); 477 | $this->plugin->helper->saveAreas(); 478 | } 479 | 480 | public function save() : void{ 481 | $this->plugin->areas[$this->name] = $this; 482 | } 483 | } 484 | -------------------------------------------------------------------------------- /resources/pl.json: -------------------------------------------------------------------------------- 1 | { 2 | "language-name": "Polski", 3 | "language-selected": "Teraz wybrany Polski.", 4 | 5 | "enabled-console-msg": "Festival jest teraz włączony, wybrany Polski (dostosuj za pomocą /fe lang ).", 6 | 7 | "cmd-ingameonly-msg": "Polecenie Festival używane tylko w grze.", 8 | "cmd-unknown-msg": "Nieznane polecenie Festival", 9 | "cmd-noperms-msg": "Nie możesz użyć tego polecenia Festival", 10 | "cmd-noperms-subcommand": "Nie masz uprawnień do używania tej podkomendy.", 11 | 12 | "pos-select-active": "Już wybrałeś pozycję!", 13 | "select-both-pos-first":"Najpierw wybierz obie pozycje.", 14 | "pos1": "Pozycja 1", 15 | "pos2": "Pozycja 2", 16 | "make-pos1": "Połóż albo zniszcz pierwszą pozycję.", 17 | "make-pos2": "Połóż albo zniszcz drugą pozycję.", 18 | "make-radius-distance": "Przerwij lub umieść blok, aby określić duży promień.", 19 | "radius-distance-to-position": "Odległość promienia do pozycji", 20 | "make-diameter-distance": "Please place or break to select the diameter direction and distance.", 21 | "diameter-distance-to-position": "Diameter distance to position", 22 | "give-area-name": "Podaj nazwę dla tego obszaru.", 23 | 24 | "in-unknown-area": "Jesteś w nieznanym obszarze", 25 | 26 | "area": "Obszar", 27 | "areas": "obszary", 28 | "level": "poziom", 29 | "levels": "poziomy", 30 | "player": "gracz", 31 | "players": "gracze", 32 | "the-area": "Strefa", 33 | "the-level": "Poziom", 34 | "cube-area-created": "Wykonano obszar kostki!", 35 | "sphere-area-created": "Wykonano obszar sfery!", 36 | "created-by":"utworzony przez", 37 | "area-here": "Obszar tutaj", 38 | "area-no-area-available": "Brak dostępnego obszaru", 39 | "area-no-area-to-edit": "Nie ma obszarów które można edytować", 40 | "area-name-excist": "Obszar o tej nazwie już istnieje.", 41 | "area-not-excist": "Obszar nie istnieje.", 42 | "cannot-be-found": "nie może zostać znaleziony.", 43 | "area-list" : "Lista obszarów", 44 | "players-in-area": "gracze w okolicy", 45 | "area-whitelist": "biała lista", 46 | "area-no-commands": "brak dołączonych poleceń", 47 | "player-has-been-whitelisted": "został dodany do białej listy w tym obszarze", 48 | "player-allready-whitelisted": "jest już na białej liście w tym obszarze", 49 | "player-has-been-unwhitelisted": "został usunięty z obszaru", 50 | "player-allready-unwhitelisted": "już został usunięty z obszaru", 51 | "whitelist-specify-action": "Podaj prawidłowe działanie. Stosowanie: /area whitelist for ", 52 | "whitelist-specify-for-area": "Użyj 'for' w tym ciągu poleceń. Stosowanie: /area whitelist for ", 53 | 54 | "area-floating-titles": "Terenowe tytuły pływające", 55 | 56 | "name-saved": "zmieniono nazwę na", 57 | "name-write-usage": "Przypisz nową nazwę. Stosowanie: /fe rename to <..>", 58 | "name-specify-area": "Określ obszar do edycji nazwy. Stosowanie: /fe rename to ", 59 | "name-specify-to-area": "Użyj 'to' w tym ciągu poleceń. Stosowanie: /fe rename to ", 60 | 61 | "desc-saved": "opis zapisany.", 62 | "desc-write-usage": "Zapisz opis. Stosowanie: /fe desc set <..>", 63 | "desc-specify-area": "Określ obszar do edycji opisu. Stosowanie: /fe desc set ", 64 | "desc-specify-set-area": "Użyj 'set' w tym ciągu poleceń. Stosowanie: /fe desc set ", 65 | 66 | "priority-saved": "priorytet zapisany.", 67 | "priority-specify-set-area": "Użyj 'set' w tym ciągu poleceń. Stosowanie: /fe priority set ", 68 | "priority-write-usage": "Proszę przypisać numer. Stosowanie: /fe priority set ", 69 | "priority-number-usage": "Proszę przypisać numer, 0 jest domyślne, 1 - 999 przypisuje wyższy priorytet. Stosowanie: /fe priority set ", 70 | "priority-specify-area": "Określ obszar do edycji priorytetu. Stosowanie: /fe priority set", 71 | 72 | "scaling-height-saved": "zapisana wysokość skalowania obszaru.", 73 | "scaling-floor-saved": "obszar skalowania podłogi zapisany.", 74 | "scaling-specify-set-area": "Użyj 'up' (góra) lub 'down' (dół) w tym ciągu poleceń. Posługiwać się: /fe scale ", 75 | "scaling-write-usage": "Proszę przypisać numer. Posługiwać się: /fe scale ", 76 | "scaling-number-usage": "Proszę przypisać numer, 0 jest domyślny, 1 - 9998 przypisuje skalowanie, 9999 jest nieograniczone. Posługiwać się: /fe scale ", 77 | "scaling-specify-area": "Określ obszar do edycji skalowania (góra/dół). Posługiwać się: /fe scale ", 78 | 79 | "area-deleted": "Obszar usunięty!", 80 | "deleted-by":"usunięte przez", 81 | "specify-to-delete":"określ obszar do usunięcia.", 82 | 83 | "flag": "Flaga", 84 | "flags": "flagi", 85 | "flag-not-found-list": "Nie znaleziono flagi. (Flagi: god, pvp, flight, edit, touch, animals, mobs, effects, msg, passage, drop, tnt, shoot, hunger, perms, falldamage)", 86 | "flag-not-specified-list": "określ flagę. (Flagi: god, pvp, flight, edit, touch, animals, mobs, effects, msg, passage, drop, tnt, shoot, hunger, perms, falldamage)", 87 | "specify-to-flag": "określ obszar, który chcesz oznaczyć.", 88 | 89 | "tp-to-area-active": "Teleportuję do obszaru", 90 | "specify-excisting-area-name": "prosze określ istniejącą nazwę obszaru.", 91 | 92 | "cmd": "komenda", 93 | "cmds": "komendy", 94 | "cmd-id": "ID komendy", 95 | "cmd-list": "Lista komend", 96 | "-event": "-wydarzenie", 97 | "set-for-area": "ustawiono dla obszaru", 98 | "added-to-area": "dodano do obszaru", 99 | "allready-used-for": "już używane przez", 100 | "allready-set-for-area": "już ustawiony dla tego obszaru", 101 | "edit-id-or-other": ", edytuj to id lub użyj innego id", 102 | "cmd-specify-id-and-command-usage": "prosze wprowadź id komendy i treść komendy do dodania. Stosowanie: /fe command add ", 103 | "cmd-valid-areaname": "Nie znaleziono obszaru, podaj poprawną nazwę. Stosowanie: /fe command .", 104 | 105 | "cmd-id-not-found": "Identyfikator komendy nie został znaleziony. Zobacz polecenia za pomocą /fe event command list'", 106 | "cmd-specify-id-to-delete": "prosze Wprowadź id komendy, którą chcesz usunąć. Stosowanie /fe event command del ", 107 | "cmd-specify-action": "prosze dodaj akcję do wykonania poleceniem. Stosowanie: /fe command .", 108 | 109 | "event": "zdarzenie", 110 | "event-is-now": "wydarzenie jest teraz", 111 | "change-failed": "zmiana nie powiodła się!", 112 | 113 | "not-available": "niedostępne", 114 | "deleted": "usunięte", 115 | "select-and": "i", 116 | "select-in": "w", 117 | "select-yes": "Tak", 118 | "select-no": "Nie", 119 | "status-on": "włączony", 120 | "status-off": "wyłączony", 121 | "set-to": "ustawione na", 122 | "for-area": "dla obszaru", 123 | "number-to-write": "Assign a number", 124 | 125 | "all-players-are-save": "Wszyscy gracze są zapisywani w tym obszarze!", 126 | "no-pvp-area": "Jesteś w obszarze bez PVP!", 127 | "no-flight-area": "Nie ma Latania!", 128 | "flight-area": "Latanie tutaj dozwolone!", 129 | "no-shoot-area": "NO Strzelanie tutaj", 130 | 131 | "leaving-area": "opuszczasz", 132 | "enter-area": "wchodzisz", 133 | "leaving-center-area": "Opuszczasz środek obszaru", 134 | "enter-center-area": "Wprowadź środek obszaru", 135 | "cannot-enter-area": "Nie możesz wejść do obszaru", 136 | "cannot-leave-area": "Nie możesz opuścić obszaru", 137 | "enter-barrier-area": "właśnie mijasz barierę!", 138 | 139 | "option-missing-in-config": "brak opcji w config.yml, teraz ustawiona na", 140 | "flag-missing-in-config": "brak domyślnych flag, teraz ustawiony na", 141 | "barrier-is-passage-flag": "Użyto konfiguracji Starej Bariery, teraz ustawionej na 'false'; prosze zmienić nazwę 'Barrier' na 'Passage' w config.yml", 142 | "no-is-falldamage-flag": "Użyto starej konfiguracji NoFalldamage, teraz ustawionej na 'false'; prosze zmienić nazwę 'NoFalldamage' na 'Falldamage' w config.yml", 143 | "option-see-configfile": "prosze zobaczyć oryginalne ustawienia w /resources/config.yml", 144 | 145 | "compass-dir-wsp": "Kierunek kompasu ustawiony na świat spawnpoint", 146 | "compass-dir-area": "Kierunek kompasu ustawiony na obszar ", 147 | "compass-dir-notset": "Nie można ustawić kierunku kompasu", 148 | "compass-inthisworld": "Na tym świecie ", 149 | "compass-level-reset": "Resetowanie poziomu kompasu", 150 | 151 | "ui-compass-title": "Ustaw kierunek kompasu", 152 | "ui-compass-use-compass": "Użyj kierunków kompasu festiwalu", 153 | "ui-compass-selected-wsp": "Wybrany świat spawnpoint", 154 | "ui-compass-selected-this": "Wybrany ", 155 | "ui-compass-not-found": "Nie można znaleźć wybranego obszaru", 156 | "ui-compass-wsp-default": "Świat spawnpoint (domyślnie)", 157 | 158 | "ui-festival-manager": "Festival Manager", 159 | "ui-new-area-setup": "Nowa konfiguracja obszaru", 160 | "ui-select-an-option": "Wybierz opcję", 161 | "ui-select-area": "Wybierz obszar", 162 | "ui-go-back": "Wróć", 163 | "ui-saved": "zapisany!", 164 | "ui-new": "Nowy", 165 | "ui-deleted": "usunięte!", 166 | "ui-not-found": "nie znaleziono!", 167 | "ui-try-again": "Spróbuj ponownie", 168 | 169 | "ui-area-teleport": "Teleportacja obszarowa", 170 | "ui-teleport-to-area": "Teleportuj do obszaru", 171 | "ui-teleport-select-destination": "Wybierz obszar docelowy", 172 | "ui-tp-to-area": "TP do obszaru", 173 | 174 | "ui-area-management": "Zarządzanie obszarem", 175 | "ui-area-manager": "Kierownik Festival", 176 | "ui-create-area": "Utwórz nowy obszar", 177 | "ui-edit-area-options": "Edytuj flagi i opcje", 178 | "ui-edit-area-commands": "Edytuj polecenia", 179 | "ui-edit-area-whitelist": "Edytuj białą listę", 180 | "ui-delete-area": "Usuń obszar", 181 | 182 | "ui-manage-area": "Zarządzaj obszarem", 183 | "ui-manage-areas": "Zarządzaj obszarami", 184 | "ui-name": "Imię", 185 | "ui-description": "Opis", 186 | "ui-priority": "Priorytet", 187 | "ui-select-edit-area": "Wybierz, aby edytować obszar", 188 | "ui-cmd-id-not-found": "Nie znaleziono ID polecenia! Spróbuj ponownie lub wybierz inną opcję", 189 | "ui-cmd-empty-not-saved": "Polecenie puste i nie zapisane! Spróbuj ponownie lub wybierz inną opcję", 190 | 191 | "ui-scale-height": "Wysokość skali", 192 | "ui-scale-floor": "Skaluj podłogę", 193 | 194 | "ui-area-maker": "Ekspresowy obszar Festival", 195 | "ui-select-new-area-type": "Wybierz nowy typ tworzenia obszaru", 196 | "ui-make-cube-diagonal": "Przekątna kostki - wybierz 2 pozycje po przekątnej", 197 | "ui-make-sphere-radius": "Promień kuli - wybierz odległość środka i promienia", 198 | "ui-make-sphere-diameter": "Średnica kuli - wybierz 2 pozycje średnicy", 199 | "ui-area-name": "Nazwa obszaru", 200 | "ui-area-desc": "Opis obszaru", 201 | "ui-new-area-named": "Nowa nazwa obszaru", 202 | "ui-created": "stworzony!", 203 | "ui-tab-pos1-diagonal": "Tab pierwszej pozycji przekątnej dla nowego obszaru kostki", 204 | "ui-tab-pos1-radius": "Tab środkowa pozycja nowego obszaru kuli", 205 | "ui-tab-pos1-diameter": "Tab pierwsze położenie średnicy dla nowego obszaru sfery", 206 | 207 | "ui-manage-area-commands": "Zarządzaj poleceniami obszaru", 208 | "ui-area-command-list": "Lista poleceń obszaru", 209 | "ui-area-add-command": "Dodaj nowe lub edytuj polecenie:", 210 | "ui-area-add-command-event": "Dodaj typ zdarzenia komendy", 211 | "ui-area-add-new-command": "Wstaw polecenie:", 212 | "ui-area-change-command": "Polecenie Zmień / edytuj", 213 | "ui-area-type-command-id-change": "Edytuj identyfikator cmd:", 214 | "ui-area-del-command": "Usuń polecenie", 215 | "ui-area-type-command-id-del": "Usuń identyfikator cmd:", 216 | 217 | "ui-manage-area-whitelist": "Zarządzaj białą listą obszarów", 218 | "ui-area-whitelist-saved": "Zapisano białą listę.", 219 | "ui-whitelist-select-area": "Wybierz obszar białej listy", 220 | "ui-formdate-not-available-try-again": "Dane formularza są uszkodzone lub niedostępne. Spróbuj ponownie.", 221 | "ui-areaname-allready-used-try-again": "Nowa nazwa obszaru nie jest poprawna lub jest już używana. Proszę spróbować innej nazwy:", 222 | 223 | "ui-delete-an-area":"Usuń obszar", 224 | "ui-select-area-delete":"Wybierz obszar do usunięcia", 225 | "ui-select-to-delete-area":"Wybierz, aby usunąć obszar", 226 | "ui-delete-this-area": "! Usuń obszar", 227 | "ui-gonna-delete-area": "Zamierzasz usunąć obszar", 228 | 229 | "ui-level-management": "Zarządzanie poziomem", 230 | "ui-manage-levels": "Zarządzaj poziomami", 231 | "ui-level-select": "Wybrany poziom", 232 | "ui-select-level-edit": "Wybierz poziom, aby edytować flagi", 233 | "ui-level-flag-management": "Zarządzaj flagami poziomów", 234 | "ui-level": "Poziom", 235 | "ui-flags-saved": "zestaw flagowy zapisany!", 236 | "ui-subtitle-level-options": "Opcje poziomu:", 237 | "ui-toggle-flag-control": "użyj zestawu flag poziomu", 238 | "ui-subtitle-level-flags": "Flagi poziomu:", 239 | 240 | "ui-config-management": "Konfiguracja", 241 | "ui-festival-configuration": "Konfiguracja Festival", 242 | "ui-config-flags-options": "Opcje konfiguracji i flagi domyślne", 243 | "ui-config-msg-position": "Pozycja wiadomości obszaru", 244 | "ui-config-msg-visible": "Komunikaty obszaru widoczne", 245 | "ui-config-floating-titles": "Widoczne pływające tytuły obszaru", 246 | "ui-config-auto-whitelist": "Automatyczna biała lista", 247 | "ui-config-flight-control": "Kontrola lotów", 248 | "ui-config-action-itemid": "Identyfikator elementu akcji", 249 | "ui-configs-saved": "Zapisane konfig" 250 | } 251 | -------------------------------------------------------------------------------- /resources/nl.json: -------------------------------------------------------------------------------- 1 | { 2 | "language-name": "Nederlands", 3 | "language-selected": "Nederlands geselecteerd.", 4 | 5 | "enabled-console-msg": "Festival opgestart, Nederlands geselecteerd (pas aan met /fe lang )", 6 | 7 | "cmd-ingameonly-msg": "Commando alleen voor gebruik in het spel.", 8 | "cmd-unknown-msg": "Onbekend Festival commando", 9 | "cmd-noperms-msg": "Je kunt dit commando niet gebruiken", 10 | "cmd-noperms-subcommand": "Je hebt geen toestemming om dit subcommando te gebruiken.", 11 | 12 | "pos-select-active": "Je bent al een coordinaat aan het selecteren!", 13 | "select-both-pos-first":"Je moet eerst allebei de coordinaten selecteren.", 14 | "pos1": "coordinaat 1", 15 | "pos2": "coordinaat 2", 16 | "make-pos1": "Breek of plaats een blok voor het eerste coordinaat.", 17 | "make-pos2": "Breek of plaats a.u.b. positie 2 voor de langste diagonaal in het nieuwe kubus gebied.", 18 | "make-radius-distance": "Breek of plaats a.u.b. positie 2 voor de radius maat van het nieuwe bol gebied.", 19 | "radius-distance-to-position": "Radius afstand tot positie", 20 | "make-diameter-distance": "Breek of plaats a.u.b. positie 2 voor de diameter maat van het nieuwe bol gebied.", 21 | "diameter-distance-to-position": "Diameter afstand tot positie", 22 | "give-area-name": "Geef het gebied een naam. Gebruik: /fe create ", 23 | 24 | "in-unknown-area": "Je ben in onbekend gebied", 25 | 26 | "area": "gebied", 27 | "areas": "gebieden", 28 | "level": "level", 29 | "levels": "levels", 30 | "player": "speler", 31 | "players": "spelers", 32 | "the-area": "Het gebied", 33 | "the-level": "Het level", 34 | "cube-area-created": "Kubus gebied gemaakt!", 35 | "sphere-area-created": "Bol gebied gemaakt!", 36 | "created-by":"gemaakt door", 37 | "area-here": "Gebied hier", 38 | "area-no-area-available": "Geen gebied beschikbaar", 39 | "area-no-area-to-edit": "Er zijn geen gebieden die je kunt bewerken", 40 | "area-name-excist": "Een gebied met die naam bestaat al.", 41 | "area-not-excist": "Gebied bestaat niet.", 42 | "cannot-be-found": "kan niet gevonden worden.", 43 | "area-list" : "Lijst met gebieden", 44 | "players-in-area": "spelers in gebied", 45 | "area-whitelist": "whitelist", 46 | "area-no-commands": "geen commando's gekoppeld", 47 | "player-has-been-whitelisted": "is whitelisted in gebied", 48 | "player-allready-whitelisted": "is al whitelisted in gebied", 49 | "player-has-been-unwhitelisted": "is unwhitelisted van gebied", 50 | "player-allready-unwhitelisted": "is al unwhitelisted van gebied", 51 | "whitelist-specify-action": "Geef een actie op. Gebruik: /area whitelist for ", 52 | "whitelist-specify-for-area": "Gebruik a.u.b. 'for' in deze commando regel. Gebruik: /area whitelist for ", 53 | 54 | "area-floating-titles": "Zwevende gebiedsnamen", 55 | 56 | "name-saved": "naam aangepast naar", 57 | "name-write-usage": "Schrijf de nieuwe naam. Gebruik: /fe rename to <..>", 58 | "name-specify-area": "Geef een gebied aan om de naam aan te passen. Gebruik: /fe rename to ", 59 | "name-specify-to-area": "Gebruik a.u.b. 'to' in deze commando regel. Gebruik: /fe rename to ", 60 | 61 | "desc-saved": "omschrijving opgeslagen.", 62 | "desc-write-usage": "Schrijf a.u.b. de beschrijving. Gebruik /fe desc set <..>", 63 | "desc-specify-area": "Geef a.u.b. een gebied aan om de omschrijving aan te passen. Gebruik: /fe desc set ", 64 | "desc-specify-set-area": "Gebruik a.u.b. 'set' in deze commando regel. Gebruik: /fe desc set ", 65 | 66 | "priority-saved": "prioriteit opgeslagen.", 67 | "priority-specify-set-area": "Gebruik a.u.b. 'set' in deze commando regel. Gebruik: /fe priority set ", 68 | "priority-write-usage": "Geef a.u.b. een nummer op. Gebruik: /fe priority set ", 69 | "priority-number-usage": "Geef a.u.b. een nummer op, 0 is default, 1 - 999 geeft hogere prioriteit. Gebruik /fe priority set ", 70 | "priority-specify-area": "Geef a.u.b. een gebied aan om de prioriteit aan te passen. Gebruik: /fe priority set ", 71 | 72 | "scaling-height-saved": "area scaling height saved.", 73 | "scaling-floor-saved": "area scaling floor saved.", 74 | "scaling-specify-set-area": "Please use 'up'(top) or 'down'(bottom) in this command string. Use: /fe scale ", 75 | "scaling-write-usage": "Please assign a number. Use: /fe scale ", 76 | "scaling-number-usage": "Please assign a number, 0 is default, 1 - 9998 assigns scaling, 9999 is unlimited. Use: /fe scale ", 77 | "scaling-specify-area": "Please specify an area to edit the scaling (top/bottom). Use: /fe scale ", 78 | 79 | "area-deleted": "Gebied verwijderd!", 80 | "deleted-by":"verwijderd door", 81 | "specify-to-delete":"Geef de naam van het gebied aan om te verwijderen. (zie /fe list)", 82 | 83 | "flag": "Flag", 84 | "flags": "flaggen", 85 | "flag-not-found-list": "Flag niet gevonden. (Flaggen: god, pvp, flight, edit, touch, animals, mobs, effects, msg, passage, drop, tnt, shoot, hunger, perms, falldamage)", 86 | "flag-not-specified-list": "Specificeer a.u.b. een vlag. Gebruik: /fe (Flaggen: god, pvp, flight, edit, touch, animals, mobs, effects, msg, passage, drop, tnt, shoot, hunger, perms, falldamage)", 87 | "specify-to-flag": "Geef a.u.b. de naam van het gebied op om te vlaggen.", 88 | 89 | "tp-to-area-active": "Je teleporteerd naar gebied", 90 | "specify-excisting-area-name": "Geef a.u.b. een bestaande naam van een gebied. (Info: /fe list)", 91 | 92 | "cmd": "Commando", 93 | "cmds": "Commando's", 94 | "cmd-id": "Commanod id", 95 | "cmd-list": "Commando lijst", 96 | "-event": "-event", 97 | "set-for-area": "gebruikt vor gebied", 98 | "added-to-area": "toegevoegd aan gebied", 99 | "allready-used-for": "al in gebruik voor", 100 | "allready-set-for-area": "al toegevoegd aan gebied", 101 | "edit-id-or-other": ", bewerk deze id of bewerk een andere id", 102 | "cmd-specify-id-and-command-usage": "Geef een uniek id en comando regel om toe te voegen. Gebruik: /fe command ", 103 | "cmd-valid-areaname": "Gebied niet gevonden, geef een bestaande naam op. Gebruik: /fe command .", 104 | 105 | "cmd-id-not-found": "Comando ID niet gevonden. Bekijk de comando's met /fe command list", 106 | "cmd-specify-id-to-delete": "Geef het comando ID om het te verwijderen. Gebruik /fe command del ", 107 | "cmd-specify-action": "Voeg een actie toe voor het comando. Geruik: /fe command .", 108 | 109 | "event": "event", 110 | "event-is-now": "event is nu", 111 | "change-failed": "change-failed!", 112 | 113 | "not-available": "niet beschikbaar", 114 | "deleted": "verwijderd", 115 | "select-and": "en", 116 | "select-in": "in", 117 | "select-yes": "Ja", 118 | "select-no": "Nee", 119 | "status-on": "aan", 120 | "status-off": "uit", 121 | "set-to": "aangepast naar", 122 | "for-area": "voor gebied", 123 | "number-to-write": "Geef een nummer op", 124 | 125 | "all-players-are-save": "Alle spelers zijn veilig in dit gebied!", 126 | "no-pvp-area": "Dit is geen PVP area!", 127 | "no-flight-area": "Vliegen is hier niet toegestaan!", 128 | "flight-area": "Vliegen is hier toegestaan!", 129 | "no-shoot-area": "NIET schieten hier", 130 | 131 | "leaving-area": "verlaat", 132 | "enter-area": "betreedt", 133 | "leaving-center-area": "Verlaat het midden van gebied", 134 | "enter-center-area": "Betreedt het midden van gebied", 135 | "cannot-enter-area": "Je kunt dit gebied niet betreden", 136 | "cannot-leave-area": "Je kunt dit gebied niet verlaten", 137 | "enter-barrier-area": "passeerde net een grens van een geblokeerd gebied!", 138 | 139 | "option-missing-in-config": "option niet ingevuld in config.yml, nu ingevuld als", 140 | "flag-missing-in-config": "vlag defaults niet ingevuld, nu ingevuld als", 141 | "barrier-is-passage-flag": "Oude barrier config werd gebruikt, nu ingevuld als 'false'; a.u.b. hernoem 'Barrier' naar 'pass' in config.yml", 142 | "no-is-falldamage-flag": "Oude NoFalldamage config werd gebruikt, nu ingevuld als 'false'; a.u.b. hernoem'NoFalldamage' naar 'fall' in config.yml", 143 | "option-see-configfile": "a.u.b. bekijk de originele configuratie in /resources/config.yml", 144 | 145 | "compass-dir-wsp": "Compas gericht naar world spawnpoint", 146 | "compass-dir-area": "Compas gericht naar gebied ", 147 | "compass-dir-notset": "De compass richting kan niet aangepast worden", 148 | "compass-inthisworld": "In deze wereld ", 149 | "compass-level-reset": "Compas level reset", 150 | 151 | "ui-compass-title": "Compas richting aanpassen", 152 | "ui-compass-use-compass": "Gebruik festival compas richting", 153 | "ui-compass-selected-wsp": "World spawnpoint geselecteerd", 154 | "ui-compass-selected-this": "Geselecteerd: ", 155 | "ui-compass-not-found": "Geselecteerde gebied is niet gevonden", 156 | "ui-compass-wsp-default": "World spawnpoint (default)", 157 | 158 | "ui-festival-manager": "Festival Beheer", 159 | "ui-new-area-setup": "Nieuw gebied maken", 160 | "ui-select-an-option": "Kies een optie", 161 | "ui-select-area": "Selecteer gebied", 162 | "ui-go-back": "Ga terug", 163 | "ui-saved": "opgeslagen!", 164 | "ui-new": "nieuw", 165 | "ui-deleted": "verwijderd!", 166 | "ui-not-found": "niet gevonden!", 167 | "ui-try-again": "Probeer opnieuw", 168 | 169 | "ui-area-teleport": "Gebied Teleport", 170 | "ui-teleport-to-area": "Teleport naar gebied", 171 | "ui-teleport-select-destination": "Selecteer doel gebied", 172 | "ui-tp-to-area": "TP naar gebeid", 173 | 174 | "ui-area-management": "Gebied Beheer", 175 | "ui-area-manager": "Festival gebied beheer", 176 | "ui-create-area": "Maak nieuw gebied", 177 | "ui-edit-area-options": "Bewerk flaggen & opties", 178 | "ui-edit-area-commands": "Bewerk commando's", 179 | "ui-edit-area-whitelist": "Bewerk whitelist", 180 | "ui-delete-area": "Verwijder een gebied", 181 | 182 | "ui-manage-area": "Beheer gebied", 183 | "ui-manage-areas": "Beheer gebieden", 184 | "ui-name": "Naam", 185 | "ui-description": "Omschrijving", 186 | "ui-priority": "Prioriteit", 187 | "ui-select-edit-area": "Selecteer om een gebied te beheren", 188 | "ui-cmd-id-not-found": "Commando ID niet gevonden! Probeer opnieuw of selecteer een andere optie", 189 | "ui-cmd-empty-not-saved": "Commando is leeg en niet bewaard! Probeer opnieuw of selecteer een andere optie", 190 | 191 | "ui-scale-height": "Naar boven oprekken", 192 | "ui-scale-floor": "Naar beneden oprekken", 193 | 194 | "ui-area-maker": "Festival gebied maker", 195 | "ui-select-new-area-type": "Selecteer nieuw gebied soort", 196 | "ui-make-cube-diagonal": "Kubus Diagonaal - selecteer 2 diagonaal posities", 197 | "ui-make-sphere-radius": "Bol Radius - selecteer midden en radius afstand", 198 | "ui-make-sphere-diameter": "Bol Diameter - select 2 diameter posities", 199 | "ui-area-name": "Gebied naame", 200 | "ui-area-desc": "Gebied omschrijving", 201 | "ui-new-area-named": "Nieuw gebied genaamd", 202 | "ui-created": "opgeslagen!", 203 | "ui-tab-pos1-diagonal": "Tab de eerste diagonal positie voor nieuw kubus gebied", 204 | "ui-tab-pos1-radius": "Tab de midden positie voor nieuw bol gebied", 205 | "ui-tab-pos1-diameter": "Tab de eerste diameter positie voor nieuw bol gebied", 206 | 207 | "ui-manage-area-commands": "Beheer gebied commando's", 208 | "ui-area-command-list": "Gebied commando lijst", 209 | "ui-area-add-command": "Commando toevoegen of bewerken:", 210 | "ui-area-add-command-event": "Selecteer commando event type:", 211 | "ui-area-add-new-command": "Type commando:", 212 | "ui-area-change-command": "Bewerk commando", 213 | "ui-area-type-command-id-change": "Bewerk cmd id:", 214 | "ui-area-del-command": "Verwijder commando", 215 | "ui-area-type-command-id-del": "Verwijder cmd id:", 216 | 217 | "ui-manage-area-whitelist": "Beheer gebied whitelist", 218 | "ui-area-whitelist-saved": "Whitelist opgeslagen.", 219 | "ui-whitelist-select-area": "Selecteer whitelist gebied", 220 | "ui-formdate-not-available-try-again": "Invoer ongeldig of niet beschikbaar, probeer a.u.b. opnieuw.", 221 | "ui-areaname-allready-used-try-again": "Nieuwe naam gebied niet correct of bestaat al. Probeer a.u.b. een andere naam:", 222 | 223 | "ui-delete-an-area":"Verwijder een gebied", 224 | "ui-select-area-delete":"Selecteer een gebied om te verwijderen", 225 | "ui-select-to-delete-area":"Selecteer om gebied te verwijderen", 226 | "ui-delete-this-area": "! Verwijder gebied", 227 | "ui-gonna-delete-area": "Verwijder gebied", 228 | 229 | "ui-level-management": "Level beheer", 230 | "ui-manage-levels": "Beheer levels", 231 | "ui-level-select": "Level selectie", 232 | "ui-select-level-edit": "Selecteer level om te beheren", 233 | "ui-level-flag-management": "Beheer level vlaggen", 234 | "ui-level": "Level", 235 | "ui-flags-saved": "vlaggenset opgeslagen!", 236 | "ui-subtitle-level-options": "Level opties:", 237 | "ui-toggle-flag-control": "gebruik level vlaggenset", 238 | "ui-subtitle-level-flags": "Level vlaggen:", 239 | 240 | "ui-config-management": "Configuratie", 241 | "ui-festival-configuration": "Festival Configuratie", 242 | "ui-config-flags-options": "Configuratie opties & default vlaggen", 243 | "ui-config-msg-position": "Positie gebiedsberichten", 244 | "ui-config-msg-visible": "Zichtbaarheid gebiedsberichten", 245 | "ui-config-floating-titles": "Zichtbaarheid zwevende titles", 246 | "ui-config-auto-whitelist": "Automatisch whitelist", 247 | "ui-config-flight-control": "Vlieg vlag optie", 248 | "ui-config-action-itemid": "Actie item id", 249 | "ui-configs-saved": "Configuratie opgeslagen" 250 | } 251 | -------------------------------------------------------------------------------- /resources/ru.json: -------------------------------------------------------------------------------- 1 | { 2 | "language-name": "Russian", 3 | "language-selected": "Русский", 4 | 5 | "enabled-console-msg": "Плагин теперь включен, выбран русский, (переключить язык /fe lang ).", 6 | 7 | "cmd-ingameonly-msg": "Только в игре.", 8 | "cmd-unknown-msg": "Неизвестная команда плагина", 9 | "cmd-noperms-msg": "Нет прав на эту команду", 10 | "cmd-noperms-subcommand": "У вас нет разрешения на использование этой подкоманды.", 11 | 12 | "pos-select-active": "Процесс выбора уже запущен!", 13 | "select-both-pos-first":"Пожалуйста, выберите две позиции для этого.", 14 | "pos1": "позиция 1", 15 | "pos2": "позиция 2", 16 | "make-pos1": "Сломайте блок для установки pos1.", 17 | "make-pos2": "Сломайте блок для установки pos2, завершающую точку в кубическом привате.", 18 | "make-radius-distance": "Сломайте блок для установки pos2, чтобы установить радиус для сферического привата.", 19 | "radius-distance-to-position": "Дистанция радиуса до позиции", 20 | "make-diameter-distance": "Сломайте блок для установки pos2, чтобы установить диаметр для сферического привата.", 21 | "diameter-distance-to-position": "Дистанция диаметра до позиции", 22 | "give-area-name": "Пожалуйста, укажите название для этого привата. Использование: /fe create <имя-привата>", 23 | 24 | "in-unknown-area": "Вы находитесь в неизвестном привате", 25 | 26 | "area": "Приват", 27 | "areas": "Приватах", 28 | "level": "Мир", 29 | "levels": "Миров", 30 | "player": "Игрок", 31 | "players": "Игроки", 32 | "the-area": "Приват", 33 | "the-level": "Мир", 34 | "cube-area-created": "Кубический приват создан!", 35 | "sphere-area-created": "Сферический приват создан!", 36 | "created-by":"Создано", 37 | "area-here": "Тут запривачено", 38 | "area-no-area-available": "Нет доступных приватов", 39 | "area-no-area-to-edit": "Приваты отсутствуют, которые вы можете редактировать", 40 | "area-name-excist": "Приват с таким именем уже есть.", 41 | "area-not-excist": "Приват не существует.", 42 | "cannot-be-found": "Нечего не найдено.", 43 | "area-list" : "Список Приватов", 44 | "players-in-area": "Игроки в привате", 45 | "area-whitelist": "Белый список", 46 | "area-no-commands": "Приват не имеет команд", 47 | "player-has-been-whitelisted": "был занесен в белый список", 48 | "player-allready-whitelisted": "уже в белом списке", 49 | "player-has-been-unwhitelisted": "был удален из белого списка", 50 | "player-allready-unwhitelisted": "уже удален из белого списка", 51 | "whitelist-specify-action": "Пожалуйста, используйте следующие команды: /area whitelist <имя-игрока> и <название-привата>", 52 | "whitelist-specify-for-area": "Пожалуйста используйте в командной строке: /area whitelist <имя-игрока> и <название-привата>", 53 | 54 | "area-floating-titles": "Заголовки привата", 55 | 56 | "name-saved": "имя сохранено как", 57 | "name-write-usage": "Назначьте новое имя: /fe rename <имя-привата> и <своё-имя>", 58 | "name-specify-area": "Пожалуйста, укажите приват для переименования: /fe rename <имя-привата> и <новое имя привата>", 59 | "name-specify-to-area": "Пожалуйста используйте в командной строке: /fe rename <имя-привата> и <новое имя>", 60 | 61 | "desc-saved": "описание сохранено.", 62 | "desc-write-usage": "Пожалуйста, напишите описание: /fe desc <имя-привата> установить <..>", 63 | "desc-specify-area": "Пожалуйста, укажите приват чтобы отредактировать описание: /fe desc <имя-привата> set <ваше описание>", 64 | "desc-specify-set-area": "Пожалуйста, используйте 'set' для следующих команд: /fe desc <имя-привата> set <ваше описание>", 65 | 66 | "priority-saved": "приоритет сохранен.", 67 | "priority-specify-set-area": "Пожалуйста, используйте 'set' для следующих команд: /fe priority <имя-привата> set <целое 0-999>", 68 | "priority-write-usage": "Пожалуйста, назначьте число: /fe priority <имя-привата> set <число 0-999>", 69 | "priority-number-usage": "Пожалуйста, введите число, 0 по умолчанию, 1 - 999 назначает более высокий приоритет: /fe priority <имя-привата> set <число 0-999>", 70 | "priority-specify-area": "Пожалуйста, укажите приват для редактирования приоритета: /fe priority <имя-привата> set <число 0-999>", 71 | 72 | "scaling-height-saved": "высота привата сохранена.", 73 | "scaling-floor-saved": "площадь привата сохранена.", 74 | "scaling-specify-set-area": "Пожалуйста, используйте «вверх»/«вниз» в этой команде: /fe scale <имя-привата> <число 0-9999>", 75 | "scaling-write-usage": "Пожалуйста, укажите количество блоков вверх или низ: /fe scale <имя-привата> <число 0-9999>", 76 | "scaling-number-usage": "Пожалуйста, укажите количество блоков, 0 по умолчанию, 1 - 9998 назначает масштабирование, 9999 неограниченно: /fe scale <имя-привата> <число 0-9999>", 77 | "scaling-specify-area": "Пожалуйста, укажите приват для редактирования масштабирования (вверх/вниз) - (top/bottom): /fe scale <имя-привата> <число 0-9999>", 78 | 79 | "area-deleted": "приват удалён!", 80 | "deleted-by":"удалён", 81 | "specify-to-delete":"Пожалуйста, выберите приват для удаления.", 82 | 83 | "flag": "Флаг", 84 | "flags": "Флагов", 85 | "flag-not-found-list": "Флаг не найден. (Флаги: hurt, pvp, flight, edit, touch, animals, mobs, effect, msg, pass, drop, tnt, shoot, hunger, perms, fall)", 86 | "flag-not-specified-list": "Пожалуйста, укажите флаг. /fe <имя-флага> <имя-привата> (Имена флагов: hurt, pvp, flight, edit, touch, animals, mobs, effect, msg, pass, drop, tnt, shoot, hunger, perms, fall)", 87 | "specify-to-flag": "Пожалуйста, укажите приват, который вы хотите выбрать.", 88 | 89 | "tp-to-area-active": "Вы телепортируетесь в приват", 90 | "specify-excisting-area-name": "Укажите существующее название привата: получить список приватов (/fe list)", 91 | 92 | "cmd": "команда", 93 | "cmds": "команд", 94 | "cmd-id": "Идентификатор команды", 95 | "cmd-list": "Команды в привате", 96 | "-event": "-событие", 97 | "set-for-area": "установить для привата", 98 | "added-to-area": "добавлено в приват", 99 | "allready-used-for": "уже используется для ", 100 | 101 | "allready-set-for-area": "уже установлен для привата", 102 | "edit-id-or-other": "Отредактируйте этот идентификатор или используйте другой идентификатор", 103 | "cmd-specify-id-and-command-usage": "Укажите идентификатор команды и команду для добавления: /fe command <имя-привата> <Идентификатор команды> <Имя команды>", 104 | "cmd-valid-areaname": "Приват не найден, пожалуйста, введите правильное имя: /fe command <имя-привата> <Идентификатор команды> <Имя команды>.", 105 | 106 | "cmd-id-not-found": "Идентификатор команды не найден. Используйте команды для получения списка: /fe command <имя-привата> list", 107 | "cmd-specify-id-to-delete": "Пожалуйста, укажите идентификатор команды для удаления: /fe command <имя-привата> del <Идентификатор команды>", 108 | "cmd-specify-action": "Пожалуйста, добавьте действие для выполнения с командой: /fe command <имя-привата> <Идентификатор команды> <Имя команды>.", 109 | 110 | "event": "событие", 111 | "event-is-now": "новое событие", 112 | "change-failed": "Изменить не удалось!", 113 | 114 | "not-available": "отсутствуют", 115 | "deleted": "удалить", 116 | "select-and": "Выбрано", 117 | "select-in": "внедрено в", 118 | "select-yes": "Да", 119 | "select-no": "Нет", 120 | "status-on": "включить", 121 | "status-off": "выключить", 122 | "set-to": "установлена на", 123 | "for-area": "для привата", 124 | "number-to-write": "Назначить номер", 125 | 126 | "all-players-are-save": "Все игроки сохраняются в этой области!", 127 | "no-pvp-area": "Здесь PVP выключено!", 128 | "no-flight-area": "Режим полета тут выключен!", 129 | "flight-area": "Полеты разрешены здесь!", 130 | "no-shoot-area": "НЕТ Съемки здесь", 131 | 132 | "leaving-area": "покинул", 133 | "enter-area": "вошёл на ", 134 | "leaving-center-area": "Покидание центра привата", 135 | "enter-center-area": "Введите центр привата", 136 | "cannot-enter-area": "Вы не можете войти в приват", 137 | "cannot-leave-area": "Вы не можете покинуть приват", 138 | "enter-barrier-area": "только мимо барьера!", 139 | 140 | "option-missing-in-config": "опция отсутствует в config.yml, теперь установлена на", 141 | "flag-missing-in-config": "флаг по умолчанию отсутствует, теперь установлен", 142 | "barrier-is-passage-flag": "Использовался старый конфиг Барьера, теперь установлен на «false»; пожалуйста, переименуйте «Барьер» в «true» в config.yml", 143 | "no-is-falldamage-flag": "Использовалась старая конфигурация NoFalldamage, теперь она установлена на «false»; пожалуйста, переименуйте «NoFalldamage» в «Falldamage» в config.yml", 144 | "option-see-configfile": "пожалуйста, смотрите оригинальные конфиги в /resources/config.yml", 145 | 146 | "compass-dir-wsp": "Направление компаса установлено на точку появления в мире", 147 | "compass-dir-area": "Направление компаса установлено на приват ", 148 | "compass-dir-notset": "Направление не может быть установлено", 149 | "compass-inthisworld": "В этом мире ", 150 | "compass-level-reset": "Сброс направления компаса", 151 | 152 | "ui-compass-title": "Установить направление компаса", 153 | "ui-compass-use-compass": "Использовать направление компаса", 154 | "ui-compass-selected-wsp": "Выбранная точка появления в мире", 155 | "ui-compass-selected-this": "выбранный ", 156 | "ui-compass-not-found": "Выбранный приват не найден", 157 | "ui-compass-wsp-default": "Точка появления в мире (по умолчанию)", 158 | 159 | "ui-festival-manager": "Управление", 160 | "ui-new-area-setup": "Новая настройка привата", 161 | "ui-select-an-option": "Выберите опцию", 162 | "ui-select-area": "Отметьте приват", 163 | "ui-go-back": "Назад", 164 | "ui-saved": "сохранён!", 165 | "ui-new": "Новый", 166 | "ui-deleted": "Удалить!", 167 | "ui-not-found": "Не найдено!", 168 | "ui-try-again": "Попробуйте еще раз", 169 | 170 | "ui-area-teleport": "Телепорт привата", 171 | "ui-teleport-to-area": "Телепорт в приват", 172 | "ui-teleport-select-destination": "Выберите точку телепорта привата", 173 | "ui-tp-to-area": "Переход в приват", 174 | 175 | "ui-area-management": "Управление приватом", 176 | "ui-area-manager": "Руководитель фестиваля", 177 | "ui-create-area": "Создать новый приват", 178 | "ui-edit-area-options": "Редактировать флаги и опции", 179 | "ui-edit-area-commands": "Редактировать команды", 180 | "ui-edit-area-whitelist": "Редактировать белый список", 181 | "ui-delete-area": "Удалить приват", 182 | 183 | "ui-manage-area": "Управление приватом", 184 | "ui-manage-areas": "Управление приватами", 185 | "ui-name": "Имя", 186 | "ui-description": "Описание", 187 | "ui-priority": "Приоритет", 188 | "ui-select-edit-area": "Выберите приват для редактирования", 189 | "ui-cmd-id-not-found": "Идентификатор команды не найден! Попробуйте еще раз или выберите другой вариант", 190 | "ui-cmd-empty-not-saved": "Пустая команда не сохранилась! Попробуйте еще раз или выберите другой вариант", 191 | 192 | "ui-scale-height": "Высота привата", 193 | "ui-scale-floor": "Глубина привата", 194 | 195 | "ui-area-maker": "Создание привата", 196 | "ui-select-new-area-type": "Выберите тип создания привата:", 197 | "ui-make-cube-diagonal": "Куб - выберите 2 диагональных положения", 198 | "ui-make-sphere-radius": "Радиус сферы - выберите центр и радиус расстояния", 199 | "ui-make-sphere-diameter": "Диаметр сферы - выберите 2 положения диаметра", 200 | "ui-area-name": "Название привата", 201 | "ui-area-desc": "Описание привата", 202 | "ui-new-area-named": "Новое имя привата", 203 | "ui-created": "создан!", 204 | "ui-tab-pos1-diagonal": "Диагональная позиция для новой области куба", 205 | "ui-tab-pos1-radius": "Центральная позиция для новой области сферы", 206 | "ui-tab-pos1-diameter": "Диаметральная позиция новой области сферы", 207 | 208 | "ui-manage-area-commands": "Управление командами привата", 209 | "ui-area-command-list": "Список команд привата", 210 | "ui-area-add-command": "", 211 | "ui-area-add-command-event": "Добавить тип события команды", 212 | "ui-area-add-new-command": "Добавить новую команду:", 213 | "ui-area-change-command": "Редактировать команду:", 214 | "ui-area-type-command-id-change": "", 215 | "ui-area-del-command": "Удалить команду:", 216 | "ui-area-type-command-id-del": "", 217 | 218 | "ui-manage-area-whitelist": "Управление белым списком", 219 | "ui-area-whitelist-saved": "Белый список сохранен!", 220 | "ui-whitelist-select-area": "Выберите приват для белого списка", 221 | "ui-formdate-not-available-try-again": "Данные формы повреждены или недоступны, пожалуйста, попробуйте еще раз.", 222 | "ui-areaname-allready-used-try-again": "Новое название привата неверное или уже используется. Пожалуйста, попробуйте другое имя:", 223 | 224 | "ui-delete-an-area":"Удалить приват", 225 | "ui-select-area-delete":"Выберите приват для удаления:", 226 | "ui-select-to-delete-area":"", 227 | "ui-delete-this-area": "! Удалить приват", 228 | "ui-gonna-delete-area": "Вы собираетесь удалить приват", 229 | 230 | "ui-level-management": "Управление миром", 231 | "ui-manage-levels": "Управлять мирами", 232 | "ui-level-select": "Выбор мира", 233 | "ui-select-level-edit": "Выберите мир для редактирования флагов", 234 | "ui-level-flag-management": "Управление флагами мира", 235 | "ui-level": "Мир", 236 | "ui-flags-saved": "флаг установлен и сохранен!", 237 | "ui-subtitle-level-options": "Варианты мира:", 238 | "ui-toggle-flag-control": "Использовать флаги мира", 239 | "ui-subtitle-level-flags": "Флаги мира:", 240 | 241 | "ui-config-management": "Конфигурация", 242 | "ui-festival-configuration": "Конфигурация плагина", 243 | "ui-config-flags-options": "Конфиги по умолчанию", 244 | "ui-config-msg-position": "Вывод сообщений привата в", 245 | "ui-config-msg-visible": "Сообщения привата видны", 246 | "ui-config-floating-titles": "Виден ли заголовки над приватом", 247 | "ui-config-auto-whitelist": "Добавлять автоматом в белый список", 248 | "ui-config-flight-control": "Управление полетом", 249 | "ui-config-action-itemid": "Предмет для вызова меню плагина привата", 250 | "ui-configs-saved": "Конфиги сохранены" 251 | 252 | } 253 | -------------------------------------------------------------------------------- /resources/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "language-name": "Francais", 3 | "language-selected": "Vous avez sélectionné Francais.", 4 | 5 | "enabled-console-msg": "Festival est maintenant en fonction, Francais sélectionné (modifiez avec /fe lang ).", 6 | 7 | "cmd-ingameonly-msg": "Les commande de festival sont utilisables seulement en jeu.", 8 | "cmd-unknown-msg": "commande festival inconnue", 9 | "cmd-noperms-msg": "Vous ne pouvez pas utiliser cette commande de festival", 10 | "cmd-noperms-subcommand": "Vous n'avez pas la permission d'utiliser cette sous-commande.", 11 | 12 | "pos-select-active": "Vous sélectionnez déja une position", 13 | "select-both-pos-first":"sélectionnez 2 coordonnées en posant ou en cassant 2 positions premièrment.", 14 | "pos1": "position 1", 15 | "pos2": "position 2", 16 | "make-pos1": "Placez ou cassez la première position.", 17 | "make-pos2": "Placez ou cassez la deuxième position pour créer la plus longue diagonale dans la nouvelle zone cubique.", 18 | "make-radius-distance": "Please place or break position 2 to set the radius for new sphere area.", 19 | "radius-distance-to-position": "Distance du rayon jusqu'à la position", 20 | "make-diameter-distance": "Placez ou cassez la deuxième position pour enregistrer le diamètre de la nouvelle zone sphèrique.", 21 | "diameter-distance-to-position": "La distance du diamètre jusqu'à la position", 22 | "give-area-name": "Donnez un nom à votre zone. Utilisez: /fe create ", 23 | 24 | "in-unknown-area": "Vous êtes dans une zone inconnue", 25 | 26 | "area": "Zone", 27 | "areas": "Zones", 28 | "level": "Monde", 29 | "levels": "Mondes", 30 | "player": "Joueur", 31 | "players": "Joueurs", 32 | "the-area": "La Zone", 33 | "the-level": "Le Monde", 34 | "cube-area-created": "Zone cubique créé!", 35 | "sphere-area-created": "Zone Spèrique créé!", 36 | "created-by":"créé par", 37 | "area-here": "Zone ici", 38 | "area-no-area-available": "Aucune zone disponible", 39 | "area-no-area-to-edit": "Il à aucune zone que vous pouvez modifier", 40 | "area-name-excist": "Une zone avec ce nom existe déja.", 41 | "area-not-excist": "Cette zone n'exsite pas.", 42 | "cannot-be-found": "Ne peut être trouvé.", 43 | "area-list" : "Liste des zones", 44 | "players-in-area": "Joueurs dans la zone", 45 | "area-whitelist": "liste blanche", 46 | "area-no-commands": "aucune commandes attachées", 47 | "player-has-been-whitelisted": "à été ajouté à la liste blanche de cette zone", 48 | "player-allready-whitelisted": "est dêja dans la liste blanche de cette zone", 49 | "player-has-been-unwhitelisted": "à été retiré de la liste blanche de cette zone", 50 | "player-allready-unwhitelisted": "est dêja retiré de la liste blanche de cette zone", 51 | "whitelist-specify-action": "Spécifiez une action valide. Utilisez: /area whitelist for ", 52 | "whitelist-specify-for-area": "Utilisez 'for' avec cette commande. Utilisez: /area whitelist for ", 53 | 54 | "area-floating-titles": "Titres flottant de la zone", 55 | 56 | "name-saved": "Renommé pour", 57 | "name-write-usage": "Donnez un nouveau nom. Utilisez: /fe rename to <..>", 58 | "name-specify-area": "Specifiez un nom. Utilisez: /fe rename to ", 59 | "name-specify-to-area": "Utilisez 'to' avec cette commande. Utilisez: /fe rename to ", 60 | 61 | "desc-saved": "description sauvegardée.", 62 | "desc-write-usage": "Écrivez la description. Utilisez: /fe desc set <..>", 63 | "desc-specify-area": "Spécifiez une zone pour changer la description. Utilisez: /fe desc set ", 64 | "desc-specify-set-area": "Utillisez 'set' avec cette commande. Use: /fe desc set ", 65 | 66 | "priority-saved": "prioritée sauvegardée.", 67 | "priority-specify-set-area": "Utilisez 'set' avec cette commande. Utilisez: /fe priority set ", 68 | "priority-write-usage": "Entrez un nombre. Utilisez: /fe priority set ", 69 | "priority-number-usage": "Entrez un nombre, 0 est la valeur par défaut, 1 - 999 donne une plus grande prioritée. Utilisez: /fe priority set ", 70 | "priority-specify-area": "Spécifiez une zone à changer la prioritée. Utilisez: /fe priority set ", 71 | 72 | "scaling-height-saved": "grandeur de la hauteur de la zone sauvegardée.", 73 | "scaling-floor-saved": "grandeur du sol de la zone sauvegardée.", 74 | "scaling-specify-set-area": "Utilisez 'up'(top) ou 'down'(bas) avec cette commande. Utilisez: /fe scale ", 75 | "scaling-write-usage": "Entrez un nombre. Utilisez: /fe scale ", 76 | "scaling-number-usage": "Entrez un nombre, 0 est la valeur par défaut, 1 - 9998 attribue une mise à l'echelle, 9999 est infini. Utilisez: /fe scale ", 77 | "scaling-specify-area": "Entrez une zone à éditer la mise à l'échelle (top/bottom). Utilisez: /fe scale ", 78 | 79 | "area-deleted": "Zone supprimée!", 80 | "deleted-by":"supprimée par", 81 | "specify-to-delete":"Entrez une zone à supprimer.", 82 | 83 | "flag": "protection", 84 | "flags": "protections", 85 | "flag-not-found-list": "Protection introuvable. (Protections disponibles: hurt, pvp, flight, edit, touch, animals, mobs, effect, msg, pass, drop, tnt, shoot, hunger, perms, fall)", 86 | "flag-not-specified-list": "Entrez une protection. Utilisez /fe (Flag names: hurt, pvp, flight, edit, touch, animals, mobs, effect, msg, pass, drop, tnt, shoot, hunger, perms, fall)", 87 | "specify-to-flag": "Entrez le nom de la zone que vous voulez ajouter une protection.", 88 | 89 | "tp-to-area-active": "Vous avez été téléporté à la zone", 90 | "specify-excisting-area-name": "Entrez le nom du zone existante. (Info: /fe list)", 91 | 92 | "cmd": "commande", 93 | "cmds": "commandes", 94 | "cmd-id": "Commande id", 95 | "cmd-list": "Liste des commandes", 96 | "-event": "-évènement", 97 | "set-for-area": "configuré pour la zone", 98 | "added-to-area": "ajouté à la zone", 99 | "allready-used-for": "déjà utilisé pour", 100 | "allready-set-for-area": "déjà configuré pour la zone", 101 | "edit-id-or-other": ", modifiez cette id ou utilisez en une autre", 102 | "cmd-specify-id-and-command-usage": "Entrez l'ID de la commande et la chaine è ajoutez. Utilisez: /fe command ", 103 | "cmd-valid-areaname": "Zone introuvable, entrez un nom valide. Utilisez: /fe command .", 104 | 105 | "cmd-id-not-found": "ID de la commande introuvable. Regardez les commandes avec /fe command list'", 106 | "cmd-specify-id-to-delete": "Entrez l'ID de la commande è suprimmer. Utilisez /fe command del ", 107 | "cmd-specify-action": "Ajoutez une action pour utulisez cette commande. Utilisez: /fe command .", 108 | 109 | "event": "évènement", 110 | "event-is-now": "L'évènement à commencé", 111 | "change-failed": "modification échouée!", 112 | 113 | "not-available": "Indisponible", 114 | "deleted": "supprimée", 115 | "select-and": "et", 116 | "select-in": "dans", 117 | "select-yes": "Oui", 118 | "select-no": "Non", 119 | "status-on": "on", 120 | "status-off": "off", 121 | "set-to": "configuré à", 122 | "for-area": "pour la zone", 123 | "number-to-write": "Entrez un nombre", 124 | 125 | "all-players-are-save": "Tout les joueurs sont sauvegardés dans cette zone!", 126 | "no-pvp-area": "Vous êtes dans une zone sans-pvp!", 127 | "no-flight-area": "Pas de fly ici!", 128 | "flight-area": "Le fly est accepté ici!", 129 | "no-shoot-area": "Pas de tir ici", 130 | 131 | "leaving-area": "sortir", 132 | "enter-area": "entrer", 133 | "leaving-center-area": "Vous sortez du centre de la zone", 134 | "enter-center-area": "Vous entrez le centre de la zone", 135 | "cannot-enter-area": "Vous ne pouvez pas rentrez dans cette zone", 136 | "cannot-leave-area": "Vous ne pouvez pas sortir de cette zone", 137 | "enter-barrier-area": "vous venez de passer une barrière!", 138 | 139 | "option-missing-in-config": "options manquantes dans le fichier config.yml, maintenant configuré à", 140 | "flag-missing-in-config": "protections de base manquantes, maintenant configuré à", 141 | "barrier-is-passage-flag": "L'ancienne configuration de barrière a été utilisée, maintenant configuré à 'false'; renommez 'Barrier' pour 'Passage' dans config.yml", 142 | "no-is-falldamage-flag": "L'ancienne configuration de dégat de chute a été utilisée, maintenant configuré à 'false'; please renommez 'NoFalldamage' pour 'Falldamage' dans config.yml", 143 | "option-see-configfile": "regardez la configuration de base dans /resources/config.yml", 144 | 145 | "compass-dir-wsp": "Directions de la boussole configurée au spawn du monde", 146 | "compass-dir-area": "Directions de la boussole configurée à la zone ", 147 | "compass-dir-notset": "La direction n'a pas pu être définie sur la boussole", 148 | "compass-inthisworld": "Dans ce monde ", 149 | "compass-level-reset": "Réinitialisation de la boussole associé au monde", 150 | 151 | "ui-compass-title": "Configurer les directions de la boussole", 152 | "ui-compass-use-compass": "Utilisez les direction de boussole de festival", 153 | "ui-compass-selected-wsp": "Spawn du monde sélectionné", 154 | "ui-compass-selected-this": "Sélectionné ", 155 | "ui-compass-not-found": "La zone choisie est introuvable", 156 | "ui-compass-wsp-default": "Spawn du monde (valeur par défaut)", 157 | 158 | "ui-festival-manager": "Paramètres Festival", 159 | "ui-new-area-setup": "Nouvelle configuration de zone", 160 | "ui-select-an-option": "Sélectionnez une option", 161 | "ui-select-area": "Sélectionnez une zone", 162 | "ui-go-back": "Retour", 163 | "ui-saved": "sauvegardé!", 164 | "ui-new": "nouveau", 165 | "ui-deleted": "supprimé!", 166 | "ui-not-found": "Introuvable!", 167 | "ui-try-again": "réessayer", 168 | 169 | "ui-area-teleport": "Téléportation aux zones", 170 | "ui-teleport-to-area": "Téléporter à la zone", 171 | "ui-teleport-select-destination": "Sélectionnez un zone", 172 | "ui-tp-to-area": "TP à la zone", 173 | 174 | "ui-area-management": "Gestion des zones", 175 | "ui-area-manager": "Paramètres des zones festival", 176 | "ui-create-area": "Créer un nouvelle zone", 177 | "ui-edit-area-options": "Modifier les protections et les options", 178 | "ui-edit-area-commands": "Modifier les commandes", 179 | "ui-edit-area-whitelist": "Modifier la liste-blanche", 180 | "ui-delete-area": "Supprimer une zone", 181 | 182 | "ui-manage-area": "Gérer une zone", 183 | "ui-manage-areas": "Gérer la zone", 184 | "ui-name": "Nom", 185 | "ui-description": "Description", 186 | "ui-priority": "Prioritée", 187 | "ui-select-edit-area": "Sélectionnez pour modifier une zone", 188 | "ui-cmd-id-not-found": "ID de la commande non trouvée", 189 | "ui-cmd-empty-not-saved": "Commande vide et non sauvegardée", 190 | 191 | "ui-scale-height": "Hauteur de l'échelle", 192 | "ui-scale-floor": "Plancher de l'échelle", 193 | 194 | "ui-area-maker": "Créateur de zones festival", 195 | "ui-select-new-area-type": "Sélectionnez un nouveau type de création de zone", 196 | "ui-make-cube-diagonal": "Cube Diagonal - sélectionnez 2 positions diagonales", 197 | "ui-make-sphere-radius": "Rayon de sphère - sélectionnez la distance entre le centre et le rayon", 198 | "ui-make-sphere-diameter": "Diamètre de la sphère - sélectionnez 2 positions de diamètre", 199 | "ui-area-name": "Nom de la zone", 200 | "ui-area-desc": "Description de la zone", 201 | "ui-new-area-named": "Nouvelle zone nommée", 202 | "ui-created": "créé!", 203 | "ui-tab-pos1-diagonal": "entrez la première position diagonale pour la nouvelle zone de cube", 204 | "ui-tab-pos1-radius": "entrez la position centrale de la nouvelle zone de sphère", 205 | "ui-tab-pos1-diameter": "entrez la première position de diamètre pour la nouvelle zone de sphère", 206 | 207 | "ui-manage-area-commands": "Gérer les commandes de zone", 208 | "ui-area-command-list": "Liste des commande de la zone", 209 | "ui-area-add-command": "Ajouter une nouvelle commande ou en modifier une:", 210 | "ui-area-add-command-event": "Ajouter un type d'événement de commande", 211 | "ui-area-add-new-command": "Inserez la commande:", 212 | "ui-area-change-command": "Changer/editer une commande", 213 | "ui-area-type-command-id-change": "Editer une id de commande:", 214 | "ui-area-del-command": "Supprimer une commande", 215 | "ui-area-type-command-id-del": "Supprimer une id de commande:", 216 | 217 | "ui-manage-area-whitelist": "Gérer la liste blanche de zone", 218 | "ui-area-whitelist-saved": "Liste blanche sauvegardée.", 219 | "ui-whitelist-select-area": "Sélectionner une zone avec une liste blanche", 220 | "ui-formdate-not-available-try-again": "Données de formulaire corrompues ou non disponibles, veuillez réessayer.", 221 | "ui-areaname-allready-used-try-again": "Le nouveau nom de zone n'est pas correct ou déjà utilisé. Veuillez essayer un autre nom:", 222 | 223 | "ui-delete-an-area":"Supprimer une zone", 224 | "ui-select-area-delete":"Selectionnez une zone à supprimer", 225 | "ui-select-to-delete-area":"Sélectionnez pour supprimer la zone", 226 | "ui-delete-this-area": "! Supprimer cette zone", 227 | "ui-gonna-delete-area": "Vous allez supprimer la zone", 228 | 229 | "ui-level-management": "Gestion du monde", 230 | "ui-manage-levels": "Gérer les mondes", 231 | "ui-level-select": "Sélection d'un monde", 232 | "ui-select-level-edit": "Selectionnez un monde pour modifier les protections", 233 | "ui-level-flag-management": "Gérer les protections du monde", 234 | "ui-level": "Monde", 235 | "ui-flags-saved": "Protections sauvegardées !", 236 | "ui-subtitle-level-options": "Options du monde:", 237 | "ui-toggle-flag-control": "Utiliser les protections du monde", 238 | "ui-subtitle-level-flags": "Protections du monde:", 239 | 240 | "ui-config-management": "Configuration", 241 | "ui-festival-configuration": "Configuration de Festival", 242 | "ui-config-flags-options": "Options de configuration et protections de base", 243 | "ui-config-msg-position": "Position des messages de zone", 244 | "ui-config-msg-visible": "Messages de zone visibles", 245 | "ui-config-floating-titles": "Titres flottants visibles dans le zone", 246 | "ui-config-auto-whitelist": "Liste blanche automatique", 247 | "ui-config-flight-control": "Controle du fly", 248 | "ui-config-action-itemid": "Id de l'item d'actions", 249 | "ui-configs-saved": "Configurations sauvegardées" 250 | 251 | } 252 | -------------------------------------------------------------------------------- /resources/es.json: -------------------------------------------------------------------------------- 1 | { 2 | "language-name": "Español", 3 | "language-selected": "Has Seleccionado el Español", 4 | 5 | "enabled-console-msg": "Festival ahora habilitado, inglés seleccionado (ajustar con /fe lang ).", 6 | 7 | "cmd-ingameonly-msg": "El comando solo puede ser usado en el juego.", 8 | "cmd-unknown-msg": "Comando desconocido", 9 | "cmd-noperms-msg": "No puedes usar este comando del Festival.", 10 | "cmd-noperms-subcommand": "No tienes permiso para usar este subcomando.", 11 | 12 | "pos-select-active": "¡Ya estás seleccionando una posición!", 13 | "select-both-pos-first":"Por favor, seleccione ambas posiciones primero.", 14 | "pos1": "posición 1", 15 | "pos2": "posición 2", 16 | "make-pos1": "Por favor coloque o rompa la primera posición.", 17 | "make-pos2": "Por favor coloque o rompa la segunda posición.", 18 | "make-radius-distance": "Romper o colocar un bloque para determinar el radio grande.", 19 | "radius-distance-to-position": "Radio distancia a la posición", 20 | "make-diameter-distance": "Por favor, coloque o rompa para seleccionar la dirección del diámetro y la distancia.", 21 | "diameter-distance-to-position": "Diámetro distancia a la posición", 22 | "give-area-name": "Por favor, especifique un nombre para esta área.", 23 | 24 | "in-unknown-area": "Estas en un area desconocida", 25 | 26 | "area": "Area", 27 | "areas": "areas", 28 | "level": "nivel", 29 | "levels": "niveles", 30 | "player": "jugador", 31 | "players": "jugadores", 32 | "the-area": "La zona", 33 | "the-level": "El nivel", 34 | "cube-area-created": "Area de cubos hecha!", 35 | "sphere-area-created": "Area de esfera hecha!", 36 | "created-by":"creado por", 37 | "area-here": "Area aqui", 38 | "area-no-area-available": "No hay área disponible", 39 | "area-no-area-to-edit": "No hay áreas que puedas editar.", 40 | "area-name-excist": "Ya existe un área con ese nombre.", 41 | "area-not-excist": "Área no existe.", 42 | "cannot-be-found": "no pudo ser encontrado.", 43 | "area-list" : "Lista de áreas", 44 | "players-in-area": "jugadores en el area", 45 | "area-whitelist": "lista blanca", 46 | "area-no-commands": "sin comandos adjuntos", 47 | "player-has-been-whitelisted": "ha sido incluido en la lista blanca en el área", 48 | "player-allready-whitelisted": "Ya está en la lista blanca en el área", 49 | "player-has-been-unwhitelisted": "Ha sido excluido de la lista blanca de está area", 50 | "player-allready-unwhitelisted": "ya está excluido en la lista blanca del área", 51 | "whitelist-specify-action": "Por favor, especifique una acción válida. Usé: /area whitelist for ", 52 | "whitelist-specify-for-area": "Por favor use 'for' en esta cadena de comando. Use: /area whitelist for ", 53 | 54 | "area-floating-titles": "Area flotante de titulos", 55 | 56 | "name-saved": "renombrado a", 57 | "name-write-usage": "Asignar un nombre nuevo. Usé: /fe rename to <..>", 58 | "name-specify-area": "Por favor, especifique un área para editar el nombre. Usé: /fe rename to ", 59 | "name-specify-to-area": "Por favor use 'to' en esta cadena de comando. Usé: /fe rename to ", 60 | 61 | "desc-saved": "Descripción guardada.", 62 | "desc-write-usage": "Por favor escriba la descripción. Usé: /fe desc set <..>", 63 | "desc-specify-area": "Por favor, especifique un área para editar la descripción. Usé: /fe desc set ", 64 | "desc-specify-set-area": "Por favor use 'set' en esta cadena de comando. Usé: /fe desc set ", 65 | 66 | "priority-saved": "prioridad guardada.", 67 | "priority-specify-set-area": "Por favor use 'set' en esta cadena de comando. Usé: /fe priority set ", 68 | "priority-write-usage": "Por favor, asigne un número. Usé: /fe priority set ", 69 | "priority-number-usage": "Por favor, asigne un número, 0 es el valor predeterminado, 1 - 999 asigna mayor prioridad. Usé: /fe priority set ", 70 | "priority-specify-area": "Por favor, especifique un área para editar la prioridad. Usé: /fe priority set ", 71 | 72 | "scaling-height-saved": "altura de escala de área guardada.", 73 | "scaling-floor-saved": "área de escalamiento del piso guardado.", 74 | "scaling-specify-set-area": "Utilice 'up' (arriba) o 'down' (abajo) en esta cadena de comando. Utilizar: / fe scale ", 75 | "scaling-write-usage": "Por favor, asigne un número. Utilizar: / fe scale ", 76 | "scaling-number-usage": "Por favor, asigne un número, 0 es predeterminado, 1 - 9998 asigna escala, 9999 es ilimitado. Utilizar: / fe scale ", 77 | "scaling-specify-area": "Especifique un área para editar la escala (arriba/abajo). Utilizar: / fe scale ", 78 | 79 | "area-deleted": "Área eliminada!", 80 | "deleted-by":"eliminado por", 81 | "specify-to-delete":"Por favor, especifique un área para eliminar.", 82 | 83 | "flag": "flag", 84 | "flags": "flags", 85 | "flag-not-found-list": "Flag no encontrada (Flags: god, pvp, flight, edit, touch, animals, mobs, effects, msg, passage, drop, tnt, shoot, hunger, perms, falldamage)", 86 | "flag-not-specified-list": "Por favor, especifique una flag. (Flags: god, pvp, flight, edit, touch, animals, mobs, effects, msg, passage, drop, tnt, shoot, hunger, perms, falldamage)", 87 | "specify-to-flag": "Por favor, especifique el área en la que le gustaría colocar una flag", 88 | 89 | "tp-to-area-active": "Estás teletransportando a la zona", 90 | "specify-excisting-area-name": "Por favor, especifique un nombre de área existente.", 91 | 92 | "cmd": "comando", 93 | "cmds": "comandos", 94 | "cmd-id": "ID del comando", 95 | "cmd-list": "Lista de comandos", 96 | "-event": "-evento", 97 | "set-for-area": "establecer para el área", 98 | "added-to-area": "añadido al área", 99 | "allready-used-for": "ya utilizado para", 100 | "allready-set-for-area": "ya establecido para el área", 101 | "edit-id-or-other": ", edita este id o usa otro id", 102 | "cmd-specify-id-and-command-usage": "Por favor, especifique el ID de comando y el comando para agregar. Usé: /fe command y ", 103 | "cmd-valid-areaname": "Área no encontrada, por favor envíe un nombre válido. Usé: /fe command .", 104 | 105 | "cmd-id-not-found": "ID de comando no encontrado. Ver los comandos con /fe event command list'", 106 | "cmd-specify-id-to-delete": "Por favor, especifique el ID del comando para eliminar. Usé /fe event command del ", 107 | "cmd-specify-action": "Por favor agregue una acción para realizar con el comando. Usé: /fe command .", 108 | 109 | "event": "evento", 110 | "event-is-now": "evento es ahora", 111 | "change-failed": "cambio-fallido!", 112 | 113 | "not-available": "no disponible", 114 | "deleted": "eliminado", 115 | "select-and": "y", 116 | "select-in": "en", 117 | "select-yes": "Sí", 118 | "select-no": "No", 119 | "status-on": "Encendido", 120 | "status-off": "Apagado", 121 | "set-to": "ajustado a", 122 | "for-area": "Por área", 123 | "number-to-write": "Assign a number", 124 | 125 | "all-players-are-save": "¡Todos los jugadores están guardados en esta área!", 126 | "no-pvp-area": "¡Estás en un área sin PVP!", 127 | "no-flight-area": "NO puede volar aquí!", 128 | "flight-area": "¡Se permite volar aquí!", 129 | "no-shoot-area": "NO disparar aquí", 130 | 131 | "leaving-area": "saliendo", 132 | "enter-area": "entrando", 133 | "leaving-center-area": "Saliendo del centro de la area.", 134 | "enter-center-area": "Entrando en el centro del área.", 135 | "cannot-enter-area": "No puedes entrar al area", 136 | "cannot-leave-area": "No puedes dejar la zona.", 137 | "enter-barrier-area": "acaba de pasar una barrera!", 138 | 139 | "option-missing-in-config": "opción que falta en config.yml, ahora configurada en", 140 | "flag-missing-in-config": "faltan valores predeterminados de la bandera, ahora se establece en", 141 | "barrier-is-passage-flag": "Se usó la antigua configuración de barrera, ahora configurada en 'false'; por favor renombra 'Barrier' por 'Passage' en config.yml", 142 | "no-is-falldamage-flag": "Se usó la antigua configuración de NoFalldamage, ahora configurada en 'false'; por favor renombra 'NoFalldamage' por 'Falldamage' en config.yml", 143 | "option-see-configfile": "Por favor, vea configuraciones originales en /resources/config.yml", 144 | 145 | "compass-dir-wsp": "Dirección de la brújula establecida en el punto de generación mundial", 146 | "compass-dir-area": "Dirección de la brújula establecida en el área ", 147 | "compass-dir-notset": "No se pudo establecer la dirección en la brújula", 148 | "compass-inthisworld": "En este mundo ", 149 | "compass-level-reset": "Restablecer nivel de brújula", 150 | 151 | "ui-compass-title": "Establecer la dirección de la brújula", 152 | "ui-compass-use-compass": "Usa la brújula del festival", 153 | "ui-compass-selected-wsp": "Punto de generación mundial seleccionado", 154 | "ui-compass-selected-this": "Seleccionada ", 155 | "ui-compass-not-found": "El área seleccionada no se pudo encontrar", 156 | "ui-compass-wsp-default": "Punto de generación mundial (predeterminado)", 157 | 158 | "ui-festival-manager": "Director del festival", 159 | "ui-new-area-setup": "Configuración de área nueva", 160 | "ui-select-an-option": "Seleccione una opción", 161 | "ui-select-area": "Seleccionar área", 162 | "ui-go-back": "Volver", 163 | "ui-saved": "guardado!", 164 | "ui-new": "new", 165 | "ui-deleted": "eliminado!", 166 | "ui-not-found": "no encontrado", 167 | "ui-try-again": "Inténtalo de nuevo", 168 | 169 | "ui-area-teleport": "Area Teleport", 170 | "ui-teleport-to-area": "Teleport to Area", 171 | "ui-teleport-select-destination": "Seleccionar área de destino", 172 | "ui-tp-to-area": "TP a área", 173 | 174 | "ui-area-management": "Area Management", 175 | "ui-area-manager": "Festival Area Manager", 176 | "ui-create-area": "Crear nueva área", 177 | "ui-edit-area-options": "Editar indicadores y opciones", 178 | "ui-edit-area-commands": "Editar comandos", 179 | "ui-edit-area-whitelist": "Editar lista blanca", 180 | "ui-delete-area": "Eliminar un área", 181 | 182 | "ui-manage-area": "Manage area", 183 | "ui-manage-areas": "Manage area's", 184 | "ui-name": "Name", 185 | "ui-description": "Description", 186 | "ui-priority": "prioridad", 187 | "ui-select-edit-area": "Seleccionar para editar un área", 188 | "ui-cmd-id-not-found": "¡No se encontró el ID de comando! Inténtelo de nuevo o seleccione otra opción", 189 | "ui-cmd-empty-not-saved": "¡Comando vacío y no guardado! Inténtelo de nuevo o seleccione otra opción", 190 | 191 | "ui-scale-height": "Altura de escala", 192 | "ui-scale-floor": "Scale floor", 193 | 194 | "ui-area-maker": "Festival Area Maker", 195 | "ui-select-new-area-type": "Seleccionar nuevo tipo de creación de área", 196 | "ui-make-cube-diagonal": "Cube Diagonal - selecciona 2 posiciones diagonales", 197 | "ui-make-sphere-radius": "Radio de esfera: seleccione la distancia entre el centro y el radio", 198 | "ui-make-sphere-diameter": "Diámetro de la esfera - seleccione 2 posiciones de diámetro", 199 | "ui-area-name": "Nombre de área", 200 | "ui-area-desc": "Descripción del área", 201 | "ui-new-area-named": "Nueva área llamada", 202 | "ui-created": "created!", 203 | "ui-tab-pos1-diagonal": "Coloque la primera posición diagonal para el área del cubo nuevo", 204 | "ui-tab-pos1-radius": "Marca la posición central para el área de la nueva esfera", 205 | "ui-tab-pos1-diameter": "Pestaña la posición del primer diámetro para el área de la nueva esfera", 206 | 207 | "ui-manage-area-command": "Administrar comandos de área", 208 | "ui-area-command-list": "Lista de comandos del área", 209 | "ui-area-add-command": "Agregar nuevo o editar comando:", 210 | "ui-area-add-command-event": "Agregar tipo de evento de comando", 211 | "ui-area-add-new-command": "Insertar comando:", 212 | "ui-area-change-command": "comando de cambio / edición", 213 | "ui-area-type-command-id-change": "Edit cmd id:", 214 | "ui-area-del-command": "Eliminar comando", 215 | "ui-area-type-command-id-del": "Delete cmd id:", 216 | 217 | "ui-manage-area-whitelist": "Gestionar lista blanca del área", 218 | "ui-area-whitelist-saved": "Lista blanca guardada", 219 | "ui-whitelist-select-area": "Seleccionar área de lista blanca", 220 | "ui-formdate-not-available-try-again": "Los datos del formulario están dañados o no están disponibles, inténtalo de nuevo", 221 | "ui-areaname-allready-used-used-try-again": "El nuevo nombre de área no es correcto o ya se usó. Intente con otro nombre:", 222 | 223 | "ui-delete-an-area": "Eliminar un área", 224 | "ui-select-area-delete": "Seleccionar área para eliminar", 225 | "ui-select-to-delete-area": "Seleccionar para eliminar area", 226 | "ui-delete-this-area": "! Delete area", 227 | "ui-gonna-delete-area": "Vas a eliminar el área", 228 | 229 | "ui-level-management": "Level Management", 230 | "ui-manage-levels": "Administrar niveles", 231 | "ui-level-select": "Level select", 232 | "ui-select-level-edit": "Seleccionar nivel para editar marcas", 233 | "ui-level-flag-management": "Gestionar indicadores de nivel", 234 | "ui-level": "Level", 235 | "ui-flags-saved": "flagset guardado!", 236 | "ui-subtitle-level-options": "Opciones de nivel:", 237 | "ui-toggle-flag-control": "utilizar el conjunto de indicadores de nivel", 238 | "ui-subtitle-level-flags": "Banderas de nivel:", 239 | 240 | "ui-config-management": "Configuración", 241 | "ui-festival-configuration": "Configuración del festival", 242 | "ui-config-flags-options": "Opciones de configuración y banderas predeterminadas", 243 | "ui-config-msg-position": "Posición de los mensajes del área", 244 | "ui-config-msg-visible": "Mensajes de área visibles", 245 | "ui-config-floating-titles": "Área de títulos flotantes visibles", 246 | "ui-config-auto-whitelist": "Lista blanca automática", 247 | "ui-config-flight-control": "Control de vuelo", 248 | "ui-config-action-itemid": "ID de elemento de acción", 249 | "ui-configs-saved": "Configs guardado" 250 | } 251 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Festival 2 | 3 | # SORRY! This minecraft Pocketmine-MP plugin is not maintained anymore! 4 | 5 | Please note that Festival is no longer actively being developed or maintained. Issues will not be attended to, the remainder of this README has been kept in place for future reference. 6 | 7 | 8 | ### Create area's, manage flags and run commmands attachted to area events. 9 | Latest Release v2.1.3 10 | phar available @ [github](https://github.com/genboy/Festival/releases/tag/2.1.3) 11 | 12 | ![Festival plugin logo large](https://genboy.net/minecraft/wp-content/uploads/2018/02/festival_plugin_logo.png) 13 | ###### Copyright [Genboy](https://genboy.net/minecraft) 2018 - 2020 14 | ###### Take notice of the Copyright Statement if you use Festival for the first time since 27 April 2019. Read the Legal Notice** at the bottom of this README file or the Legal Notice tab at poggit.pmmp.io/p/Festival 15 | --- 16 | # Festival 17 | If you like to use Festival consider [sharing your experience and issues](https://github.com/genboy/Festival/issues) to fix any usability problems before posting a [vote](https://poggit.pmmp.io/p/Festival/1.1.1)! That way it will improve Festival, my coding skills, your Pocketmine-MP insights and strenghten the PMMP community, thank you! 18 | For more info visit [genboy.net/minecraft](https://genboy.net/minecraft), home of [Festival](https://genboy.net/minecraft/festival) 19 | 20 | The Festival Plugin is released on poggit 21 | [![](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) 22 | 23 | See and make [reviews @ poggit](https://poggit.pmmp.io/p/Festival) 24 | and post your [issues @ github](https://github.com/genboy/Festival/issues) - [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/genboy/Festival.svg)](http://isitmaintained.com/project/genboy/Festival "Average resolve time") [![Percentage of issues still open](http://isitmaintained.com/badge/open/genboy/Festival.svg)](http://isitmaintained.com/project/genboy/Festival "Percentage open") 25 | 26 | 27 | ![Festival 2.1.0 Command usage](https://genboy.net/minecraft/wp-content/uploads/2020/01/festival_usage_v2.1.2.png) 28 | ## Overview 29 | 30 | ### version 2.1.2 31 | - Russian (ru) translations 32 | - French (fr) translations 33 | - Add right-click position selection in air 34 | - Barrier op msg fix 35 | - ForceUTF8 update fix PHP 7.4 36 | - Debugged global eventhandling 37 | - Area selection with Midair 38 | 39 | ### version 2.1.1 40 | - Place compass translations 41 | - Full fix falldamage 42 | - Debug areaMessages & config 43 | - Fix typo's 44 | 45 | ### version 2.1.0 46 | - Mob/animal flag Slapper fix to remain on restart 47 | - Edit flag protects paintings 48 | - Fall flag bug fix 49 | - Turn on compass usage (in development) 50 | User can select their area's (whitelisted) to set compass direction Command can be used to set any area compass direction on area event 51 | 52 | ### version 2 53 | Festival Manager Menu (UI + select item) - or use the commands 54 | - Cube AND Sphere area's set with diagonal, radius or diameter 55 | - Area's and Config managed from menu 56 | - Optional Level flag protection 57 | - Area name (and desc) can now be Full string inCluDing MuLti wORds CaPitaLized 58 | - Stretching area's up and down with y scaling 59 | - Use priority number for overlapping area's 60 | 61 | 62 | ## Info 63 | 64 | #### Install 65 | 66 | **Festival Install (version 2 )**: 67 | *(always save copies of your previous used config.yml and areas.json before re-install)* 68 | 1. place phar file or unzipped Festival folder with (Devtools pluginfolder) in server plugins folder and restart, 69 | 2. after restart; 70 | 2a. if need previous used configs and areas: delete config.json and areas.json from the root folder 71 | and put your config.yml and areas.json in Festival (root) folder 72 | 2b. if clean start (no areas) edit /resources/config.yml to your likes and delete config.json from the root folder 73 | 3. Then restart again, now areas.json, levels.json and config.json in Festival (root) folder are used. 74 | 75 | ( or download latest stable version [@ poggit https://poggit.pmmp.io/p/Festival](https://poggit.pmmp.io/p/Festival) - no Festival menu, only command usage) 76 | 77 | #### Get started 78 | 79 | **Management UI in game**: 80 | command **hold magic item** or ** /fe menu** (ui, form, data) 81 | ( default magic item 201 - Purpur Pillar block - change in config management) 82 | When using the form you need to **use the magic item to tab area positions**. 83 | You can swapp item to build/break during area position 1 and 2 selection. 84 | 85 | Or use the commands as shown in the usage image (now with Multi wORd FULLY CapitAlized nameS possible) 86 | 87 | **Create area** with **menu**: 88 | 89 | You can use cmd '/fe menu' or just hold the magic item (purpur block/your selected item/block). 90 | Then if you choose create area you should tab the positions with the magic item. 91 | After tab pos1 you may use other blocks to build etc. and then hold the magic item again to tab pos2. Directly after tab pos2 the menu should come back to name your area. 92 | 93 | **Create area** with **commands**: 94 | 95 | Use /fe pos1 and /fe pos2 to tab the positions, after pos2 you need '/fe create area ' to finnish the area creation. After creation both commands and menu can be used to manage the area. 96 | 97 | 98 | #### Development 99 | 100 | **Download development version**: 101 | [Poggit development](https://poggit.pmmp.io/ci/genboy/Festival/Festival) 102 | Please report bugs -thank you! [issues @ github](https://github.com/genboy/Festival/issues) and/or [reviews @ poggit](https://poggit.pmmp.io/p/Festival) 103 | 104 | or use [devtools plugin](https://poggit.pmmp.io/p/DevTools/1.13.0) and [download zip package https://github.com/genboy/Festival/archive/master.zip](https://github.com/genboy/Festival/archive/master.zip) 105 | 106 | 107 | ### Features 108 | 109 | **Menu** 110 | In version 2.0.0 the Festival Management Menu (FormUI) is introduced 111 | 112 | **Config** 113 | - set default options in config.yml; 114 | - Language: en - select language English = en, Dutch = nl, es = Español, pl = Polskie - translate please ! 115 | - ItemID: Hold this Magic block/item to enter Menu (default item 201 - Purpur Pillar block) 116 | - Msgtype: msg - Area Messages Display position (msg/title/tip/pop) 117 | - Msgdisplay: off - Area Messages persist display to ops (off/op/on) 118 | - Areadisplay: op - Area Floating Title display to ops (off/op/on) 119 | - FlightControl: on - To disable flight flag for all Festival usage (on/off) 120 | - AutoWhitelist: on - Auto whitelist area creator (on/off) 121 | 122 | **Area** 123 | 124 | - Create and manage area’s ingame 125 | 126 | - Define area's by tapping 2 positions 127 | - **diagonal** for cube 128 | - **radius** for sphere 129 | - **diameter** for sphere 130 | - Scale area's verticaly up and down 131 | - create/rename/delete/list area’s 132 | - add area description 133 | - whitelist players for the area 134 | - tp to an area 135 | - show area’s info at current position 136 | 137 | **Flags** 138 | 139 | - Set area flags ingame 140 | Flags: Any flag true will protect the area and the players in it. 141 | ie. edit: true (on) means no breaking/building by players. shoot: true (on) means no shooting by players. 142 | 143 | - edit: the area is save from building/breaking 144 | - hurt: players in the area are save (previous god flag) 145 | - pvp: players in the area are save from PVP 146 | - flight: players in the area are not allowed to fly 147 | - touch: area is save from player interaction with doors/chests/signs etc. 148 | - animals: no animal spawning (including spawners & eggs) 149 | - mobs: no mobs spawning (including spawners & eggs) 150 | - effect: player can not keep using effects in the area 151 | - msg: do not display area enter/leave messages 152 | - pass: no passage for non-whitelisted players! (previously barrier flag) 153 | - drop: players can not drop things 154 | - tnt: explosions protected area 155 | - fire: fire protected area (including spreading & lava) 156 | - explode: explosions protected area 157 | - shoot: player can not shoot (bow) 158 | - perms: player permissions are used to determine area command execution 159 | - hunger: player does not exhaust / hunger 160 | - fall: player will not have fall damage 161 | - cmd: area event commands are only executed for ops (test area commands) 162 | 163 | 164 | **Events & Commands** 165 | 166 | - Add commands to area events 167 | 168 | - assign commands to area events 169 | - enter, center or leave. 170 | - variable player in commands with {player} or @p 171 | - add/edit/delete area event command 172 | - list area commands (ordered by event) 173 | - change event of area commands 174 | 175 | 176 | **Level flags** 177 | 178 | - Use the level flags for level protection 179 | 180 | - per level the levelcontrol toggle option enables the level flag protection 181 | --- 182 | 183 | 184 | ## Menu (UI) 185 | 186 | #### Festival Menu 187 | 188 | **Festival main menu** 189 | 190 | ![Start menu select management option](https://genboy.net/minecraft/wp-content/uploads/2019/06/manager_start.jpg) 191 | #### Teleport 192 | 193 | **Select teleport destination** 194 | 195 | ![Select teleport destination](https://genboy.net/minecraft/wp-content/uploads/2019/06/area_teleport_select.jpg) 196 | 197 | #### Areas 198 | 199 | **Area management option menu** 200 | 201 | ![Area option menu](https://genboy.net/minecraft/wp-content/uploads/2019/06/manager_area_options.jpg) 202 | 203 | **Select area to manage** 204 | 205 | ![Select area](https://genboy.net/minecraft/wp-content/uploads/2019/06/manager_area_select.jpg) 206 | 207 | **Manage area settings** 208 | 209 | ![Edit area settings](https://genboy.net/minecraft/wp-content/uploads/2019/06/manage_areas_settings.jpg) 210 | 211 | **Manage area flags** 212 | 213 | ![Edit area flags](https://genboy.net/minecraft/wp-content/uploads/2019/06/manager_area_options_end.jpg) 214 | 215 | **Manage area commands** 216 | 217 | ![Manage commands for area events](https://genboy.net/minecraft/wp-content/uploads/2019/07/cmds_1_Minecraft-27-1-2019-16_50_24.jpg) 218 | 219 | 220 | **Add command** 221 | 222 | ![Edit or add commands to area](https://genboy.net/minecraft/wp-content/uploads/2019/07/cmds_2.jpg) 223 | 224 | using the @p reference in the command to target the player 225 | (/heal command is an example, comes from another plugin) 226 | 227 | 228 | **Del or change command** (by id) 229 | 230 | ![Edit or add commands to area](https://genboy.net/minecraft/wp-content/uploads/2019/07/cmds_3.jpg) 231 | 232 | Delete: Leave command empty and input 'delete cmd id' to delete id linked command. 233 | Change: Set event type, enter command and input 'edit cmd id' to change that id linked command 234 | 235 | 236 | **Manage area Whitelist** 237 | 238 | ![Manage area whitelist](https://genboy.net/minecraft/wp-content/uploads/2019/06/area_whitelist.jpg) 239 | 240 | Set players on or off area whitelist (this is in development) 241 | 242 | 243 | **Select area to delete** 244 | 245 | ![Delete area](https://genboy.net/minecraft/wp-content/uploads/2019/06/delete_area1.jpg) 246 | 247 | **Confirm to delete area** 248 | 249 | ![Cofirm area delete](https://genboy.net/minecraft/wp-content/uploads/2019/06/delete_area2.jpg) 250 | 251 | #### Create 252 | 253 | Select new area type 254 | 255 | ![Select new area type](https://genboy.net/minecraft/wp-content/uploads/2019/06/start_make_area.jpg) 256 | Hold the magic item - 201 purpur block by defaults, set in configs 257 | **Tab positions with the magic block**, meanwhile use other blocks to build in between. 258 | 259 | Set area positions 260 | ###### Cube Diagonal 261 | 1. Place or break the first diagonal position for new cube area 262 | 2. Place or break position 2 to set the longest diagonal in the new cube area 263 | ###### Sphere Radius 264 | 1. Place or break the center position for the new sphere area 265 | 2. Place or break position 2 to set the radius for new sphere area 266 | ###### Sphere Diameter 267 | 1. Place or break the first diameter position for the new sphere area 268 | 2. Place or break position 2 to set the diameter for new sphere area 269 | 270 | Create area with Name (and description) 271 | 272 | ![Create area with name and description](https://genboy.net/minecraft/wp-content/uploads/2019/06/create_new_area.jpg) 273 | 274 | #### Levels 275 | 276 | Turn on level flag control to use the level flags (instead of defaults) 277 | ![festival-use-level-flags](https://user-images.githubusercontent.com/30810841/63712056-291f7b00-c83d-11e9-9209-2dbb66c163fe.gif) 278 | 279 | Select level to manage flags (if levelcontrol config is on) 280 | 281 | ![Select level](https://genboy.net/wp-content/minecraft/uploads/2019/06/manage_level_select.jpg) 282 | 283 | Manage level flags options 284 | 285 | ![Manage Level use option and flags](https://genboy.net/minecraft/wp-content/uploads/2019/07/manage_level_option.jpg) 286 | ![Edit level flags(defaults)](https://genboy.net/minecraft/wp-content/uploads/2019/06/manage_level_flags2.jpg) 287 | 288 | #### Configuration 289 | UI configuration to set overall options and default flags for levels and area's 290 | ![festival-set-configs-default-flags](https://user-images.githubusercontent.com/30810841/63712052-26bd2100-c83d-11e9-82f0-5ed7f03312f4.gif) 291 | 292 | 293 | Manage Festival configuration options and set default flags 294 | 295 | ![Manage configuration](https://genboy.net/minecraft/wp-content/uploads/2019/06/manager_configuration.png) 296 | ###### Copyright [Genboy](https://genboy.net) 2018 - 2019 - markdown edited with [stackedit.io] 297 | 298 | ## Usage 299 | 300 | - Edit config.yml; set the defaults for options, default area flags and the default area flags for specific worlds. 301 | - using ingame Festival Menu (UI) for configurations 302 | - older versions (1.1.3) read [wiki on configurations](https://github.com/genboy/Festival/wiki/2.-Install,-Configure-&-Update) 303 | 304 | ![Festival 2.1.0 Command usage](https://genboy.net/minecraft/wp-content/uploads/2020/01/festival_usage_v2.1.2.png) 305 | 306 | 307 | #### Setup 308 | 309 | ### Install & Configure 310 | 311 | - Standard Plugin installation; Upload .phar file to server 'plugin' folder (or upload .zip if you have latest devtools installed), restart the server, go to folder plugins/Festival; 312 | 313 | - read [wiki on configurations](https://github.com/genboy/Festival/wiki/2.-Install,-Configure-&-Update) 314 | 315 | #### Updates 316 | 317 | Updates available at [poggit](https://poggit.pmmp.io/ci/genboy/Festival/Festival) and [github](https://github.com/genboy/Festival/releases) 318 | 319 | ##### !Before update always copy your config.yml and areas.json files to a save place, with this you can revert your Festival installation. Keep your old files (befor v2.0.0) for new install. 320 | - first remove Festival folder (keep the areas.json and config.yml) 321 | - after .phar install and first restart/reload plugins; check console info 322 | - replace the new(empty) areas.json with your original (old) areas.json 323 | - put your original config.yml in the Festival (or /resource) folder and remove the config.json file; 324 | - restart server after adjusted correctly 325 | 326 | ###### Copyright [Genboy](https://genboy.net/minecraft) 2018 327 | 328 | 329 | #### Festival Manager menu 330 | 331 | Open th Festival menu 332 | 333 | /fe ui 334 | /fe menu 335 | 336 | or get hold of the magic item in the inventory 337 | 338 | #### Language 339 | 340 | /fe lang 341 | 342 | Set Festival language en/nl/es/pl/ru/fr for area and command returned messages. 343 | en = English 344 | nl = Nederlands 345 | es = Español 346 | pl = Polski 347 | ru = русский (Russian) 348 | fr = Français 349 | 350 | __ = your language, please help [translate](https://github.com/genboy/Festival/tree/Translations) 351 | 352 | 353 | #### Create area (cmd) 354 | 355 | ### Cube area 356 | 357 | First command '/fe pos' or '/fe pos1' 358 | and holding the magic block, default 201, tab or break a block for position 1 359 | 360 | then command '/fe pos2' 361 | and and holding the magic block tab or break a block to set position2, 362 | 363 | these are the endpoints of the area longest diagonal. 364 | 365 | /fe pos1(pos) 366 | /fe pos2 367 | 368 | 369 | ### Sphere area 370 | 371 | First command '/fe pos' or '/fe pos1' 372 | 373 | For sphere radius; 374 | holding the magic block tab or break a block for the center of the sphere 375 | then command '/fe rad' or '/fe radius' 376 | and and holding the magic block tab or break a block to set the radius size. 377 | 378 | For sphere diameter; 379 | holding the magic block tab or break a block for first end of the diameter 380 | then command '/fe dia' or '/fe diameter' 381 | and and holding the magic block tab or break a block for the other end of the diameter. 382 | 383 | /fe pos 384 | /fe rad / dia 385 | 386 | 387 | ### After position selections 388 | 389 | Then name/save the selected area 390 | 391 | /fe create 392 | 393 | Now the area is ready to use 394 | 395 | You might want to set or edit the area description line 396 | 397 | /fe desc 398 | 399 | 400 | #### Set area flags 401 | 402 | fast toggle for flags: (since Festival v1.0.1-11) 403 | 404 | /fe 405 | 406 | Area flag defaults are set in the config.yml, server defaults and world specific default flag. 407 | 408 | /fe flag list 409 | 410 | 411 | #### Delete an area 412 | 413 | /fe delete(del,remove) 414 | 415 | 416 | #### List all area's 417 | 418 | See all area info, optional per level 419 | 420 | /fe list () 421 | 422 | 423 | #### Floating titles 424 | 425 | Floating titles are set in the configs (menu or config.json / yml) 426 | Toggles the titles on/off 427 | 428 | /fe titles 429 | 430 | #### Teleport to area 431 | 432 | Teleporting to area center top, drop with no falldamage (if falldamage flag true) 433 | 434 | /fe tp 435 | 436 | 437 | #### Toggle level area's floating title display 438 | 439 | Area floating title display (default set in config.yml) 440 | 441 | /fe titles 442 | 443 | 444 | #### Set description 445 | 446 | /fe desc 447 | 448 | 449 | #### Manage whitelist 450 | 451 | /fe whitelist 452 | 453 | #### Set compass 454 | 455 | /fe compass 456 | 457 | #### Area event commands 458 | 459 | **This is the fun part of Festival: assign commands to area events** 460 | 461 | When an area is created 3 events are available; 462 | - enter; when a player enters the area 463 | - center; when a player reaches the center (3x3xareaHeight blocks) 464 | - leave; when a player leaves the area 465 | 466 | 467 | To add a command you need at least; 468 | - an areaname, 469 | - an unique id for the command 470 | - make sure the command works! (when you are op) 471 | 472 | 473 | /fe command 474 | 475 | 476 | ##### Add a command: 477 | 478 | /fe command add 479 | 480 | 'add' is the default for attaching a command on the 'enter' event. 481 | Using 'enter', 'center' or 'leave' instead of 'add' attaches the new command to 482 | the given eventtype: i.e. /fe command center 483 | 484 | ##### List area commands: 485 | 486 | /fe command list 487 | 488 | ##### Edit command: 489 | 490 | /fe command edit 491 | 492 | ##### Change command event: 493 | 494 | /fe command event 495 | 496 | ##### Remove command: 497 | 498 | /fe command del 499 | 500 | 501 | --- 502 | 503 | ### Updates 504 | 505 | Updates available at [poggit](https://poggit.pmmp.io/ci/genboy/Festival/Festival) and [github](https://github.com/genboy/Festival/releases) 506 | 507 | ##### !Before update always copy your config.yml and areas.json files to a save place, with this you can revert your Festival installation 508 | - after .phar install and first restart/reload plugins; check console info and your areas.json and config.yml; restart after adjusted correctly 509 | 510 | - ! Update Festival 2 in development translating resource config.yml or your mainfolder config.yml and areas.json on install 511 | 512 | 513 | ## Credits 514 | 515 | ### Many thanks to all who have posted valid issues and requests! 516 | 517 | The basic area code in Festival derives from the [iProctector plugin](https://github.com/LDX-MCPE/iProtector). Credits for the basic 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). 518 | 519 | The Festival code is written and tested by [Genboy](https://www.genboy.net) and first released on 12 Feb 2018 with an area object holding events (enter and leave messages) and soon extended with 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. And players can teleport to top-center of an area. 520 | In festival version 1.0.8 many flag functions where improved and the plugin was extended with 8 new flags, language translation options and area floating titles. During v1.0.9 to 2.1.0 many flag functions where improved, a compass-to-area option added and translations extended to en/nl/es/pl . 521 | 522 | ## Legal Notice 523 | 524 | -- Legal notice -- 525 | 526 | For Festival the General Public License agreement version 3, as in the LICENSE file is still included and operative. 527 | 528 | To protect this software since 27 April 2019 the Festival software package is copyrighted by Genboy. 529 | You are legally bind to read the Festival Copyright statement. 530 | 531 | In short this change of Copyright statement does not change the usage levels as stated in the GPU, for a part it now prohibits any entities to sell the software without the knowledge of the owner. 532 | 533 | -- end legal notice -- 534 | ###### Copyright [Genboy](https://genboy.net/minecraft) 2018 - 2019 535 | markdown edited with [stackedit.io](https://stackedit.io) and 536 | translated to html with [browserling.com](https://www.browserling.com/tools/markdown-to-html) 537 | -------------------------------------------------------------------------------- /src/genboy/Festival/Helper.php: -------------------------------------------------------------------------------- 1 | plugin = $plugin; 23 | 24 | if(!is_dir($this->plugin->getDataFolder())){ 25 | @mkdir($this->plugin->getDataFolder()); 26 | } 27 | // add resource folder for backwards compatibility 28 | if( !is_dir($this->plugin->getDataFolder().'resources') ){ 29 | @mkdir($this->plugin->getDataFolder().'resources'); 30 | } 31 | } 32 | 33 | 34 | 35 | /** loadAreas 36 | * @file resources/areas.json 37 | * @func this getSource 38 | * @var obj FeArea 39 | * @param array $data 40 | */ 41 | public function loadAreas(): bool{ 42 | // create a list of current areas from saved json 43 | $adata = $this->getDataSet( "areas" ); 44 | // 45 | $worlds = $this->getServerWorlds(); 46 | 47 | if( isset($adata) && is_array($adata) ){ 48 | 49 | foreach($adata as $area){ 50 | 51 | if( !isset($area["priority"]) ){ 52 | $area["priority"] = 0; 53 | } 54 | if( !isset($area["radius"]) ){ 55 | $area["radius"] = 0; 56 | } 57 | if( !isset($area["top"]) ){ 58 | $area["top"] = 0; 59 | } 60 | if( !isset($area["bottom"]) ){ 61 | $area["bottom"] = 0; 62 | } 63 | $newflags = []; // translated to new flag names 64 | foreach( $area["flags"] as $f => $set ){ 65 | $flagname = $this->isFlag( $f ); 66 | $newflags[$flagname] = $set; 67 | } 68 | 69 | // check if level excists 70 | if( in_array( $area["level"], $worlds ) ){ 71 | new FeArea($area["name"], $area["desc"], $area["priority"], $newflags, new Vector3($area["pos1"]["0"], $area["pos1"]["1"], $area["pos1"]["2"]), new Vector3($area["pos2"]["0"], $area["pos2"]["1"], $area["pos2"]["2"]), $area["radius"], $area["top"], $area["bottom"], $area["level"], $area["whitelist"], $area["commands"], $area["events"], $this->plugin); 72 | } 73 | 74 | } 75 | //$this->plugin->getLogger()->info( "Festival has ".count($adata)." area's set!" ); 76 | 77 | $this->saveAreas(); // make sure recent updates are saved 78 | 79 | $ca = 0; // plugin area command count 80 | $fa = 0; // plugin area flag count 81 | foreach( $this->plugin->areas as $a ){ 82 | foreach($a->flags as $flag){ 83 | if($flag){ 84 | $fa++; 85 | } 86 | } 87 | $ca = $ca + count( $a->getCommands() ); 88 | } 89 | $levelsloaded = count( $worlds ); 90 | $this->plugin->getLogger()->info( $fa.' '.Language::translate("flags").' '.Language::translate("select-and").' '. $ca .' '. Language::translate("cmds") .' '.Language::translate("select-in").' '. count($this->plugin->areas) .' '. Language::translate("areas").' ('.$levelsloaded.' '.Language::translate("levels").')'); 91 | return true; 92 | } 93 | return false; 94 | } 95 | 96 | /** Save areas 97 | * @var obj Festival 98 | * @var obj FeArea 99 | * @file areas.json 100 | */ 101 | public function saveAreas() : void{ 102 | // save current areas to json 103 | $areas = []; 104 | if( isset($this->plugin->areas) && is_array($this->plugin->areas) ){ 105 | 106 | foreach($this->plugin->areas as $area){ 107 | $areas[] = ["name" => $area->getName(), "desc" => $area->getDesc(), "priority" => $area->getPriority(), "flags" => $area->getFlags(), "pos1" => [$area->getFirstPosition()->getFloorX(), $area->getFirstPosition()->getFloorY(), $area->getFirstPosition()->getFloorZ()] , "pos2" => [$area->getSecondPosition()->getFloorX(), $area->getSecondPosition()->getFloorY(), $area->getSecondPosition()->getFloorZ()], "radius" => $area->getRadius(), "top" => $area->getTop(), "bottom" => $area->getBottom(), "level" => $area->getLevelName(), "whitelist" => $area->getWhitelist(), "commands" => $area->getCommands(), "events" => $area->getEvents()]; 108 | } 109 | 110 | $this->saveDataSet( "areas", $areas ); 111 | 112 | } 113 | } 114 | 115 | /** getAreaListSelected 116 | * @func this saveDataSet [] 117 | */ 118 | public function getAreaNameList( $sender = false, $cur = false ){ 119 | // default array empty 120 | $options = []; 121 | $slct = 0; 122 | $c = 0; 123 | foreach( $this->plugin->areas as $nm => $area ){ 124 | if($cur != false && $sender != false){ 125 | if( isset( $this->plugin->inArea[strtolower( $sender->getName() )][$nm] ) ){ 126 | $slct = $c; 127 | } 128 | } 129 | $options[] = $nm; 130 | $c++; 131 | } 132 | $lst = $options; 133 | if($cur != false){ 134 | $lst = [ $options, $slct ]; 135 | } 136 | return $lst; 137 | } 138 | 139 | 140 | 141 | /** getServerInfo 142 | * @func plugin getServer() 143 | */ 144 | public function getServerInfo() : ARRAY { 145 | $s = []; 146 | $s['ver'] = $this->plugin->getServer()->getVersion(); 147 | $s['api'] = $this->plugin->getServer()->getApiVersion(); 148 | return $s; 149 | } 150 | 151 | 152 | /** getServerWorlds 153 | * @func plugin getServer()->getDataPath() 154 | * @dir worlds 155 | */ 156 | public function getServerWorlds() : ARRAY { 157 | $worlds = []; 158 | $worldfolders = array_filter( glob($this->plugin->getServer()->getDataPath() . "worlds/*") , 'is_dir'); 159 | foreach( $worldfolders as $worldfolder) { 160 | $worlds[] = basename($worldfolder); 161 | $worldfolder = str_replace( $worldfolders, "", $worldfolder); 162 | if( $this->plugin->getServer()->isLevelLoaded($worldfolder) ) { 163 | continue; 164 | } 165 | /* Load all world levels 166 | if( !empty( $worldfolder ) ){ 167 | $this->plugin->getServer()->loadLevel($worldfolder); 168 | } */ 169 | } 170 | return $worlds; 171 | } 172 | 173 | 174 | /** saveConfig 175 | * @class Helper 176 | * @file resources/config.json 177 | * @param array $data 178 | */ 179 | public function saveConfig( $data ){ 180 | $this->plugin->config = $data; 181 | $this->saveDataSet( 'config', $data ); 182 | } 183 | 184 | 185 | /** newConfigPreset 186 | * @return array[ options, defaults ] 187 | */ 188 | public function newConfigPreset() : ARRAY { 189 | // world / area defaults 190 | $c = [ 191 | 'options' =>[ 192 | 'lang' => "en", // Language en/nl/pl/es 193 | 'itemid' => 201, // Purpur Pillar itemid key held item 194 | 'msgdisplay' => 'on', // msg display off,op,listed,on 195 | 'msgposition' => 'tip', // msg position msg,title,tip,pop 196 | 'areatitledisplay' => 'on', // area title display off,op,listed,on 197 | 'autowhitelist' => 'off', // area creator auto whitelist off,on 198 | 'flightcontrol' => 'on', // area fly-flag active off,on 199 | 'levelcontrol' => 'off', // area level flags active off,on 200 | //'compass' => 'off', // area level flags active off,on 201 | ], 202 | 'defaults' =>[ 203 | 'perms' => false, 204 | 'pass' => false, // previous passage(barrier) flag 205 | 'msg' => false, 206 | 'edit' => true, 207 | 'touch' => false, 208 | 'flight' => false, 209 | 'hurt' => false, // previous god flag 210 | 'fall' => false, // previous falldamage flag 211 | 'explode' => true, 212 | 'tnt' => true, 213 | 'fire' => false, 214 | 'shoot' => false, 215 | 'pvp' => false, 216 | 'effect' => false, // previous effect flag 217 | 'hunger' => false, 218 | 'drop' => false, 219 | 'mobs' => false, 220 | 'animals' => false, 221 | 'cmd' => false, // previous cmdmode flag 222 | ]]; 223 | return $c; 224 | } 225 | 226 | /** formatOldConfigs 227 | * @param array $c 228 | * @func plugin getLogger() 229 | * @func $this isFlag() 230 | * @func $this loadLevels 231 | * @func file_put_contents 232 | * @return array 233 | */ 234 | public function formatOldConfigs( $c ) : ARRAY { 235 | $p = $this->newConfigPreset(); 236 | // overwrite default presets 237 | $p['options']['lang'] = "en"; 238 | if( isset( $c['Options']['Language'] ) ){ 239 | $p['options']['lang'] = $c['Options']['Language']; 240 | } 241 | $p['options']['itemid'] = 201; // purpur_block 242 | if( isset( $c['Options']['ItemID'] ) ){ 243 | $p['options']['itemid'] = $c['Options']['ItemID']; 244 | } 245 | if( isset( $c['Options']['Msgdisplay'] ) ){ 246 | $p['options']['msgdisplay'] = "off"; 247 | if( $c['Options']['Msgdisplay'] == true || $c['Options']['Msgdisplay'] == "on" ){ 248 | $p['options']['msgdisplay'] = "on"; 249 | } 250 | } 251 | if( isset( $c['Options']['Msgtype'] ) ){ 252 | $p['options']['msgposition'] = $c['Options']['Msgtype']; 253 | } 254 | if( isset( $c['Options']['Areadisplay'] ) ){ 255 | $p['options']['areatitledisplay'] = $c['Options']['Areadisplay']; 256 | } 257 | $p['options']['autowhitelist'] = "off"; 258 | if( isset( $c['Options']['AutoWhitelist'] ) ){ 259 | $p['options']['autowhitelist'] = $c['Options']['AutoWhitelist']; 260 | } 261 | $p['options']['flightcontrol'] = "off"; 262 | if( isset( $c['Options']['FlightControl'] ) ){ 263 | $p['options']['flightcontrol'] = $c['Options']['FlightControl']; 264 | } 265 | $p['options']['levelcontrol'] = "off"; 266 | if( isset( $c['Options']['LevelControl'] ) ){ 267 | $p['options']['levelcontrol'] = $c['Options']['LevelControl']; 268 | } 269 | 270 | /* 271 | // compass option 272 | $p['options']['compass'] = "off"; 273 | if( isset( $c['Options']['Compass'] ) ){ 274 | $p['options']['compass'] = $c['Options']['Compass']; 275 | } 276 | */ 277 | 278 | 279 | 280 | if( isset( $c['Default'] ) && is_array( $c['Default'] ) ){ 281 | foreach( $c['Default'] as $fn => $set ){ 282 | $flagname = $this->isFlag( $fn ); 283 | if( isset($p['defaults'][$flagname]) ){ 284 | $p['defaults'][$flagname] = $set; 285 | } 286 | } 287 | } 288 | 289 | 290 | if( !$this->loadLevels() ){ // no level.json available 291 | $worldlist = $this->getServerWorlds(); // available levels (world folderr) 292 | foreach( $worldlist as $ln){ 293 | $desc = "Festival Area ". $ln; 294 | if( isset( $c['Worlds'][ $ln ] ) && is_array( $c['Worlds'][ $ln ] ) ){ // create level from old config 295 | $lvlflags = $c['Worlds'][ $ln ]; //$c['Worlds'][ strtolower($ln) ]; 296 | $newflags = []; 297 | foreach( $lvlflags as $f => $set ){ 298 | $flagname = $this->isFlag( $f ); 299 | $newflags[$flagname] = $set; 300 | } 301 | new FeLevel($ln, $desc, $p['options'], $newflags, $this->plugin); 302 | }else{ // create level from new config 303 | $presets = $this->newConfigPreset(); 304 | new FeLevel($ln, $desc, $presets['options'], $presets['defaults'], $this->plugin); 305 | } 306 | } 307 | //$this->plugin->getLogger()->info( "Configure level data.." ); //.. before translation is known.. 308 | $this->saveLevels( $this->plugin->levels ); 309 | } 310 | return $p; 311 | 312 | } 313 | 314 | /** loadLevels 315 | * @file resources/levels.json 316 | * @var plugin levels 317 | * @class FeLevel 318 | */ 319 | public function loadLevels(): bool{ 320 | 321 | // create a list of current levels from saved json 322 | $ldata = $this->getDataSet( "levels" ); 323 | 324 | if( isset($ldata) && is_array($ldata) && !empty($ldata[0])){ 325 | foreach($ldata as $level){ 326 | /* 327 | // new compass option 328 | if( !isset( $level["options"]['compass'] ) ){ 329 | $level["options"]['compass'] = "off"; 330 | } 331 | */ 332 | new FeLevel($level["name"], $level["desc"], $level["options"],$level["flags"], $this->plugin); 333 | } 334 | $this->plugin->getLogger()->info( "Level data set loaded!" ); 335 | $this->saveLevels( $this->plugin->levels ); 336 | return true; 337 | } 338 | return false; 339 | } 340 | 341 | /** saveLevels 342 | * @file resources/levels.json 343 | * @var plugin levels 344 | * @param array $data 345 | */ 346 | public function saveLevels(): void{ 347 | // save current levels to json 348 | foreach($this->plugin->levels as $level){ 349 | $levels[] = [ "name" => $level->getName(), "desc" => $level->getDesc(), "options" => $level->getOptions(), "flags" => $level->getFlags() ]; 350 | } 351 | $this->saveDataSet( 'levels', $levels ); 352 | } 353 | 354 | /** loadDefaultLevels 355 | * @var plugin config 356 | * @file resources/levels.json 357 | * @func plugin getLogger() 358 | * @func this saveLevels() 359 | * @var plugin levels 360 | * @class FeLevel 361 | */ 362 | public function loadDefaultLevels(){ 363 | // create a list of current levels with loaded configs 364 | $config = $this->plugin->config; 365 | 366 | $worldlist = $this->getServerWorlds(); 367 | if( is_array( $worldlist ) ){ 368 | new FeLevel("DEFAULT", "Default world level", $config['options'], $config['defaults'], $this->plugin); 369 | 370 | foreach( $worldlist as $ln){ 371 | $desc = "Festival Level ". $ln; 372 | new FeLevel($ln, $desc, $config['options'], $config['defaults'], $this->plugin); 373 | } 374 | 375 | $this->plugin->getLogger()->info( "Default level data set loaded!" ); 376 | $this->saveLevels(); 377 | } 378 | } 379 | 380 | /** loadDefaultAreas 381 | * @func this saveSource [] 382 | */ 383 | public function loadDefaultAreas(){ 384 | // default array empty 385 | $this->saveDataSet( "areas", [] ); 386 | } 387 | 388 | 389 | 390 | /** isFlag 391 | * @param string 392 | * @return string 393 | */ 394 | public function isFlag( $str ) : string { 395 | // flag names 396 | $names = [ 397 | "god","God","save","hurt", 398 | "pvp","PVP", 399 | "flight", "fly", 400 | "edit","Edit","build","break","place", 401 | "touch","Touch","interact", 402 | "mobs","Mobs","mob", 403 | "animals","Animals","animal", 404 | "effects","Effects","magic","effect", 405 | "tnt","TNT", 406 | "explode","Explode","explosion","explosions", 407 | "fire","Fire","fires","burn", 408 | "hunger","Hunger","starve", 409 | "drop","Drop", 410 | "msg","Msg","message", 411 | "passage","Passage","pass","barrier", 412 | "perms","Perms","perm", 413 | "falldamage","Falldamage","nofalldamage","fd","nfd","fall", 414 | "shoot","Shoot", "launch", 415 | "cmdmode","CMD","CMDmode","commandmode","cmdm", "cmd", 416 | ]; 417 | $str = strtolower( $str ); 418 | $flag = false; 419 | if( in_array( $str, $names ) ) { 420 | $flag = $str; 421 | if( $str == "save" || $str == "hurt" || $str == "god"){ 422 | $flag = "hurt"; 423 | } 424 | if( $str == "fly" || $str == "flight"){ 425 | $flag = "flight"; 426 | } 427 | if( $str == "build" || $str == "break" || $str == "place" || $str == "edit"){ 428 | $flag = "edit"; 429 | } 430 | if( $str == "touch" || $str == "interact" ){ 431 | $flag = "touch"; 432 | } 433 | if( $str == "animals" || $str == "animal" ){ 434 | $flag = "animals"; 435 | } 436 | if( $str == "mob" || $str == "mobs" ){ 437 | $flag = "mobs"; 438 | } 439 | if( $str == "magic" || $str == "effects" || $str == "effect" ){ 440 | $flag = "effect"; 441 | } 442 | if( $str == "message" || $str == "msg"){ 443 | $flag = "msg"; 444 | } 445 | if( $str == "perm" || $str == "perms" ){ 446 | $flag = "perms"; 447 | } 448 | if( $str == "passage" || $str == "barrier" || $str == "pass" ){ 449 | $flag = "pass"; 450 | } 451 | if( $str == "explosion" || $str == "explosions" || $str == "explode" ){ 452 | $flag = "explode"; 453 | } 454 | if( $str == "tnt" ){ 455 | $flag = "tnt"; 456 | } 457 | if( $str == "fire" || $str == "fires" || $str == "burn" ){ 458 | $flag = "fire"; 459 | } 460 | if( $str == "shoot" || $str == "launch" ){ 461 | $flag = "shoot"; 462 | } 463 | if( $str == "effect" || $str == "effects" || $str == "magic"){ 464 | $flag = "effect"; 465 | } 466 | if( $str == "hunger" || $str == "starve" ){ 467 | $flag = "hunger"; 468 | } 469 | if( $str == "nofalldamage" || $str == "falldamage" || $str == "fd" || $str == "nfd" || $str == "fall"){ 470 | $flag = "fall"; 471 | } 472 | if( $str == "cmd" || $str == "cmdmode" || $str == "commandmode" || $str == "cmdm"){ // ! command is used as function.. 473 | $flag = "cmd"; 474 | } 475 | } 476 | return $flag; 477 | } 478 | 479 | 480 | /** getDataSet 481 | * @param string $name 482 | * @param (string $type) 483 | * @func plugin getDataFolder() 484 | * @func yaml_parse_file 485 | * @func json_decode 486 | * @return array 487 | */ 488 | public function getDataSet( $name , $type = 'json' ) : ARRAY { 489 | if( file_exists($this->plugin->getDataFolder() . $name . ".". $type)){ 490 | switch( $type ){ 491 | case 'yml': 492 | case 'yaml': 493 | $data = yaml_parse_file($this->plugin->getDataFolder() . $name . ".yml"); // the old defaults 494 | break; 495 | case 'json': 496 | default: 497 | $data = json_decode( file_get_contents( $this->plugin->getDataFolder() . $name . ".json" ), true ); 498 | break; 499 | } 500 | } 501 | if( isset( $data ) && is_array( $data ) ){ 502 | return $data; 503 | } 504 | return []; 505 | } 506 | 507 | /** saveDataSet 508 | * @param string $name 509 | * @param array $data 510 | * @param string $type default 511 | * @func plugin getDataFolder() 512 | * @func FileConfig 513 | * @func json_encode 514 | * @func file_put_contents 515 | * @return array 516 | */ 517 | public function saveDataSet( $name, $data, $type = 'json') : ARRAY { 518 | switch( $type ){ 519 | case 'yml': 520 | case 'yaml': 521 | $src = new FileConfig($this->plugin->getDataFolder(). $name . ".yml", FileConfig::YAML, $data); 522 | $src->save(); 523 | break; 524 | case 'json': 525 | default: 526 | file_put_contents( $this->plugin->getDataFolder() . $name . ".json", json_encode( $data ) ); 527 | break; 528 | } 529 | return $this->getDataSet( $name , $type ); 530 | } 531 | 532 | /** getSource 533 | * @param string $name 534 | * @param (string $type) 535 | * @func plugin getDataFolder() 536 | * @func yaml_parse_file 537 | * @func json_decode 538 | * @return array 539 | */ 540 | public function getSource( $name , $type = 'json' ) : ARRAY { 541 | if( file_exists($this->plugin->getDataFolder() . "resources" . DIRECTORY_SEPARATOR . $name . ".". $type)){ 542 | switch( $type ){ 543 | case 'yml': 544 | case 'yaml': 545 | $data = yaml_parse_file($this->plugin->getDataFolder() . "resources" . DIRECTORY_SEPARATOR . $name . ".yml"); // the old defaults 546 | break; 547 | case 'json': 548 | default: 549 | $data = json_decode( file_get_contents( $this->plugin->getDataFolder() . "resources" . DIRECTORY_SEPARATOR . $name . ".json" ), true ); 550 | break; 551 | } 552 | } 553 | if( isset( $data ) && is_array( $data ) ){ 554 | return $data; 555 | } 556 | return []; 557 | } 558 | 559 | 560 | /** saveSource 561 | * @param string $name 562 | * @param array $data 563 | * @param string $type default 564 | * @func plugin getDataFolder() 565 | * @func FileConfig 566 | * @func json_encode 567 | * @func file_put_contents 568 | * @return array 569 | */ 570 | public function saveSource( $name, $data, $type = 'json') : ARRAY { 571 | switch( $type ){ 572 | case 'yml': 573 | case 'yaml': 574 | $src = new FileConfig($this->plugin->getDataFolder(). "resources" . DIRECTORY_SEPARATOR . $name . ".yml", FileConfig::YAML, $data); 575 | $src->save(); 576 | break; 577 | case 'json': 578 | default: 579 | file_put_contents( $this->plugin->getDataFolder() . "resources" . DIRECTORY_SEPARATOR . $name . ".json", json_encode( $data ) ); 580 | break; 581 | } 582 | return $this->getSource( $name , $type ); 583 | } 584 | 585 | public function isPluginLoaded(string $pluginName){ 586 | 587 | return ($findplugin = $this->plugin->getServer()->getPluginManager()->getPlugin($pluginName)) !== null and $findplugin->isEnabled(); 588 | 589 | } 590 | 591 | } 592 | --------------------------------------------------------------------------------