From ee6fba570a80de9b02a7b4e21acba271ee8cecd0 Mon Sep 17 00:00:00 2001 From: bptube <45150580+bptube@users.noreply.github.com> Date: Fri, 5 Apr 2019 14:49:36 -0300 Subject: [PATCH 01/26] Added Spanish language The Spanish language has been added, it is still 90% please report bugs. --- resources/es.json | 117 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 resources/es.json diff --git a/resources/es.json b/resources/es.json new file mode 100644 index 0000000..9ffa40e --- /dev/null +++ b/resources/es.json @@ -0,0 +1,117 @@ +{ + "language-name": "Spanish", + "language-selected": "Has Seleccionado el Espaol", + + "enabled-console-msg": "Festival ahora habilitado, ingls seleccionado (ajustar con /fe lang ).", + + "cmd-ingameonly-msg": "El comando solo puede ser usado en el juego.", + "cmd-unknown-msg": "Comando desconocido", + "cmd-noperms-msg": "No puedes usar este comando del Festival.", + "cmd-noperms-subcommand": "No tienes permiso para usar este subcomando.", + + + "pos-select-active": "Ya ests seleccionando una posicin!", + "select-both-pos-first":"Por favor, seleccione ambas posiciones primero.", + "pos1": "posicin 1", + "pos2": "posicin 2", + "make-pos1": "Por favor coloque o rompa la primera posicin.", + "make-pos2": "Por favor coloque o rompa la segunda posicin.", + "give-area-name": "Por favor, especifique un nombre para esta rea.", + + "in-unknown-area": "Estas en un area desconocida", + + "area": "Area", + "areas": "areas", + "level": "nivel", + "level": "niveles", + "player": "jugador", + "players": "jugadores", + "the-area": "La zona", + "the-level": "El nivel", + "area-created": "rea creada!", + "created-by":"creado por", + "area-here": "Area aqui", + "area-no-area-available": "No hay rea disponible", + "area-no-area-to-edit": "No hay reas que puedas editar.", + "area-name-excist": "Ya existe un rea con ese nombre.", + "area-not-excist": "rea no existe.", + "cannot-be-found": "no pudo ser encontrado.", + "area-list" : "Lista de reas", + "players-in-area": "jugadores en el area", + "area-whitelist": "lista blanca", + "area-no-commands": "sin comandos adjuntos", + "player-has-been-whitelisted": "ha sido incluido en la lista blanca en el rea", + "player-allready-whitelisted": "Ya est en la lista blanca en el rea", + "player-has-been-unwhitelisted": "Ha sido excluido de la lista blanca de est area", + "player-allready-unwhitelisted": "ya est excluido en la lista blanca del rea", + "whitelist-specify-action": "Por favor, especifique una accin vlida. Us: /area whitelist ", + + "desc-saved": "Descripcin guardada.", + "desc-write-usage": "Por favor escriba la descripcin. Us: /fe desc <..>", + "desc-specify-area": "Por favor, especifique un rea para editar la descripcin. Us: /fe desc ", + + + "area-deleted": "rea eliminada!", + "deleted-by":"eliminado por", + "specify-to-delete":"Por favor, especifique un rea para eliminar.", + + + "flag": "flag", + "flags": "flags", + "flag-not-found-list": "Flag no encontrada (Flags: god, pvp, flight, edit, touch, animals, mobs, effects, msg, passage, drop, tnt, shoot, hunger, perms, falldamage)", + "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)", + "specify-to-flag": "Por favor, especifique el rea en la que le gustara colocar una flag", + + "tp-to-area-active": "Ests teletransportando a la zona", + "specify-excisting-area-name": "Por favor, especifique un nombre de rea existente.", + + "cmd": "comando", + "cmds": "comandos", + "cmd-id": "ID del comando", + "cmd-list": "Lista de comandos", + "-event": "-evento", + "set-for-area": "establecer para el rea", + "added-to-area": "aadido al rea", + "allready-used-for": "ya utilizado para", + "allready-set-for-area": "ya establecido para el rea", + "edit-id-or-other": ", edita este id o usa otro id", + "cmd-specify-id-and-command-usage": "Por favor, especifique el ID de comando y el comando para agregar. Us: /fe command y ", + "cmd-valid-areaname": "rea no encontrada, por favor enve un nombre vlido. Us: /fe command .", + + "cmd-id-not-found": "ID de comando no encontrado. Ver los comandos con /fe event command list'", + "cmd-specify-id-to-delete": "Por favor, especifique el ID del comando para eliminar. Us /fe event command del ", + "cmd-specify-action": "Por favor agregue una accin para realizar con el comando. Us: /fe command .", + + "event": "evento", + "event-is-now": "evento es ahora", + "change-failed": "cambio-fallido!", + + "select-and": "y", + "select-in": "en", + "select-yes": "S", + "select-no": "No", + "status-on": "Encendido", + "status-off": "Apagado", + "set-to": "ajustado a", + "for-area": "Por rea", + + "all-players-are-god": "Todos los jugadores son dios en esta rea!", + "no-pvp-area": "Ests en un rea sin PVP!", + "no-flight-area": "NO puede volar aqu!", + "flight-area": "Se permite volar aqu!", + + "leaving-area": "saliendo", + "enter-area": "entrando", + "leaving-center-area": "Saliendo del centro de la area.", + "enter-center-area": "Entrando en el centro del rea.", + "cannot-enter-area": "No puedes entrar al area", + "cannot-leave-area": "No puedes dejar la zona.", + "enter-barrier-area": "acaba de pasar una barrera!", + + "option-missing-in-config": "opcin que falta en config.yml, ahora configurada en", + "flag-missing-in-config": "faltan valores predeterminados de la bandera, ahora se establece en", + "barrier-is-passage-flag": "Se us la antigua configuracin de barrera, ahora configurada en 'false'; por favor renombra 'Barrier' por 'Passage' en config.yml", + "no-is-falldamage-flag": "Se us la antigua configuracin de barrera, ahora configurada en 'false'; por favor renombra 'Barrier' por 'Passage' en config.yml", + "option-see-configfile": "Por favor, vea configuraciones originales en /resources/config.yml" + +} From 97c0bf53e4c6d80e8c4d60e967a75d5f9aabe007 Mon Sep 17 00:00:00 2001 From: bptube <45150580+bptube@users.noreply.github.com> Date: Fri, 5 Apr 2019 14:51:36 -0300 Subject: [PATCH 02/26] Now start in Spanish Now start in Spanish, report any errors. --- resources/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/config.yml b/resources/config.yml index 8100fc2..9a25f6c 100644 --- a/resources/config.yml +++ b/resources/config.yml @@ -3,7 +3,7 @@ # Festival options Options: # select a language: English = en, Dutch = nl, translate please ! - language: en + language: es # Area Messages Display position (msg/title/tip/pop) Msgtype: msg From 6e35be6961d55362d12122edb6b42e7a0dc24448 Mon Sep 17 00:00:00 2001 From: Genboy <30810841+genboy@users.noreply.github.com> Date: Fri, 5 Apr 2019 23:18:22 +0200 Subject: [PATCH 03/26] Update config.yml --- resources/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/config.yml b/resources/config.yml index 9a25f6c..95d7eee 100644 --- a/resources/config.yml +++ b/resources/config.yml @@ -3,7 +3,7 @@ # Festival options Options: # select a language: English = en, Dutch = nl, translate please ! - language: es + Language: es # Area Messages Display position (msg/title/tip/pop) Msgtype: msg From 1f0ba45f5a8234fe5ca4175c1c516634dbb5adcf Mon Sep 17 00:00:00 2001 From: genboy Date: Fri, 5 Apr 2019 23:19:43 +0200 Subject: [PATCH 04/26] Case sensitive Language option --- README.md | 6 +- areas.json | 1 + config.yml | 237 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 241 insertions(+), 3 deletions(-) create mode 100644 areas.json create mode 100644 config.yml diff --git a/README.md b/README.md index b8a15db..49dd77e 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ ## Festival - -If you like Festival please [vote](https://poggit.pmmp.io/p/Festival/1.1.1) and [share your experience](https://github.com/genboy/Festival/issues) to help Festival plugin improve, thank you! - +Consider posting your first [share your experience and issues](https://github.com/genboy/Festival/issues) before posting a [vote](https://poggit.pmmp.io/p/Festival/1.1.1) if you like to use Festival! +That way it will improve Festival, my coding skills, your PMMP insights and the PMMP community, thank you! + ![Festival plugin logo large](https://genboy.net/wp-content/uploads/2018/02/festival_plugin_logo.png) Create a festival with this custom area events plugin for Pocketmine Server: diff --git a/areas.json b/areas.json new file mode 100644 index 0000000..c1b6bb0 --- /dev/null +++ b/areas.json @@ -0,0 +1 @@ +[{"name":"parcour1","desc":"Building area1","flags":{"edit":true,"god":false,"touch":false,"msg":false,"passage":false,"perms":false,"drop":false,"effects":false,"pvp":false,"flight":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[45,55,151],"pos2":[207,117,3],"level":"world","whitelist":[],"commands":[],"events":[]},{"name":"fall","desc":"You are save to jump!","flags":{"edit":true,"god":false,"touch":true,"msg":false,"passage":false,"perms":false,"drop":false,"effects":false,"pvp":false,"flight":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[305,92,219],"pos2":[309,70,215],"level":"world","whitelist":["g3nboy"],"commands":{"99":"gamemode c @p","98":"gamemode s @p"},"events":{"enter":"99","leave":"98"}},{"name":"falltest","desc":"add description here","flags":{"edit":false,"god":false,"touch":true,"msg":false,"passage":false,"perms":false,"drop":false,"effects":false,"pvp":false,"flight":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[302,70,218],"pos2":[299,73,214],"level":"world","whitelist":["g3nboy"],"commands":{"1":"fe tp fall"},"events":{"enter":"1"}},{"name":"skycatch1","desc":"Help!","flags":{"edit":false,"god":false,"touch":false,"drop":false,"msg":false,"passage":false,"perms":false,"effects":false,"pvp":false,"flight":true,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[505,12,-237],"pos2":[201,48,204],"level":"skyland","whitelist":["g3nboy"],"commands":{"1":"fe tp erock_portal1","2":"fe tp erock_portal1"},"events":{"leave":"1","enter":"2"}},{"name":"themebox1barrier","desc":"","flags":{"edit":false,"god":false,"touch":false,"drop":false,"msg":false,"passage":false,"perms":false,"effects":false,"pvp":false,"flight":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[58,205,58],"pos2":[-42,0,-42],"level":"themebox1","whitelist":["g3nboy"],"commands":[],"events":[]},{"name":"test1","desc":"","flags":{"edit":false,"god":false,"touch":false,"drop":false,"msg":false,"passage":false,"perms":false,"effects":false,"pvp":false,"flight":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[281,68,209],"pos2":[284,72,211],"level":"world","whitelist":[],"commands":{"1":"fe tp erock_portal1"},"events":{"enter":"1"}},{"name":"magic1","desc":"","flags":{"edit":true,"god":false,"touch":false,"drop":false,"msg":false,"passage":false,"perms":false,"effects":false,"pvp":false,"flight":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[370,72,209],"pos2":[381,82,220],"level":"world","whitelist":[],"commands":[],"events":[]},{"name":"test2","desc":"","flags":{"edit":false,"god":false,"touch":false,"drop":false,"msg":false,"passage":false,"perms":false,"effects":false,"pvp":false,"flight":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[296,68,208],"pos2":[293,73,210],"level":"world","whitelist":["g3nboy"],"commands":{"1":"fe tp entryExample"},"events":{"enter":"1"}},{"name":"erock_portal1","desc":"","flags":{"edit":true,"god":false,"touch":false,"effects":false,"drop":false,"msg":false,"passage":false,"perms":false,"pvp":false,"flight":true,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":true},"pos1":[397,91,23],"pos2":[395,87,25],"level":"skyland","whitelist":["g3nboy"],"commands":[],"events":[]},{"name":"homeportal1","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":false,"touch":false,"effects":false,"drop":true,"msg":false,"passage":false,"perms":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[418,88,-2],"pos2":[412,98,1],"level":"skyland","whitelist":["bluemountain376"],"commands":{"1":"fe tp worldhome"},"events":{"enter":"1"}},{"name":"blankhome","desc":"","flags":{"edit":true,"god":true,"pvp":false,"flight":true,"touch":false,"effects":false,"drop":false,"msg":false,"passage":false,"perms":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[866,219,877],"pos2":[893,251,903],"level":"blank","whitelist":["g3nboy"],"commands":[],"events":[]},{"name":"buildstation1","desc":"","flags":{"edit":true,"god":true,"pvp":false,"flight":true,"touch":false,"effects":false,"drop":false,"msg":false,"passage":false,"perms":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[344,66,192],"pos2":[324,85,164],"level":"world","whitelist":["g3nboy"],"commands":[],"events":[]},{"name":"buildarea1","desc":"Free building area!","flags":{"edit":false,"god":false,"pvp":true,"flight":false,"touch":false,"effects":true,"drop":false,"msg":false,"passage":false,"perms":false,"tnt":true,"hunger":true,"shoot":false,"falldamage":true,"mobs":false,"animals":false,"cmdmode":false,"explode":true,"fire":true},"pos1":[338,47,470],"pos2":[669,90,-48],"level":"world","whitelist":[],"commands":{"50":"gamemode c @p","51":"gamemode s @p"},"events":{"enter":"50","leave":"51"}},{"name":"worldhome","desc":"","flags":{"edit":true,"god":true,"pvp":true,"flight":false,"touch":false,"effects":true,"drop":true,"msg":false,"passage":false,"perms":false,"tnt":true,"hunger":true,"shoot":true,"falldamage":false,"mobs":true,"animals":false,"cmdmode":false,"explode":false,"fire":true},"pos1":[351,130,71],"pos2":[88,64,315],"level":"world","whitelist":[],"commands":[],"events":[]},{"name":"fort1","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":false,"touch":false,"effects":false,"msg":false,"passage":false,"drop":false,"tnt":true,"shoot":false,"hunger":false,"perms":false,"falldamage":true,"mobs":false,"animals":false,"cmdmode":false,"explode":true,"fire":true},"pos1":[335,43,173],"pos2":[194,124,-43],"level":"world","whitelist":[],"commands":[],"events":[]},{"name":"example1","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":true,"touch":false,"animals":false,"mobs":false,"effects":false,"msg":false,"passage":false,"drop":false,"tnt":false,"shoot":false,"hunger":false,"perms":false,"falldamage":true,"cmdmode":false,"explode":false,"fire":false},"pos1":[262,66,34],"pos2":[269,69,27],"level":"world","whitelist":["g3nboy"],"commands":[],"events":[]},{"name":"goto_example1","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":true,"touch":false,"animals":false,"mobs":false,"effects":false,"msg":false,"passage":false,"drop":false,"tnt":false,"shoot":false,"hunger":false,"perms":false,"falldamage":true,"cmdmode":false,"explode":false,"fire":false},"pos1":[260,67,97],"pos2":[265,70,93],"level":"world","whitelist":[],"commands":{"1":"fe tp example1 "},"events":{"center":"1"}},{"name":"entryexample","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":true,"touch":false,"animals":false,"mobs":false,"effects":false,"msg":false,"passage":false,"drop":false,"tnt":false,"shoot":false,"hunger":false,"perms":false,"falldamage":true,"cmdmode":false,"explode":false,"fire":false},"pos1":[263,70,109],"pos2":[258,73,113],"level":"world","whitelist":[],"commands":[],"events":[]},{"name":"leaveexample","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":true,"touch":false,"animals":false,"mobs":false,"effects":false,"msg":false,"passage":false,"drop":false,"tnt":false,"shoot":false,"hunger":false,"perms":false,"falldamage":true,"cmdmode":false,"explode":false,"fire":false},"pos1":[263,68,-2],"pos2":[258,73,2],"level":"world","whitelist":["g3nboy"],"commands":{"1":"fe tp worldhome"},"events":{"enter":"1"}},{"name":"compound1","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":false,"touch":false,"animals":false,"mobs":true,"effects":false,"msg":false,"passage":false,"drop":false,"tnt":true,"shoot":false,"hunger":false,"perms":false,"falldamage":true,"cmdmode":false,"explode":true,"fire":true},"pos1":[787,179,943],"pos2":[705,255,846],"level":"blank","whitelist":["g3nboy"],"commands":[],"events":[]},{"name":"fireplace1","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":false,"touch":false,"animals":false,"mobs":false,"effects":false,"msg":true,"passage":false,"drop":false,"explode":true,"tnt":false,"fire":false,"shoot":false,"hunger":false,"perms":false,"falldamage":true,"cmdmode":false},"pos1":[798,204,910],"pos2":[804,211,916],"level":"blank","whitelist":["g3nboy"],"commands":[],"events":[]}] diff --git a/config.yml b/config.yml new file mode 100644 index 0000000..8525971 --- /dev/null +++ b/config.yml @@ -0,0 +1,237 @@ +# Config file for Festival + +# Festival options +Options: + # select a language: English = en, Dutch = nl, translate please ! + Language: nl + + # Area Messages Display position (msg/title/tip/pop) + Msgtype: pop + + # Area Messages persist display to ops (off/op/on) + Msgdisplay: off + + # Area Floating Title display to ops (off/op/on) + Areadisplay: on + + # Auto whitelist area creator (on/off) + AutoWhitelist: on + +# Flag settings for unprotected areas +# Flag rule: a flag protects the area and the players in it +# These are the default flags, default flags for new worlds and defaults for individual worlds: +Default: + + # Keep players from getting hurt? (true = Player god mode) + God: false + + # Keep players from getting hurt by other players? (true = NoPVP) + PVP: false + + # Keep players from flying? (true = NoFlight) + Flight: false + + # Keep players from editing the world? (true = NoEdit) + Edit: true + + # Keep players from touching blocks and activating things like chests? (true = NoTouching) + Touch: false + + # Prevent Animal Entities from spawning? (true = NoAnimals) + Animals: false + + # Prevent Mob Entities from spawning? (true = NoMobs) + Mobs: false + + # Keep players from having effects like speed or night vision? (true = NoEffects) + Effects: false + + # Keep players from seeing enter/leave/description messages? (true = NoMessages) + Msg: false + + # Prevent players from enter/leaving the area? (barrier) (true = NoPassage) + Passage: false + + # Keep players from dropping items in the area? (true = NoDropping) + Drop: false + + # No explosions allowed in the area? (true = NoExplosions) + TNT: false + + # No shooting allowed in the area? (true = NoShooting) + Shoot: false + + # Keep players from hunger(exhaust) in the area? (true = NoExhaust) + Hunger: false + + # Keep players from executing area event commands without specific perms (true = No Op Permissons) + Perms: false + + # Keep players from taking fall damage (true = NoFallDamage) + FallDamage: true + + # Keep area event commands from executing for non-ops (command test mode) + CMDmode: false + +# Settings for unprotected areas in individual worlds: +Worlds: + + # New worlds (ie. automatic generated) + DEFAULT: + + # Keep players from getting hurt? (true = Player god mode) + God: false + + # Keep players from getting hurt by other players? (true = NoPVP) + PVP: false + + # Keep players from flying? (true = NoFlight) + Flight: true + + # Keep players from editing the world? (true = NoEdit) + Edit: true + + # Keep players from touching blocks and activating things like chests? (true = NoTouching) + Touch: false + + # Prevent Animal Entities from spawning? (true = NoAnimals) + Animals: false + + # Prevent Mob Entities from spawning? (true = NoMobs) + Mobs: false + + # Keep players from having effects like speed or night vision? (true = NoEffects) + Effects: false + + # Keep players from seeing enter/leave/description messages? (true = NoMessages) + Msg: false + + # Prevent players from enter/leaving the area? (barrier) (true = NoPassage) + Passage: false + + # Keep players from dropping items in the area? (true = NoDropping) + Drop: false + + # No explosions allowed in the area? (true = NoExplosions) + TNT: false + + # No shooting allowed in the area? (true = NoShooting) + Shoot: false + + # Keep players from hunger(exhaust) in the area? (true = NoExhaust) + Hunger: false + + # Keep players from executing area event commands without specific perms (true = No Op Permissons) + Perms: false + + # Keep players from taking fall damage (true = NoFallDamage) + FallDamage: true + + # Keep area event commands from executing for non-ops (command test mode) + CMDmode: false + + world: + + # Keep players from getting hurt? (true = Player god mode) + God: false + + # Keep players from getting hurt by other players? (true = NoPVP) + PVP: false + + # Keep players from flying? (true = NoFlight) + Flight: true + + # Keep players from editing the world? (true = NoEdit) + Edit: false + + # Keep players from touching blocks and activating things like chests? (true = NoTouching) + Touch: false + + # Prevent Animal Entities from spawning? (true = NoAnimals) + Animals: false + + # Prevent Mob Entities from spawning? (true = NoMobs) + Mobs: false + + # Keep players from having effects like speed or night vision? (true = NoEffects) + Effects: false + + # Keep players from seeing enter/leave/description messages? (true = NoMessages) + Msg: false + + # Prevent players from enter/leaving the area? (barrier) (true = NoPassage) + Passage: false + + # Keep players from dropping items in the area? (true = NoDropping) + Drop: false + + # No explosions allowed in the area? (true = NoExplosions) + TNT: false + + # No shooting allowed in the area? (true = NoShooting) + Shoot: false + + # Keep players from hunger(exhaust) in the area? (true = NoExhaust) + Hunger: false + + # Keep players from executing area event commands without specific perms (true = No Op Permissons) + Perms: false + + # Keep players from taking fall damage (true = NoFallDamage) + FallDamage: true + + # Keep area event commands from executing for non-ops (command test mode) + CMDmode: false + + lobby: + + # Keep players from getting hurt? (true = Player god mode) + God: false + + # Keep players from getting hurt by other players? (true = NoPVP) + PVP: false + + # Keep players from flying? (true = NoFlight) + Flight: true + + # Keep players from editing the world? (true = NoEdit) + Edit: true + + # Keep players from touching blocks and activating things like chests? (true = NoTouching) + Touch: false + + # Prevent Animal Entities from spawning? (true = NoAnimals) + Animals: false + + # Prevent Mob Entities from spawning? (true = NoMobs) + Mobs: false + + # Keep players from having effects like speed or night vision? (true = NoEffects) + Effects: false + + # Keep players from seeing enter/leave/description messages? (true = NoMessages) + Msg: false + + # Prevent players from enter/leaving the area? (barrier) (true = NoPassage) + Passage: false + + # Keep players from dropping items in the area? (true = NoDropping) + Drop: false + + # No explosions allowed in the area? (true = NoExplosions) + TNT: false + + # No shooting allowed in the area? (true = NoShooting) + Shoot: false + + # Keep players from hunger(exhaust) in the area? (true = NoExhaust) + Hunger: false + + # Keep players from executing area event commands without specific perms (true = No Op Permissons) + Perms: false + + # Keep players from taking fall damage (true = NoFallDamage) + FallDamage: true + + # Keep area event commands from executing for non-ops (command test mode) + CMDmode: false From b124be292047eed8a39e8ecd5d94a8da4b4821e6 Mon Sep 17 00:00:00 2001 From: genboy Date: Tue, 16 Apr 2019 19:49:41 +0200 Subject: [PATCH 05/26] Fix language switch ~_- still character problem to fix next --- resources/config.yml | 2 +- src/genboy/Festival/Main.php | 27 ++++++++++++++++++--------- src/genboy/Festival/lang/Language.php | 7 ++++++- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/resources/config.yml b/resources/config.yml index 95d7eee..f651c4b 100644 --- a/resources/config.yml +++ b/resources/config.yml @@ -2,7 +2,7 @@ # Festival options Options: - # select a language: English = en, Dutch = nl, translate please ! + # select a language: English = en, Dutch = nl, translate please Language: es # Area Messages Display position (msg/title/tip/pop) diff --git a/src/genboy/Festival/Main.php b/src/genboy/Festival/Main.php index ca7b9cd..82031ee 100644 --- a/src/genboy/Festival/Main.php +++ b/src/genboy/Festival/Main.php @@ -201,7 +201,8 @@ public function onEnable() : void{ } $this->options = $c["Options"]; }else{ - $this->options = array("Language"=>"en", "Msgtype"=>"pop", "Msgdisplay"=>"off", "AutoWhitelist"=>"on"); // Fallback defaults + $this->options = array("Language"=>"en", "Msgtype"=>"pop", "Msgdisplay"=>"off", "AutoWhitelist"=>"on"); // Fallback defaults + //$newchange['Options'] = "! Config Options missing in config.yml, defaults are set for now; please see /resources/config.yml"; $newchange['Options'] = "! ".Language::translate("option-missing-in-config")."; ". Language::translate("option-see-configfile"); } @@ -430,7 +431,7 @@ public function onEnable() : void{ $this->saveAreas(); // all save $this->areaList available :) /** load language translation class */ - $this->loadLanguage( $languageCode = $this->options["Language"] ); + $this->loadLanguage( $this->options["Language"] ); /** console output */ $this->getLogger()->info( Language::translate("enabled-console-msg") ); @@ -463,14 +464,22 @@ public function onEnable() : void{ * @file resources nl.json * @var obj Language */ - public function loadLanguage($languageCode = 'en' ){ + public function loadLanguage( $languageCode = false ){ + + if( !$languageCode ){ + $languageCode = 'en'; + } + $resources = $this->getResources(); // read files in resources folder - foreach($resources as $resource){ + + foreach($resources as $resource){ if($resource->getFilename() === "en.json"){ - $default = json_decode(file_get_contents($resource->getPathname(), true), true); + $text = utf8_decode( file_get_contents($resource->getPathname(), true) ); + $default = json_decode($text, true); } if($resource->getFilename() === $languageCode.".json"){ - $setting = json_decode(file_get_contents($resource->getPathname(), true), true); + $text = utf8_decode( file_get_contents($resource->getPathname(), true) ); + $setting = json_decode($text, true); } } if(isset($setting)){ @@ -486,8 +495,8 @@ public function loadLanguage($languageCode = 'en' ){ * @var obj Player */ public function setLanguage( $lang, $player ){ - $this->options["Language"] = $lang; - $this->loadLanguage(); + $this->options["Language"] = strtolower( $lang ); + $this->loadLanguage( $this->options["Language"] ); $msg = TextFormat::AQUA . Language::translate("language-selected"); $this->areaMessage( $msg, $player ); } @@ -603,7 +612,7 @@ public function onCommand(CommandSender $sender, Command $cmd, string $label, ar switch($action){ case "lang": // experiment v1.0.7.7-dev if( isset($args[1]) ){ - if($sender->hasPermission("festival") || $sender->hasPermission("festival.command") || $sender->hasPermission("festival.command.fe.lang")){ + if($sender->hasPermission("festival") || $sender->hasPermission("festival.command") || $sender->hasPermission("festival.command.fe.lang")){ $lang = $args[1]; $this->setLanguage( $lang, $sender ); } diff --git a/src/genboy/Festival/lang/Language.php b/src/genboy/Festival/lang/Language.php index cf191ab..5639c1e 100644 --- a/src/genboy/Festival/lang/Language.php +++ b/src/genboy/Festival/lang/Language.php @@ -18,7 +18,12 @@ public function __construct($owner, $langjson){ static function translate($key){ - $txt = self::$instance->trans[$key]; + + + $txt_code = self::$instance->trans[$key]; + + $txt = utf8_decode( $txt_code ); + if (strpos($txt, "%n") != false) { $text = str_replace("%n", "\n", $txt); } else { From a5372c8e262f500eabc8d2ba4950d199b5272946 Mon Sep 17 00:00:00 2001 From: genboy Date: Tue, 16 Apr 2019 22:47:30 +0200 Subject: [PATCH 06/26] Translation encode json utf-8 fixed --- src/genboy/Festival/Main.php | 8 ++++---- src/genboy/Festival/lang/Language.php | 16 +--------------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/src/genboy/Festival/Main.php b/src/genboy/Festival/Main.php index 82031ee..3d1473b 100644 --- a/src/genboy/Festival/Main.php +++ b/src/genboy/Festival/Main.php @@ -474,12 +474,12 @@ public function loadLanguage( $languageCode = false ){ foreach($resources as $resource){ if($resource->getFilename() === "en.json"){ - $text = utf8_decode( file_get_contents($resource->getPathname(), true) ); - $default = json_decode($text, true); + $text = utf8_encode( file_get_contents($resource->getPathname(), true) ); // json content in utf-8 + $default = json_decode($text, true); // php decode utf-8 } if($resource->getFilename() === $languageCode.".json"){ - $text = utf8_decode( file_get_contents($resource->getPathname(), true) ); - $setting = json_decode($text, true); + $text = utf8_encode( file_get_contents($resource->getPathname(), true) ); + $setting = json_decode($text, true); // php decode utf-8 } } if(isset($setting)){ diff --git a/src/genboy/Festival/lang/Language.php b/src/genboy/Festival/lang/Language.php index 5639c1e..d74f974 100644 --- a/src/genboy/Festival/lang/Language.php +++ b/src/genboy/Festival/lang/Language.php @@ -1,36 +1,22 @@ owner = $owner; $this->trans = $langjson; self::$instance = $this; - } - static function translate($key){ - - - - $txt_code = self::$instance->trans[$key]; - - $txt = utf8_decode( $txt_code ); - + $txt = self::$instance->trans[$key]; if (strpos($txt, "%n") != false) { $text = str_replace("%n", "\n", $txt); } else { $text = $txt; } return $text; - } - } From 0166cc223a60e7af5d9135760e9f236e249788a8 Mon Sep 17 00:00:00 2001 From: Genboy <30810841+genboy@users.noreply.github.com> Date: Tue, 16 Apr 2019 23:02:40 +0200 Subject: [PATCH 07/26] Delete config.yml --- config.yml | 237 ----------------------------------------------------- 1 file changed, 237 deletions(-) delete mode 100644 config.yml diff --git a/config.yml b/config.yml deleted file mode 100644 index 8525971..0000000 --- a/config.yml +++ /dev/null @@ -1,237 +0,0 @@ -# Config file for Festival - -# Festival options -Options: - # select a language: English = en, Dutch = nl, translate please ! - Language: nl - - # Area Messages Display position (msg/title/tip/pop) - Msgtype: pop - - # Area Messages persist display to ops (off/op/on) - Msgdisplay: off - - # Area Floating Title display to ops (off/op/on) - Areadisplay: on - - # Auto whitelist area creator (on/off) - AutoWhitelist: on - -# Flag settings for unprotected areas -# Flag rule: a flag protects the area and the players in it -# These are the default flags, default flags for new worlds and defaults for individual worlds: -Default: - - # Keep players from getting hurt? (true = Player god mode) - God: false - - # Keep players from getting hurt by other players? (true = NoPVP) - PVP: false - - # Keep players from flying? (true = NoFlight) - Flight: false - - # Keep players from editing the world? (true = NoEdit) - Edit: true - - # Keep players from touching blocks and activating things like chests? (true = NoTouching) - Touch: false - - # Prevent Animal Entities from spawning? (true = NoAnimals) - Animals: false - - # Prevent Mob Entities from spawning? (true = NoMobs) - Mobs: false - - # Keep players from having effects like speed or night vision? (true = NoEffects) - Effects: false - - # Keep players from seeing enter/leave/description messages? (true = NoMessages) - Msg: false - - # Prevent players from enter/leaving the area? (barrier) (true = NoPassage) - Passage: false - - # Keep players from dropping items in the area? (true = NoDropping) - Drop: false - - # No explosions allowed in the area? (true = NoExplosions) - TNT: false - - # No shooting allowed in the area? (true = NoShooting) - Shoot: false - - # Keep players from hunger(exhaust) in the area? (true = NoExhaust) - Hunger: false - - # Keep players from executing area event commands without specific perms (true = No Op Permissons) - Perms: false - - # Keep players from taking fall damage (true = NoFallDamage) - FallDamage: true - - # Keep area event commands from executing for non-ops (command test mode) - CMDmode: false - -# Settings for unprotected areas in individual worlds: -Worlds: - - # New worlds (ie. automatic generated) - DEFAULT: - - # Keep players from getting hurt? (true = Player god mode) - God: false - - # Keep players from getting hurt by other players? (true = NoPVP) - PVP: false - - # Keep players from flying? (true = NoFlight) - Flight: true - - # Keep players from editing the world? (true = NoEdit) - Edit: true - - # Keep players from touching blocks and activating things like chests? (true = NoTouching) - Touch: false - - # Prevent Animal Entities from spawning? (true = NoAnimals) - Animals: false - - # Prevent Mob Entities from spawning? (true = NoMobs) - Mobs: false - - # Keep players from having effects like speed or night vision? (true = NoEffects) - Effects: false - - # Keep players from seeing enter/leave/description messages? (true = NoMessages) - Msg: false - - # Prevent players from enter/leaving the area? (barrier) (true = NoPassage) - Passage: false - - # Keep players from dropping items in the area? (true = NoDropping) - Drop: false - - # No explosions allowed in the area? (true = NoExplosions) - TNT: false - - # No shooting allowed in the area? (true = NoShooting) - Shoot: false - - # Keep players from hunger(exhaust) in the area? (true = NoExhaust) - Hunger: false - - # Keep players from executing area event commands without specific perms (true = No Op Permissons) - Perms: false - - # Keep players from taking fall damage (true = NoFallDamage) - FallDamage: true - - # Keep area event commands from executing for non-ops (command test mode) - CMDmode: false - - world: - - # Keep players from getting hurt? (true = Player god mode) - God: false - - # Keep players from getting hurt by other players? (true = NoPVP) - PVP: false - - # Keep players from flying? (true = NoFlight) - Flight: true - - # Keep players from editing the world? (true = NoEdit) - Edit: false - - # Keep players from touching blocks and activating things like chests? (true = NoTouching) - Touch: false - - # Prevent Animal Entities from spawning? (true = NoAnimals) - Animals: false - - # Prevent Mob Entities from spawning? (true = NoMobs) - Mobs: false - - # Keep players from having effects like speed or night vision? (true = NoEffects) - Effects: false - - # Keep players from seeing enter/leave/description messages? (true = NoMessages) - Msg: false - - # Prevent players from enter/leaving the area? (barrier) (true = NoPassage) - Passage: false - - # Keep players from dropping items in the area? (true = NoDropping) - Drop: false - - # No explosions allowed in the area? (true = NoExplosions) - TNT: false - - # No shooting allowed in the area? (true = NoShooting) - Shoot: false - - # Keep players from hunger(exhaust) in the area? (true = NoExhaust) - Hunger: false - - # Keep players from executing area event commands without specific perms (true = No Op Permissons) - Perms: false - - # Keep players from taking fall damage (true = NoFallDamage) - FallDamage: true - - # Keep area event commands from executing for non-ops (command test mode) - CMDmode: false - - lobby: - - # Keep players from getting hurt? (true = Player god mode) - God: false - - # Keep players from getting hurt by other players? (true = NoPVP) - PVP: false - - # Keep players from flying? (true = NoFlight) - Flight: true - - # Keep players from editing the world? (true = NoEdit) - Edit: true - - # Keep players from touching blocks and activating things like chests? (true = NoTouching) - Touch: false - - # Prevent Animal Entities from spawning? (true = NoAnimals) - Animals: false - - # Prevent Mob Entities from spawning? (true = NoMobs) - Mobs: false - - # Keep players from having effects like speed or night vision? (true = NoEffects) - Effects: false - - # Keep players from seeing enter/leave/description messages? (true = NoMessages) - Msg: false - - # Prevent players from enter/leaving the area? (barrier) (true = NoPassage) - Passage: false - - # Keep players from dropping items in the area? (true = NoDropping) - Drop: false - - # No explosions allowed in the area? (true = NoExplosions) - TNT: false - - # No shooting allowed in the area? (true = NoShooting) - Shoot: false - - # Keep players from hunger(exhaust) in the area? (true = NoExhaust) - Hunger: false - - # Keep players from executing area event commands without specific perms (true = No Op Permissons) - Perms: false - - # Keep players from taking fall damage (true = NoFallDamage) - FallDamage: true - - # Keep area event commands from executing for non-ops (command test mode) - CMDmode: false From 7d47782e21236c7736cdb40626fed9b377f7ba49 Mon Sep 17 00:00:00 2001 From: Genboy <30810841+genboy@users.noreply.github.com> Date: Tue, 16 Apr 2019 23:04:15 +0200 Subject: [PATCH 08/26] Delete config.yml --- config.yml | 237 ----------------------------------------------------- 1 file changed, 237 deletions(-) delete mode 100644 config.yml diff --git a/config.yml b/config.yml deleted file mode 100644 index 8525971..0000000 --- a/config.yml +++ /dev/null @@ -1,237 +0,0 @@ -# Config file for Festival - -# Festival options -Options: - # select a language: English = en, Dutch = nl, translate please ! - Language: nl - - # Area Messages Display position (msg/title/tip/pop) - Msgtype: pop - - # Area Messages persist display to ops (off/op/on) - Msgdisplay: off - - # Area Floating Title display to ops (off/op/on) - Areadisplay: on - - # Auto whitelist area creator (on/off) - AutoWhitelist: on - -# Flag settings for unprotected areas -# Flag rule: a flag protects the area and the players in it -# These are the default flags, default flags for new worlds and defaults for individual worlds: -Default: - - # Keep players from getting hurt? (true = Player god mode) - God: false - - # Keep players from getting hurt by other players? (true = NoPVP) - PVP: false - - # Keep players from flying? (true = NoFlight) - Flight: false - - # Keep players from editing the world? (true = NoEdit) - Edit: true - - # Keep players from touching blocks and activating things like chests? (true = NoTouching) - Touch: false - - # Prevent Animal Entities from spawning? (true = NoAnimals) - Animals: false - - # Prevent Mob Entities from spawning? (true = NoMobs) - Mobs: false - - # Keep players from having effects like speed or night vision? (true = NoEffects) - Effects: false - - # Keep players from seeing enter/leave/description messages? (true = NoMessages) - Msg: false - - # Prevent players from enter/leaving the area? (barrier) (true = NoPassage) - Passage: false - - # Keep players from dropping items in the area? (true = NoDropping) - Drop: false - - # No explosions allowed in the area? (true = NoExplosions) - TNT: false - - # No shooting allowed in the area? (true = NoShooting) - Shoot: false - - # Keep players from hunger(exhaust) in the area? (true = NoExhaust) - Hunger: false - - # Keep players from executing area event commands without specific perms (true = No Op Permissons) - Perms: false - - # Keep players from taking fall damage (true = NoFallDamage) - FallDamage: true - - # Keep area event commands from executing for non-ops (command test mode) - CMDmode: false - -# Settings for unprotected areas in individual worlds: -Worlds: - - # New worlds (ie. automatic generated) - DEFAULT: - - # Keep players from getting hurt? (true = Player god mode) - God: false - - # Keep players from getting hurt by other players? (true = NoPVP) - PVP: false - - # Keep players from flying? (true = NoFlight) - Flight: true - - # Keep players from editing the world? (true = NoEdit) - Edit: true - - # Keep players from touching blocks and activating things like chests? (true = NoTouching) - Touch: false - - # Prevent Animal Entities from spawning? (true = NoAnimals) - Animals: false - - # Prevent Mob Entities from spawning? (true = NoMobs) - Mobs: false - - # Keep players from having effects like speed or night vision? (true = NoEffects) - Effects: false - - # Keep players from seeing enter/leave/description messages? (true = NoMessages) - Msg: false - - # Prevent players from enter/leaving the area? (barrier) (true = NoPassage) - Passage: false - - # Keep players from dropping items in the area? (true = NoDropping) - Drop: false - - # No explosions allowed in the area? (true = NoExplosions) - TNT: false - - # No shooting allowed in the area? (true = NoShooting) - Shoot: false - - # Keep players from hunger(exhaust) in the area? (true = NoExhaust) - Hunger: false - - # Keep players from executing area event commands without specific perms (true = No Op Permissons) - Perms: false - - # Keep players from taking fall damage (true = NoFallDamage) - FallDamage: true - - # Keep area event commands from executing for non-ops (command test mode) - CMDmode: false - - world: - - # Keep players from getting hurt? (true = Player god mode) - God: false - - # Keep players from getting hurt by other players? (true = NoPVP) - PVP: false - - # Keep players from flying? (true = NoFlight) - Flight: true - - # Keep players from editing the world? (true = NoEdit) - Edit: false - - # Keep players from touching blocks and activating things like chests? (true = NoTouching) - Touch: false - - # Prevent Animal Entities from spawning? (true = NoAnimals) - Animals: false - - # Prevent Mob Entities from spawning? (true = NoMobs) - Mobs: false - - # Keep players from having effects like speed or night vision? (true = NoEffects) - Effects: false - - # Keep players from seeing enter/leave/description messages? (true = NoMessages) - Msg: false - - # Prevent players from enter/leaving the area? (barrier) (true = NoPassage) - Passage: false - - # Keep players from dropping items in the area? (true = NoDropping) - Drop: false - - # No explosions allowed in the area? (true = NoExplosions) - TNT: false - - # No shooting allowed in the area? (true = NoShooting) - Shoot: false - - # Keep players from hunger(exhaust) in the area? (true = NoExhaust) - Hunger: false - - # Keep players from executing area event commands without specific perms (true = No Op Permissons) - Perms: false - - # Keep players from taking fall damage (true = NoFallDamage) - FallDamage: true - - # Keep area event commands from executing for non-ops (command test mode) - CMDmode: false - - lobby: - - # Keep players from getting hurt? (true = Player god mode) - God: false - - # Keep players from getting hurt by other players? (true = NoPVP) - PVP: false - - # Keep players from flying? (true = NoFlight) - Flight: true - - # Keep players from editing the world? (true = NoEdit) - Edit: true - - # Keep players from touching blocks and activating things like chests? (true = NoTouching) - Touch: false - - # Prevent Animal Entities from spawning? (true = NoAnimals) - Animals: false - - # Prevent Mob Entities from spawning? (true = NoMobs) - Mobs: false - - # Keep players from having effects like speed or night vision? (true = NoEffects) - Effects: false - - # Keep players from seeing enter/leave/description messages? (true = NoMessages) - Msg: false - - # Prevent players from enter/leaving the area? (barrier) (true = NoPassage) - Passage: false - - # Keep players from dropping items in the area? (true = NoDropping) - Drop: false - - # No explosions allowed in the area? (true = NoExplosions) - TNT: false - - # No shooting allowed in the area? (true = NoShooting) - Shoot: false - - # Keep players from hunger(exhaust) in the area? (true = NoExhaust) - Hunger: false - - # Keep players from executing area event commands without specific perms (true = No Op Permissons) - Perms: false - - # Keep players from taking fall damage (true = NoFallDamage) - FallDamage: true - - # Keep area event commands from executing for non-ops (command test mode) - CMDmode: false From e515119e5e3663a97ecdfd43b1dc1f92d6d47254 Mon Sep 17 00:00:00 2001 From: Genboy <30810841+genboy@users.noreply.github.com> Date: Tue, 16 Apr 2019 23:04:26 +0200 Subject: [PATCH 09/26] Delete areas.json --- areas.json | 1 - 1 file changed, 1 deletion(-) delete mode 100644 areas.json diff --git a/areas.json b/areas.json deleted file mode 100644 index c1b6bb0..0000000 --- a/areas.json +++ /dev/null @@ -1 +0,0 @@ -[{"name":"parcour1","desc":"Building area1","flags":{"edit":true,"god":false,"touch":false,"msg":false,"passage":false,"perms":false,"drop":false,"effects":false,"pvp":false,"flight":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[45,55,151],"pos2":[207,117,3],"level":"world","whitelist":[],"commands":[],"events":[]},{"name":"fall","desc":"You are save to jump!","flags":{"edit":true,"god":false,"touch":true,"msg":false,"passage":false,"perms":false,"drop":false,"effects":false,"pvp":false,"flight":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[305,92,219],"pos2":[309,70,215],"level":"world","whitelist":["g3nboy"],"commands":{"99":"gamemode c @p","98":"gamemode s @p"},"events":{"enter":"99","leave":"98"}},{"name":"falltest","desc":"add description here","flags":{"edit":false,"god":false,"touch":true,"msg":false,"passage":false,"perms":false,"drop":false,"effects":false,"pvp":false,"flight":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[302,70,218],"pos2":[299,73,214],"level":"world","whitelist":["g3nboy"],"commands":{"1":"fe tp fall"},"events":{"enter":"1"}},{"name":"skycatch1","desc":"Help!","flags":{"edit":false,"god":false,"touch":false,"drop":false,"msg":false,"passage":false,"perms":false,"effects":false,"pvp":false,"flight":true,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[505,12,-237],"pos2":[201,48,204],"level":"skyland","whitelist":["g3nboy"],"commands":{"1":"fe tp erock_portal1","2":"fe tp erock_portal1"},"events":{"leave":"1","enter":"2"}},{"name":"themebox1barrier","desc":"","flags":{"edit":false,"god":false,"touch":false,"drop":false,"msg":false,"passage":false,"perms":false,"effects":false,"pvp":false,"flight":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[58,205,58],"pos2":[-42,0,-42],"level":"themebox1","whitelist":["g3nboy"],"commands":[],"events":[]},{"name":"test1","desc":"","flags":{"edit":false,"god":false,"touch":false,"drop":false,"msg":false,"passage":false,"perms":false,"effects":false,"pvp":false,"flight":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[281,68,209],"pos2":[284,72,211],"level":"world","whitelist":[],"commands":{"1":"fe tp erock_portal1"},"events":{"enter":"1"}},{"name":"magic1","desc":"","flags":{"edit":true,"god":false,"touch":false,"drop":false,"msg":false,"passage":false,"perms":false,"effects":false,"pvp":false,"flight":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[370,72,209],"pos2":[381,82,220],"level":"world","whitelist":[],"commands":[],"events":[]},{"name":"test2","desc":"","flags":{"edit":false,"god":false,"touch":false,"drop":false,"msg":false,"passage":false,"perms":false,"effects":false,"pvp":false,"flight":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[296,68,208],"pos2":[293,73,210],"level":"world","whitelist":["g3nboy"],"commands":{"1":"fe tp entryExample"},"events":{"enter":"1"}},{"name":"erock_portal1","desc":"","flags":{"edit":true,"god":false,"touch":false,"effects":false,"drop":false,"msg":false,"passage":false,"perms":false,"pvp":false,"flight":true,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":true},"pos1":[397,91,23],"pos2":[395,87,25],"level":"skyland","whitelist":["g3nboy"],"commands":[],"events":[]},{"name":"homeportal1","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":false,"touch":false,"effects":false,"drop":true,"msg":false,"passage":false,"perms":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[418,88,-2],"pos2":[412,98,1],"level":"skyland","whitelist":["bluemountain376"],"commands":{"1":"fe tp worldhome"},"events":{"enter":"1"}},{"name":"blankhome","desc":"","flags":{"edit":true,"god":true,"pvp":false,"flight":true,"touch":false,"effects":false,"drop":false,"msg":false,"passage":false,"perms":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[866,219,877],"pos2":[893,251,903],"level":"blank","whitelist":["g3nboy"],"commands":[],"events":[]},{"name":"buildstation1","desc":"","flags":{"edit":true,"god":true,"pvp":false,"flight":true,"touch":false,"effects":false,"drop":false,"msg":false,"passage":false,"perms":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[344,66,192],"pos2":[324,85,164],"level":"world","whitelist":["g3nboy"],"commands":[],"events":[]},{"name":"buildarea1","desc":"Free building area!","flags":{"edit":false,"god":false,"pvp":true,"flight":false,"touch":false,"effects":true,"drop":false,"msg":false,"passage":false,"perms":false,"tnt":true,"hunger":true,"shoot":false,"falldamage":true,"mobs":false,"animals":false,"cmdmode":false,"explode":true,"fire":true},"pos1":[338,47,470],"pos2":[669,90,-48],"level":"world","whitelist":[],"commands":{"50":"gamemode c @p","51":"gamemode s @p"},"events":{"enter":"50","leave":"51"}},{"name":"worldhome","desc":"","flags":{"edit":true,"god":true,"pvp":true,"flight":false,"touch":false,"effects":true,"drop":true,"msg":false,"passage":false,"perms":false,"tnt":true,"hunger":true,"shoot":true,"falldamage":false,"mobs":true,"animals":false,"cmdmode":false,"explode":false,"fire":true},"pos1":[351,130,71],"pos2":[88,64,315],"level":"world","whitelist":[],"commands":[],"events":[]},{"name":"fort1","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":false,"touch":false,"effects":false,"msg":false,"passage":false,"drop":false,"tnt":true,"shoot":false,"hunger":false,"perms":false,"falldamage":true,"mobs":false,"animals":false,"cmdmode":false,"explode":true,"fire":true},"pos1":[335,43,173],"pos2":[194,124,-43],"level":"world","whitelist":[],"commands":[],"events":[]},{"name":"example1","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":true,"touch":false,"animals":false,"mobs":false,"effects":false,"msg":false,"passage":false,"drop":false,"tnt":false,"shoot":false,"hunger":false,"perms":false,"falldamage":true,"cmdmode":false,"explode":false,"fire":false},"pos1":[262,66,34],"pos2":[269,69,27],"level":"world","whitelist":["g3nboy"],"commands":[],"events":[]},{"name":"goto_example1","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":true,"touch":false,"animals":false,"mobs":false,"effects":false,"msg":false,"passage":false,"drop":false,"tnt":false,"shoot":false,"hunger":false,"perms":false,"falldamage":true,"cmdmode":false,"explode":false,"fire":false},"pos1":[260,67,97],"pos2":[265,70,93],"level":"world","whitelist":[],"commands":{"1":"fe tp example1 "},"events":{"center":"1"}},{"name":"entryexample","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":true,"touch":false,"animals":false,"mobs":false,"effects":false,"msg":false,"passage":false,"drop":false,"tnt":false,"shoot":false,"hunger":false,"perms":false,"falldamage":true,"cmdmode":false,"explode":false,"fire":false},"pos1":[263,70,109],"pos2":[258,73,113],"level":"world","whitelist":[],"commands":[],"events":[]},{"name":"leaveexample","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":true,"touch":false,"animals":false,"mobs":false,"effects":false,"msg":false,"passage":false,"drop":false,"tnt":false,"shoot":false,"hunger":false,"perms":false,"falldamage":true,"cmdmode":false,"explode":false,"fire":false},"pos1":[263,68,-2],"pos2":[258,73,2],"level":"world","whitelist":["g3nboy"],"commands":{"1":"fe tp worldhome"},"events":{"enter":"1"}},{"name":"compound1","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":false,"touch":false,"animals":false,"mobs":true,"effects":false,"msg":false,"passage":false,"drop":false,"tnt":true,"shoot":false,"hunger":false,"perms":false,"falldamage":true,"cmdmode":false,"explode":true,"fire":true},"pos1":[787,179,943],"pos2":[705,255,846],"level":"blank","whitelist":["g3nboy"],"commands":[],"events":[]},{"name":"fireplace1","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":false,"touch":false,"animals":false,"mobs":false,"effects":false,"msg":true,"passage":false,"drop":false,"explode":true,"tnt":false,"fire":false,"shoot":false,"hunger":false,"perms":false,"falldamage":true,"cmdmode":false},"pos1":[798,204,910],"pos2":[804,211,916],"level":"blank","whitelist":["g3nboy"],"commands":[],"events":[]}] From 7d88463afc32504e0969876b999e6d27012fcf82 Mon Sep 17 00:00:00 2001 From: Genboy <30810841+genboy@users.noreply.github.com> Date: Tue, 16 Apr 2019 23:05:06 +0200 Subject: [PATCH 10/26] Delete areas.json --- areas.json | 1 - 1 file changed, 1 deletion(-) delete mode 100644 areas.json diff --git a/areas.json b/areas.json deleted file mode 100644 index c1b6bb0..0000000 --- a/areas.json +++ /dev/null @@ -1 +0,0 @@ -[{"name":"parcour1","desc":"Building area1","flags":{"edit":true,"god":false,"touch":false,"msg":false,"passage":false,"perms":false,"drop":false,"effects":false,"pvp":false,"flight":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[45,55,151],"pos2":[207,117,3],"level":"world","whitelist":[],"commands":[],"events":[]},{"name":"fall","desc":"You are save to jump!","flags":{"edit":true,"god":false,"touch":true,"msg":false,"passage":false,"perms":false,"drop":false,"effects":false,"pvp":false,"flight":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[305,92,219],"pos2":[309,70,215],"level":"world","whitelist":["g3nboy"],"commands":{"99":"gamemode c @p","98":"gamemode s @p"},"events":{"enter":"99","leave":"98"}},{"name":"falltest","desc":"add description here","flags":{"edit":false,"god":false,"touch":true,"msg":false,"passage":false,"perms":false,"drop":false,"effects":false,"pvp":false,"flight":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[302,70,218],"pos2":[299,73,214],"level":"world","whitelist":["g3nboy"],"commands":{"1":"fe tp fall"},"events":{"enter":"1"}},{"name":"skycatch1","desc":"Help!","flags":{"edit":false,"god":false,"touch":false,"drop":false,"msg":false,"passage":false,"perms":false,"effects":false,"pvp":false,"flight":true,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[505,12,-237],"pos2":[201,48,204],"level":"skyland","whitelist":["g3nboy"],"commands":{"1":"fe tp erock_portal1","2":"fe tp erock_portal1"},"events":{"leave":"1","enter":"2"}},{"name":"themebox1barrier","desc":"","flags":{"edit":false,"god":false,"touch":false,"drop":false,"msg":false,"passage":false,"perms":false,"effects":false,"pvp":false,"flight":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[58,205,58],"pos2":[-42,0,-42],"level":"themebox1","whitelist":["g3nboy"],"commands":[],"events":[]},{"name":"test1","desc":"","flags":{"edit":false,"god":false,"touch":false,"drop":false,"msg":false,"passage":false,"perms":false,"effects":false,"pvp":false,"flight":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[281,68,209],"pos2":[284,72,211],"level":"world","whitelist":[],"commands":{"1":"fe tp erock_portal1"},"events":{"enter":"1"}},{"name":"magic1","desc":"","flags":{"edit":true,"god":false,"touch":false,"drop":false,"msg":false,"passage":false,"perms":false,"effects":false,"pvp":false,"flight":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[370,72,209],"pos2":[381,82,220],"level":"world","whitelist":[],"commands":[],"events":[]},{"name":"test2","desc":"","flags":{"edit":false,"god":false,"touch":false,"drop":false,"msg":false,"passage":false,"perms":false,"effects":false,"pvp":false,"flight":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[296,68,208],"pos2":[293,73,210],"level":"world","whitelist":["g3nboy"],"commands":{"1":"fe tp entryExample"},"events":{"enter":"1"}},{"name":"erock_portal1","desc":"","flags":{"edit":true,"god":false,"touch":false,"effects":false,"drop":false,"msg":false,"passage":false,"perms":false,"pvp":false,"flight":true,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":true},"pos1":[397,91,23],"pos2":[395,87,25],"level":"skyland","whitelist":["g3nboy"],"commands":[],"events":[]},{"name":"homeportal1","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":false,"touch":false,"effects":false,"drop":true,"msg":false,"passage":false,"perms":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[418,88,-2],"pos2":[412,98,1],"level":"skyland","whitelist":["bluemountain376"],"commands":{"1":"fe tp worldhome"},"events":{"enter":"1"}},{"name":"blankhome","desc":"","flags":{"edit":true,"god":true,"pvp":false,"flight":true,"touch":false,"effects":false,"drop":false,"msg":false,"passage":false,"perms":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[866,219,877],"pos2":[893,251,903],"level":"blank","whitelist":["g3nboy"],"commands":[],"events":[]},{"name":"buildstation1","desc":"","flags":{"edit":true,"god":true,"pvp":false,"flight":true,"touch":false,"effects":false,"drop":false,"msg":false,"passage":false,"perms":false,"tnt":false,"hunger":false,"shoot":false,"falldamage":false,"mobs":false,"animals":false,"cmdmode":false,"explode":false,"fire":false},"pos1":[344,66,192],"pos2":[324,85,164],"level":"world","whitelist":["g3nboy"],"commands":[],"events":[]},{"name":"buildarea1","desc":"Free building area!","flags":{"edit":false,"god":false,"pvp":true,"flight":false,"touch":false,"effects":true,"drop":false,"msg":false,"passage":false,"perms":false,"tnt":true,"hunger":true,"shoot":false,"falldamage":true,"mobs":false,"animals":false,"cmdmode":false,"explode":true,"fire":true},"pos1":[338,47,470],"pos2":[669,90,-48],"level":"world","whitelist":[],"commands":{"50":"gamemode c @p","51":"gamemode s @p"},"events":{"enter":"50","leave":"51"}},{"name":"worldhome","desc":"","flags":{"edit":true,"god":true,"pvp":true,"flight":false,"touch":false,"effects":true,"drop":true,"msg":false,"passage":false,"perms":false,"tnt":true,"hunger":true,"shoot":true,"falldamage":false,"mobs":true,"animals":false,"cmdmode":false,"explode":false,"fire":true},"pos1":[351,130,71],"pos2":[88,64,315],"level":"world","whitelist":[],"commands":[],"events":[]},{"name":"fort1","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":false,"touch":false,"effects":false,"msg":false,"passage":false,"drop":false,"tnt":true,"shoot":false,"hunger":false,"perms":false,"falldamage":true,"mobs":false,"animals":false,"cmdmode":false,"explode":true,"fire":true},"pos1":[335,43,173],"pos2":[194,124,-43],"level":"world","whitelist":[],"commands":[],"events":[]},{"name":"example1","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":true,"touch":false,"animals":false,"mobs":false,"effects":false,"msg":false,"passage":false,"drop":false,"tnt":false,"shoot":false,"hunger":false,"perms":false,"falldamage":true,"cmdmode":false,"explode":false,"fire":false},"pos1":[262,66,34],"pos2":[269,69,27],"level":"world","whitelist":["g3nboy"],"commands":[],"events":[]},{"name":"goto_example1","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":true,"touch":false,"animals":false,"mobs":false,"effects":false,"msg":false,"passage":false,"drop":false,"tnt":false,"shoot":false,"hunger":false,"perms":false,"falldamage":true,"cmdmode":false,"explode":false,"fire":false},"pos1":[260,67,97],"pos2":[265,70,93],"level":"world","whitelist":[],"commands":{"1":"fe tp example1 "},"events":{"center":"1"}},{"name":"entryexample","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":true,"touch":false,"animals":false,"mobs":false,"effects":false,"msg":false,"passage":false,"drop":false,"tnt":false,"shoot":false,"hunger":false,"perms":false,"falldamage":true,"cmdmode":false,"explode":false,"fire":false},"pos1":[263,70,109],"pos2":[258,73,113],"level":"world","whitelist":[],"commands":[],"events":[]},{"name":"leaveexample","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":true,"touch":false,"animals":false,"mobs":false,"effects":false,"msg":false,"passage":false,"drop":false,"tnt":false,"shoot":false,"hunger":false,"perms":false,"falldamage":true,"cmdmode":false,"explode":false,"fire":false},"pos1":[263,68,-2],"pos2":[258,73,2],"level":"world","whitelist":["g3nboy"],"commands":{"1":"fe tp worldhome"},"events":{"enter":"1"}},{"name":"compound1","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":false,"touch":false,"animals":false,"mobs":true,"effects":false,"msg":false,"passage":false,"drop":false,"tnt":true,"shoot":false,"hunger":false,"perms":false,"falldamage":true,"cmdmode":false,"explode":true,"fire":true},"pos1":[787,179,943],"pos2":[705,255,846],"level":"blank","whitelist":["g3nboy"],"commands":[],"events":[]},{"name":"fireplace1","desc":"","flags":{"edit":true,"god":false,"pvp":false,"flight":false,"touch":false,"animals":false,"mobs":false,"effects":false,"msg":true,"passage":false,"drop":false,"explode":true,"tnt":false,"fire":false,"shoot":false,"hunger":false,"perms":false,"falldamage":true,"cmdmode":false},"pos1":[798,204,910],"pos2":[804,211,916],"level":"blank","whitelist":["g3nboy"],"commands":[],"events":[]}] From 0eed4f556dabfe82b32cc2fc9bdae691a85a3cb3 Mon Sep 17 00:00:00 2001 From: genboy Date: Tue, 16 Apr 2019 23:07:01 +0200 Subject: [PATCH 11/26] v1.1.2 Fix Lang utf-8 json, adjust $e instanceof & clean up files --- config.yml | 237 ----------------------------------- plugin.yml | 2 +- resources/config.yml | 2 +- src/genboy/Festival/Main.php | 3 +- 4 files changed, 4 insertions(+), 240 deletions(-) delete mode 100644 config.yml diff --git a/config.yml b/config.yml deleted file mode 100644 index 8525971..0000000 --- a/config.yml +++ /dev/null @@ -1,237 +0,0 @@ -# Config file for Festival - -# Festival options -Options: - # select a language: English = en, Dutch = nl, translate please ! - Language: nl - - # Area Messages Display position (msg/title/tip/pop) - Msgtype: pop - - # Area Messages persist display to ops (off/op/on) - Msgdisplay: off - - # Area Floating Title display to ops (off/op/on) - Areadisplay: on - - # Auto whitelist area creator (on/off) - AutoWhitelist: on - -# Flag settings for unprotected areas -# Flag rule: a flag protects the area and the players in it -# These are the default flags, default flags for new worlds and defaults for individual worlds: -Default: - - # Keep players from getting hurt? (true = Player god mode) - God: false - - # Keep players from getting hurt by other players? (true = NoPVP) - PVP: false - - # Keep players from flying? (true = NoFlight) - Flight: false - - # Keep players from editing the world? (true = NoEdit) - Edit: true - - # Keep players from touching blocks and activating things like chests? (true = NoTouching) - Touch: false - - # Prevent Animal Entities from spawning? (true = NoAnimals) - Animals: false - - # Prevent Mob Entities from spawning? (true = NoMobs) - Mobs: false - - # Keep players from having effects like speed or night vision? (true = NoEffects) - Effects: false - - # Keep players from seeing enter/leave/description messages? (true = NoMessages) - Msg: false - - # Prevent players from enter/leaving the area? (barrier) (true = NoPassage) - Passage: false - - # Keep players from dropping items in the area? (true = NoDropping) - Drop: false - - # No explosions allowed in the area? (true = NoExplosions) - TNT: false - - # No shooting allowed in the area? (true = NoShooting) - Shoot: false - - # Keep players from hunger(exhaust) in the area? (true = NoExhaust) - Hunger: false - - # Keep players from executing area event commands without specific perms (true = No Op Permissons) - Perms: false - - # Keep players from taking fall damage (true = NoFallDamage) - FallDamage: true - - # Keep area event commands from executing for non-ops (command test mode) - CMDmode: false - -# Settings for unprotected areas in individual worlds: -Worlds: - - # New worlds (ie. automatic generated) - DEFAULT: - - # Keep players from getting hurt? (true = Player god mode) - God: false - - # Keep players from getting hurt by other players? (true = NoPVP) - PVP: false - - # Keep players from flying? (true = NoFlight) - Flight: true - - # Keep players from editing the world? (true = NoEdit) - Edit: true - - # Keep players from touching blocks and activating things like chests? (true = NoTouching) - Touch: false - - # Prevent Animal Entities from spawning? (true = NoAnimals) - Animals: false - - # Prevent Mob Entities from spawning? (true = NoMobs) - Mobs: false - - # Keep players from having effects like speed or night vision? (true = NoEffects) - Effects: false - - # Keep players from seeing enter/leave/description messages? (true = NoMessages) - Msg: false - - # Prevent players from enter/leaving the area? (barrier) (true = NoPassage) - Passage: false - - # Keep players from dropping items in the area? (true = NoDropping) - Drop: false - - # No explosions allowed in the area? (true = NoExplosions) - TNT: false - - # No shooting allowed in the area? (true = NoShooting) - Shoot: false - - # Keep players from hunger(exhaust) in the area? (true = NoExhaust) - Hunger: false - - # Keep players from executing area event commands without specific perms (true = No Op Permissons) - Perms: false - - # Keep players from taking fall damage (true = NoFallDamage) - FallDamage: true - - # Keep area event commands from executing for non-ops (command test mode) - CMDmode: false - - world: - - # Keep players from getting hurt? (true = Player god mode) - God: false - - # Keep players from getting hurt by other players? (true = NoPVP) - PVP: false - - # Keep players from flying? (true = NoFlight) - Flight: true - - # Keep players from editing the world? (true = NoEdit) - Edit: false - - # Keep players from touching blocks and activating things like chests? (true = NoTouching) - Touch: false - - # Prevent Animal Entities from spawning? (true = NoAnimals) - Animals: false - - # Prevent Mob Entities from spawning? (true = NoMobs) - Mobs: false - - # Keep players from having effects like speed or night vision? (true = NoEffects) - Effects: false - - # Keep players from seeing enter/leave/description messages? (true = NoMessages) - Msg: false - - # Prevent players from enter/leaving the area? (barrier) (true = NoPassage) - Passage: false - - # Keep players from dropping items in the area? (true = NoDropping) - Drop: false - - # No explosions allowed in the area? (true = NoExplosions) - TNT: false - - # No shooting allowed in the area? (true = NoShooting) - Shoot: false - - # Keep players from hunger(exhaust) in the area? (true = NoExhaust) - Hunger: false - - # Keep players from executing area event commands without specific perms (true = No Op Permissons) - Perms: false - - # Keep players from taking fall damage (true = NoFallDamage) - FallDamage: true - - # Keep area event commands from executing for non-ops (command test mode) - CMDmode: false - - lobby: - - # Keep players from getting hurt? (true = Player god mode) - God: false - - # Keep players from getting hurt by other players? (true = NoPVP) - PVP: false - - # Keep players from flying? (true = NoFlight) - Flight: true - - # Keep players from editing the world? (true = NoEdit) - Edit: true - - # Keep players from touching blocks and activating things like chests? (true = NoTouching) - Touch: false - - # Prevent Animal Entities from spawning? (true = NoAnimals) - Animals: false - - # Prevent Mob Entities from spawning? (true = NoMobs) - Mobs: false - - # Keep players from having effects like speed or night vision? (true = NoEffects) - Effects: false - - # Keep players from seeing enter/leave/description messages? (true = NoMessages) - Msg: false - - # Prevent players from enter/leaving the area? (barrier) (true = NoPassage) - Passage: false - - # Keep players from dropping items in the area? (true = NoDropping) - Drop: false - - # No explosions allowed in the area? (true = NoExplosions) - TNT: false - - # No shooting allowed in the area? (true = NoShooting) - Shoot: false - - # Keep players from hunger(exhaust) in the area? (true = NoExhaust) - Hunger: false - - # Keep players from executing area event commands without specific perms (true = No Op Permissons) - Perms: false - - # Keep players from taking fall damage (true = NoFallDamage) - FallDamage: true - - # Keep area event commands from executing for non-ops (command test mode) - CMDmode: false diff --git a/plugin.yml b/plugin.yml index fc7dda1..5b89174 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,6 +1,6 @@ name: Festival author: Genboy -version: 1.1.1 +version: 1.1.2 main: genboy\Festival\Main load: POSTWORLD api: [3.0.0] diff --git a/resources/config.yml b/resources/config.yml index f651c4b..8b97a3b 100644 --- a/resources/config.yml +++ b/resources/config.yml @@ -3,7 +3,7 @@ # Festival options Options: # select a language: English = en, Dutch = nl, translate please - Language: es + Language: en # Area Messages Display position (msg/title/tip/pop) Msgtype: msg diff --git a/src/genboy/Festival/Main.php b/src/genboy/Festival/Main.php index 3d1473b..e810d20 100644 --- a/src/genboy/Festival/Main.php +++ b/src/genboy/Festival/Main.php @@ -1548,6 +1548,7 @@ public function onDamage(EntityDamageEvent $event) : void{ $this->canDamage( $event ); } + /** Mob / Animal spawning * @param EntitySpawnEvent $event * @ignoreCancelled true @@ -1556,7 +1557,7 @@ public function onEntitySpawn( EntitySpawnEvent $event ): void{ $e = $event->getEntity(); //($e instanceof Fire && !$this->canBurn( $e->getPosition() )) || ( - if( !$e instanceof Player && !$this->canEntitySpawn( $e ) ){ + if( !($e instanceof Player) && !$this->canEntitySpawn( $e ) ){ //$e->flagForDespawn() to slow / ? $e->close(); private.. $this->getServer()->getPluginManager()->callEvent(new EntityDespawnEvent($e)); $e->despawnFromAll(); From eb581386d894a42983df88604cba4e9d5dc5f174 Mon Sep 17 00:00:00 2001 From: genboy Date: Tue, 16 Apr 2019 23:12:40 +0200 Subject: [PATCH 12/26] v1.1.2 dev --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 49dd77e..4d61d1f 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Create a festival with this custom area events plugin for Pocketmine Server: --- ## Info -Festival 1.1.1 functionalities will not extend further more. Important bug fixes will still be done untill Festival 2 is ready. +Festival 1.1.2 functionalities will not extend further more. Important bug fixes will still be done untill Festival 2 is ready. Festival 2 is in [development](https://github.com/genboy/Festival/projects/2) including FormUI for easy control, a new code structure and some of the flags will be completely rewritten. I probably dump the translations untill there is request for it. Just to let you know .. # Festival @@ -429,6 +429,10 @@ Thank you **Since v1.1.0** - fix griefing bug: adjusted in some functions to determine the needed position to validate the action(flag). + + **Since v1.1.2** + - fix translation bug: adjusted utf-8 json encoding, + - Thanks to [@bptube](https://github.com/bptube) now including Spanish language! ------ From bdda76d2925c8f5769caf5d59298d962edc6f72c Mon Sep 17 00:00:00 2001 From: genboy Date: Wed, 17 Apr 2019 09:58:22 +0200 Subject: [PATCH 13/26] Add polski lang and config options todo tranlations --- resources/config.yml | 2 +- resources/en.json | 8 ++- resources/es.json | 9 ++-- resources/nl.json | 2 +- resources/po.json | 114 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 122 insertions(+), 13 deletions(-) create mode 100644 resources/po.json diff --git a/resources/config.yml b/resources/config.yml index 8b97a3b..5c56b55 100644 --- a/resources/config.yml +++ b/resources/config.yml @@ -2,7 +2,7 @@ # Festival options Options: - # select a language: English = en, Dutch = nl, translate please + # select a language: English = en, Dutch = nl, Español = es, Polskie = po ( todo: 日本人 = ja, 中文 = zh, 한국어 = ko, русский = ru, italiano = it, Indonesia = in, translate please) Language: en # Area Messages Display position (msg/title/tip/pop) diff --git a/resources/en.json b/resources/en.json index 23e1825..f62762f 100644 --- a/resources/en.json +++ b/resources/en.json @@ -2,20 +2,20 @@ "language-name": "English", "language-selected": "Now selected English.", - "enabled-console-msg": "Festival now enabled, English selected (adjust with /fe lang ).", + "enabled-console-msg": "Festival now enabled, English selected (adjust with /fe lang ).", "cmd-ingameonly-msg": "Festival command only to be used in-game.", "cmd-unknown-msg": "Unknown Festival command", "cmd-noperms-msg": "You can not use this Festival command", "cmd-noperms-subcommand": "You do not have permission to use this subcommand.", - "pos-select-active": "You're already selecting a position!", "select-both-pos-first":"Please select both positions first.", "pos1": "position 1", "pos2": "position 2", "make-pos1": "Please place or break the first position.", "make-pos2": "Please place or break the second position.", + "make-pos2": "Please place or break the second position.", "give-area-name": "Please specify a name for this area.", "in-unknown-area": "You are in an unknown area", @@ -50,12 +50,10 @@ "desc-write-usage": "Please write the description. Usage /fe desc <..>", "desc-specify-area": "Please specify an area to edit the description. Usage: /fe desc ", - "area-deleted": "Area deleted!", "deleted-by":"deleted by", "specify-to-delete":"Please specify an area to delete.", - "flag": "Flag", "flags": "flags", "flag-not-found-list": "Flag not found. (Flags: god, pvp, flight, edit, touch, animals, mobs, effects, msg, passage, drop, tnt, shoot, hunger, perms, falldamage)", @@ -111,7 +109,7 @@ "option-missing-in-config": "option missing in config.yml, now set to", "flag-missing-in-config": "flag defaults missing, now set to", "barrier-is-passage-flag": "Old Barrier config was used, now set to 'false'; please rename 'Barrier' to 'Passage' in config.yml", - "no-is-falldamage-flag": "Old Barrier config was used, now set to 'false'; please rename 'Barrier' to 'Passage' in config.yml", + "no-is-falldamage-flag": "Old NoFalldamage config was used, now set to 'false'; please rename 'NoFalldamage' to 'Falldamage' in config.yml", "option-see-configfile": "please see original configs in /resources/config.yml" } diff --git a/resources/es.json b/resources/es.json index 9ffa40e..a789096 100644 --- a/resources/es.json +++ b/resources/es.json @@ -1,15 +1,14 @@ { - "language-name": "Spanish", + "language-name": "Espaol", "language-selected": "Has Seleccionado el Espaol", - "enabled-console-msg": "Festival ahora habilitado, ingls seleccionado (ajustar con /fe lang ).", + "enabled-console-msg": "Festival ahora habilitado, ingls seleccionado (ajustar con /fe lang ).", "cmd-ingameonly-msg": "El comando solo puede ser usado en el juego.", "cmd-unknown-msg": "Comando desconocido", "cmd-noperms-msg": "No puedes usar este comando del Festival.", "cmd-noperms-subcommand": "No tienes permiso para usar este subcomando.", - "pos-select-active": "Ya ests seleccionando una posicin!", "select-both-pos-first":"Por favor, seleccione ambas posiciones primero.", "pos1": "posicin 1", @@ -50,12 +49,10 @@ "desc-write-usage": "Por favor escriba la descripcin. Us: /fe desc <..>", "desc-specify-area": "Por favor, especifique un rea para editar la descripcin. Us: /fe desc ", - "area-deleted": "rea eliminada!", "deleted-by":"eliminado por", "specify-to-delete":"Por favor, especifique un rea para eliminar.", - "flag": "flag", "flags": "flags", "flag-not-found-list": "Flag no encontrada (Flags: god, pvp, flight, edit, touch, animals, mobs, effects, msg, passage, drop, tnt, shoot, hunger, perms, falldamage)", @@ -111,7 +108,7 @@ "option-missing-in-config": "opcin que falta en config.yml, ahora configurada en", "flag-missing-in-config": "faltan valores predeterminados de la bandera, ahora se establece en", "barrier-is-passage-flag": "Se us la antigua configuracin de barrera, ahora configurada en 'false'; por favor renombra 'Barrier' por 'Passage' en config.yml", - "no-is-falldamage-flag": "Se us la antigua configuracin de barrera, ahora configurada en 'false'; por favor renombra 'Barrier' por 'Passage' en config.yml", + "no-is-falldamage-flag": "Se us la antigua configuracin de NoFalldamage, ahora configurada en 'false'; por favor renombra 'NoFalldamage' por 'Falldamage' en config.yml", "option-see-configfile": "Por favor, vea configuraciones originales en /resources/config.yml" } diff --git a/resources/nl.json b/resources/nl.json index 8b47c75..708b8c1 100644 --- a/resources/nl.json +++ b/resources/nl.json @@ -2,7 +2,7 @@ "language-name": "Nederlands", "language-selected": "Nederlands geselecteerd.", - "enabled-console-msg": "Festival opgestart, Nederlands geselecteerd (pas aan met /fe lang )", + "enabled-console-msg": "Festival opgestart, Nederlands geselecteerd (pas aan met /fe lang )", "cmd-ingameonly-msg": "Commando alleen voor gebruik in het spel.", "cmd-unknown-msg": "Onbekend Festival commando", diff --git a/resources/po.json b/resources/po.json new file mode 100644 index 0000000..a1bc00d --- /dev/null +++ b/resources/po.json @@ -0,0 +1,114 @@ +{ + "language-name": "Polskie", // proszę sprawdzić .. używane tłumaczenie google + "language-selected": "Teraz wybrany Polskie.", + + "enabled-console-msg": "Festival jest teraz włączony, wybrany angielski (dostosuj za pomocą /fe lang ).", + + "cmd-ingameonly-msg": "Polecenie festiwalu używane tylko w grze.", + "cmd-unknown-msg": "Nieznane polecenie festiwalu", + "cmd-noperms-msg": "Nie możesz użyć tego polecenia Festival", + "cmd-noperms-subcommand": "Nie masz uprawnień do używania tej podkomendy.", + + "pos-select-active": "Już wybierasz pozycję!", + "select-both-pos-first":"Najpierw wybierz obie pozycje.", + "pos1": "pozycja 1", + "pos2": "pozycja 2", + "make-pos1": "Proszę umieścić lub złamać pierwszą pozycję.", + "make-pos2": "Proszę umieścić lub złamać drugą pozycję.", + "give-area-name": "Podaj nazwę dla tego obszaru.", + + "in-unknown-area": "Jesteś w nieznanym obszarze", + + "area": "Obszar", + "areas": "obszary", + "level": "poziom", + "level": "poziomy", + "player": "gracz", + "players": "gracze", + "the-area": "Strefa", + "the-level": "Poziom", + "area-created": "Obszar utworzony!", + "created-by":"stworzone przez", + "area-here": "Obszar tutaj", + "area-no-area-available": "Brak dostępnego obszaru", + "area-no-area-to-edit": "Nie ma obszarów, które można edytować", + "area-name-excist": "Obszar o tej nazwie już istnieje.", + "area-not-excist": "Obszar nie istnieje.", + "cannot-be-found": "nie może być znalezione.", + "area-list" : "Lista obszarów", + "players-in-area": "gracze w okolicy", + "area-whitelist": "biała lista", + "area-no-commands": "brak dołączonych poleceń", + "player-has-been-whitelisted": "został umieszczony na białej liście w okolicy", + "player-allready-whitelisted": "jest już na białej liście w okolicy", + "player-has-been-unwhitelisted": "został usunięty z obszaru", + "player-allready-unwhitelisted": "jest już nie na liście z obszaru", + "whitelist-specify-action": "Podaj prawidłowe działanie. Stosowanie: /area whitelist ", + + "desc-saved": "opis zapisany.", + "desc-write-usage": "Proszę napisz opis. Stosowanie: /fe desc <..>", + "desc-specify-area": "Proszę określ obszar do edycji opisu. Stosowanie: /fe desc ", + + "area-deleted": "Obszar usunięty!", + "deleted-by":"usunięte przez", + "specify-to-delete":"Proszę określ obszar do usunięcia.", + + "flag": "Flaga", + "flags": "flagi", + "flag-not-found-list": "Nie znaleziono flagi. (Flagi: god, pvp, flight, edit, touch, animals, mobs, effects, msg, passage, drop, tnt, shoot, hunger, perms, falldamage)", + "flag-not-specified-list": "Proszę określ flagę. (Flagi: god, pvp, flight, edit, touch, animals, mobs, effects, msg, passage, drop, tnt, shoot, hunger, perms, falldamage)", + "specify-to-flag": "Proszę określ obszar, który chcesz oznaczyć.", + + "tp-to-area-active": "Teleportowanie do okolicy", + "specify-excisting-area-name": "Proszę określ istniejącą nazwę obszaru.", + + "cmd": "dowództwo", + "cmds": "poleceń", + "cmd-id": "Identyfikator polecenia", + "cmd-list": "Lista poleceń", + "-event": "-wydarzenie", + "set-for-area": "ustawić dla obszaru", + "added-to-area": "dodane do obszaru", + "allready-used-for": "już użyte", + "allready-set-for-area": "już ustawiony dla tego obszaru", + "edit-id-or-other": ", edytuj ten identyfikator lub użyj innego identyfikatora", + "cmd-specify-id-and-command-usage": "Proszę wprowadź identyfikator polecenia i ciąg poleceń do dodania. Stosowanie: /fe command add ", + "cmd-valid-areaname": "Nie znaleziono obszaru, podaj poprawną nazwę. Stosowanie: /fe command .", + + "cmd-id-not-found": "Identyfikator polecenia nie został znaleziony. Zobacz polecenia za pomocą /fe event command list'", + "cmd-specify-id-to-delete": "Proszę Wprowadź identyfikator polecenia, które chcesz usunąć. Stosowanie /fe event command del ", + "cmd-specify-action": "Proszę dodaj akcję do wykonania poleceniem. Stosowanie: /fe command .", + + "event": "zdarzenie", + "event-is-now": "wydarzenie jest teraz", + "change-failed": "zmiana nie powiodła się!", + + "select-and": "i", + "select-in": "w", + "select-yes": "tak", + "select-no": "nie", + "status-on": "włączony", + "status-off": "wyłączony", + "set-to": "zestaw", + "for-area": "dla obszaru", + + "all-players-are-god": "Wszyscy gracze są Bogiem w tym obszarze!", + "no-pvp-area": "Jesteś w obszarze bez gracza przeciwko graczowi!", + "no-flight-area": "NO Latanie tutaj!", + "flight-area": "Flying allowed here!", + + "leaving-area": "wyjazd", + "enter-area": "wchodzić", + "leaving-center-area": "Opuszczając centrum obszaru", + "enter-center-area": "Wprowadź centrum obszaru", + "cannot-enter-area": "Nie możesz wejść do obszaru", + "cannot-leave-area": "Nie możesz opuścić tego obszaru", + "enter-barrier-area": "właśnie minął barierę!", + + "option-missing-in-config": "brak opcji w config.yml, teraz ustawiona na", + "flag-missing-in-config": "brak domyślnych flag, teraz ustawiony na", + "barrier-is-passage-flag": "Użyto konfiguracji Old Barrier, teraz ustawionej na 'false'; proszę zmienić nazwę 'Barrier' do 'Passage' w config.yml", + "no-is-falldamage-flag": "Użyto starej konfiguracji NoFalldamage, teraz ustawionej na 'false'; proszę zmienić nazwę 'NoFalldamage' do 'Falldamage' w config.yml", + "option-see-configfile": "proszę zobaczyć oryginalne configs w /resources/config.yml" + +} From e7bc4203349875f3ce6fb0ce6e931046d8ecb5a6 Mon Sep 17 00:00:00 2001 From: genboy Date: Wed, 17 Apr 2019 10:01:54 +0200 Subject: [PATCH 14/26] Add polski and translation todo's --- resources/config.yml | 4 +- resources/en.json | 2 +- resources/es.json | 4 +- resources/nl.json | 2 +- resources/po.json | 114 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 120 insertions(+), 6 deletions(-) create mode 100644 resources/po.json diff --git a/resources/config.yml b/resources/config.yml index f651c4b..5c56b55 100644 --- a/resources/config.yml +++ b/resources/config.yml @@ -2,8 +2,8 @@ # Festival options Options: - # select a language: English = en, Dutch = nl, translate please - Language: es + # select a language: English = en, Dutch = nl, Español = es, Polskie = po ( todo: 日本人 = ja, 中文 = zh, 한국어 = ko, русский = ru, italiano = it, Indonesia = in, translate please) + Language: en # Area Messages Display position (msg/title/tip/pop) Msgtype: msg diff --git a/resources/en.json b/resources/en.json index 23e1825..3039391 100644 --- a/resources/en.json +++ b/resources/en.json @@ -2,7 +2,7 @@ "language-name": "English", "language-selected": "Now selected English.", - "enabled-console-msg": "Festival now enabled, English selected (adjust with /fe lang ).", + "enabled-console-msg": "Festival now enabled, English selected (adjust with /fe lang ).", "cmd-ingameonly-msg": "Festival command only to be used in-game.", "cmd-unknown-msg": "Unknown Festival command", diff --git a/resources/es.json b/resources/es.json index 9ffa40e..2db3f88 100644 --- a/resources/es.json +++ b/resources/es.json @@ -1,8 +1,8 @@ { - "language-name": "Spanish", + "language-name": "Espaol", "language-selected": "Has Seleccionado el Espaol", - "enabled-console-msg": "Festival ahora habilitado, ingls seleccionado (ajustar con /fe lang ).", + "enabled-console-msg": "Festival ahora habilitado, ingls seleccionado (ajustar con /fe lang ).", "cmd-ingameonly-msg": "El comando solo puede ser usado en el juego.", "cmd-unknown-msg": "Comando desconocido", diff --git a/resources/nl.json b/resources/nl.json index 8b47c75..708b8c1 100644 --- a/resources/nl.json +++ b/resources/nl.json @@ -2,7 +2,7 @@ "language-name": "Nederlands", "language-selected": "Nederlands geselecteerd.", - "enabled-console-msg": "Festival opgestart, Nederlands geselecteerd (pas aan met /fe lang )", + "enabled-console-msg": "Festival opgestart, Nederlands geselecteerd (pas aan met /fe lang )", "cmd-ingameonly-msg": "Commando alleen voor gebruik in het spel.", "cmd-unknown-msg": "Onbekend Festival commando", diff --git a/resources/po.json b/resources/po.json new file mode 100644 index 0000000..a1bc00d --- /dev/null +++ b/resources/po.json @@ -0,0 +1,114 @@ +{ + "language-name": "Polskie", // proszę sprawdzić .. używane tłumaczenie google + "language-selected": "Teraz wybrany Polskie.", + + "enabled-console-msg": "Festival jest teraz włączony, wybrany angielski (dostosuj za pomocą /fe lang ).", + + "cmd-ingameonly-msg": "Polecenie festiwalu używane tylko w grze.", + "cmd-unknown-msg": "Nieznane polecenie festiwalu", + "cmd-noperms-msg": "Nie możesz użyć tego polecenia Festival", + "cmd-noperms-subcommand": "Nie masz uprawnień do używania tej podkomendy.", + + "pos-select-active": "Już wybierasz pozycję!", + "select-both-pos-first":"Najpierw wybierz obie pozycje.", + "pos1": "pozycja 1", + "pos2": "pozycja 2", + "make-pos1": "Proszę umieścić lub złamać pierwszą pozycję.", + "make-pos2": "Proszę umieścić lub złamać drugą pozycję.", + "give-area-name": "Podaj nazwę dla tego obszaru.", + + "in-unknown-area": "Jesteś w nieznanym obszarze", + + "area": "Obszar", + "areas": "obszary", + "level": "poziom", + "level": "poziomy", + "player": "gracz", + "players": "gracze", + "the-area": "Strefa", + "the-level": "Poziom", + "area-created": "Obszar utworzony!", + "created-by":"stworzone przez", + "area-here": "Obszar tutaj", + "area-no-area-available": "Brak dostępnego obszaru", + "area-no-area-to-edit": "Nie ma obszarów, które można edytować", + "area-name-excist": "Obszar o tej nazwie już istnieje.", + "area-not-excist": "Obszar nie istnieje.", + "cannot-be-found": "nie może być znalezione.", + "area-list" : "Lista obszarów", + "players-in-area": "gracze w okolicy", + "area-whitelist": "biała lista", + "area-no-commands": "brak dołączonych poleceń", + "player-has-been-whitelisted": "został umieszczony na białej liście w okolicy", + "player-allready-whitelisted": "jest już na białej liście w okolicy", + "player-has-been-unwhitelisted": "został usunięty z obszaru", + "player-allready-unwhitelisted": "jest już nie na liście z obszaru", + "whitelist-specify-action": "Podaj prawidłowe działanie. Stosowanie: /area whitelist ", + + "desc-saved": "opis zapisany.", + "desc-write-usage": "Proszę napisz opis. Stosowanie: /fe desc <..>", + "desc-specify-area": "Proszę określ obszar do edycji opisu. Stosowanie: /fe desc ", + + "area-deleted": "Obszar usunięty!", + "deleted-by":"usunięte przez", + "specify-to-delete":"Proszę określ obszar do usunięcia.", + + "flag": "Flaga", + "flags": "flagi", + "flag-not-found-list": "Nie znaleziono flagi. (Flagi: god, pvp, flight, edit, touch, animals, mobs, effects, msg, passage, drop, tnt, shoot, hunger, perms, falldamage)", + "flag-not-specified-list": "Proszę określ flagę. (Flagi: god, pvp, flight, edit, touch, animals, mobs, effects, msg, passage, drop, tnt, shoot, hunger, perms, falldamage)", + "specify-to-flag": "Proszę określ obszar, który chcesz oznaczyć.", + + "tp-to-area-active": "Teleportowanie do okolicy", + "specify-excisting-area-name": "Proszę określ istniejącą nazwę obszaru.", + + "cmd": "dowództwo", + "cmds": "poleceń", + "cmd-id": "Identyfikator polecenia", + "cmd-list": "Lista poleceń", + "-event": "-wydarzenie", + "set-for-area": "ustawić dla obszaru", + "added-to-area": "dodane do obszaru", + "allready-used-for": "już użyte", + "allready-set-for-area": "już ustawiony dla tego obszaru", + "edit-id-or-other": ", edytuj ten identyfikator lub użyj innego identyfikatora", + "cmd-specify-id-and-command-usage": "Proszę wprowadź identyfikator polecenia i ciąg poleceń do dodania. Stosowanie: /fe command add ", + "cmd-valid-areaname": "Nie znaleziono obszaru, podaj poprawną nazwę. Stosowanie: /fe command .", + + "cmd-id-not-found": "Identyfikator polecenia nie został znaleziony. Zobacz polecenia za pomocą /fe event command list'", + "cmd-specify-id-to-delete": "Proszę Wprowadź identyfikator polecenia, które chcesz usunąć. Stosowanie /fe event command del ", + "cmd-specify-action": "Proszę dodaj akcję do wykonania poleceniem. Stosowanie: /fe command .", + + "event": "zdarzenie", + "event-is-now": "wydarzenie jest teraz", + "change-failed": "zmiana nie powiodła się!", + + "select-and": "i", + "select-in": "w", + "select-yes": "tak", + "select-no": "nie", + "status-on": "włączony", + "status-off": "wyłączony", + "set-to": "zestaw", + "for-area": "dla obszaru", + + "all-players-are-god": "Wszyscy gracze są Bogiem w tym obszarze!", + "no-pvp-area": "Jesteś w obszarze bez gracza przeciwko graczowi!", + "no-flight-area": "NO Latanie tutaj!", + "flight-area": "Flying allowed here!", + + "leaving-area": "wyjazd", + "enter-area": "wchodzić", + "leaving-center-area": "Opuszczając centrum obszaru", + "enter-center-area": "Wprowadź centrum obszaru", + "cannot-enter-area": "Nie możesz wejść do obszaru", + "cannot-leave-area": "Nie możesz opuścić tego obszaru", + "enter-barrier-area": "właśnie minął barierę!", + + "option-missing-in-config": "brak opcji w config.yml, teraz ustawiona na", + "flag-missing-in-config": "brak domyślnych flag, teraz ustawiony na", + "barrier-is-passage-flag": "Użyto konfiguracji Old Barrier, teraz ustawionej na 'false'; proszę zmienić nazwę 'Barrier' do 'Passage' w config.yml", + "no-is-falldamage-flag": "Użyto starej konfiguracji NoFalldamage, teraz ustawionej na 'false'; proszę zmienić nazwę 'NoFalldamage' do 'Falldamage' w config.yml", + "option-see-configfile": "proszę zobaczyć oryginalne configs w /resources/config.yml" + +} From 42446987fdc6c37070d6f40aef2a2a0b4f6de937 Mon Sep 17 00:00:00 2001 From: genboy Date: Fri, 19 Apr 2019 23:31:34 +0200 Subject: [PATCH 15/26] added pl.json after review by @dearminder --- README.md | 10 +++- plugin.yml | 6 +-- resources/config.yml | 2 +- resources/en.json | 2 +- resources/es.json | 2 +- resources/nl.json | 2 +- resources/pl.json | 114 +++++++++++++++++++++++++++++++++++++++++++ resources/po.json | 114 ------------------------------------------- 8 files changed, 129 insertions(+), 123 deletions(-) create mode 100644 resources/pl.json delete mode 100644 resources/po.json diff --git a/README.md b/README.md index 49dd77e..28bcb4f 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Create a festival with this custom area events plugin for Pocketmine Server: --- ## Info -Festival 1.1.1 functionalities will not extend further more. Important bug fixes will still be done untill Festival 2 is ready. +Festival 1.1.2 functionalities will not extend further more. Maybe Flight flag will change. Important translations and bug fixes will still be done untill Festival 2 is ready. Festival 2 is in [development](https://github.com/genboy/Festival/projects/2) including FormUI for easy control, a new code structure and some of the flags will be completely rewritten. I probably dump the translations untill there is request for it. Just to let you know .. # Festival @@ -39,7 +39,7 @@ Download the latest .phar files from [poggit.pmmp.io](https://poggit.pmmp.io/p/F **Config** - set default options in config.yml; - - language: en - select language English = en, Dutch = nl, translate please ! + - language: en - select language English = en, Dutch = nl, es = Español, pl = Polskie - translate please ! - Msgtype: msg - Area Messages Display position (msg/title/tip/pop) - Msgdisplay: off - Area Messages persist display to ops (off/op/on) - Areadisplay: op - Area Floating Title display to ops (off/op/on) @@ -430,6 +430,12 @@ Thank you **Since v1.1.0** - fix griefing bug: adjusted in some functions to determine the needed position to validate the action(flag). + **Since v1.1.1** + - fix transalation and mobs/animals error + @bptube added & reviewed Español(/fe lang es) + + **Since v1.1.2** + - new pl.json and @dearminder reviewed Polskie(/fe lang pl) + ------ diff --git a/plugin.yml b/plugin.yml index fc7dda1..6612230 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,6 +1,6 @@ name: Festival author: Genboy -version: 1.1.1 +version: 1.1.2 main: genboy\Festival\Main load: POSTWORLD api: [3.0.0] @@ -8,7 +8,7 @@ website: "https://github.com/genboy/Festival" commands: fe: description: "Allows you to manage Festival area's and events." - usage: "\n§bChoose language: §f/fe lang §bToggle floating area titles: §f/fe titles §bSee area info at location: §f/fe \n§5How to create an area: §6select 2 corner positions §f/fe §6, then name the area by using: §f/fe create \n§9Toggle area flags: §f/fe §9Flags: §fgod, pvp, flight, edit, touch, mobs, animals, effects, msg, passage, drop, tnt, fire, explode, shoot, hunger, perms, falldamage \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 " + usage: "\n§bChoose language: §f/fe lang §bToggle floating area titles: §f/fe titles §bSee area info at location: §f/fe \n§5How to create an area: §6select 2 corner positions §f/fe §6, then name the area by using: §f/fe create \n§9Toggle area flags: §f/fe §9Flags: §fgod, pvp, flight, edit, touch, mobs, animals, effects, msg, passage, drop, tnt, fire, explode, shoot, hunger, perms, falldamage \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 " permission: festival.command.fe permissions: festival: @@ -57,7 +57,7 @@ permissions: description: "Allows access to the Festival flag subcommand." default: op festival.command.fe.delete: - description: "Allows access to the iProtector delete subcommand." + description: "Allows access to the Festival delete subcommand." default: op festival.command.fe.whitelist: description: "Allows access to the Festival whitelist subcommand." diff --git a/resources/config.yml b/resources/config.yml index 5c56b55..90b287d 100644 --- a/resources/config.yml +++ b/resources/config.yml @@ -2,7 +2,7 @@ # Festival options Options: - # select a language: English = en, Dutch = nl, Español = es, Polskie = po ( todo: 日本人 = ja, 中文 = zh, 한국어 = ko, русский = ru, italiano = it, Indonesia = in, translate please) + # select a language: English = en, Dutch = nl, Español = es, Polskie = pl ( todo: 日本人 = ja, 中文 = zh, 한국어 = ko, русский = ru, italiano = it, Indonesia = in, translate please) Language: en # Area Messages Display position (msg/title/tip/pop) diff --git a/resources/en.json b/resources/en.json index 3039391..7029fbd 100644 --- a/resources/en.json +++ b/resources/en.json @@ -2,7 +2,7 @@ "language-name": "English", "language-selected": "Now selected English.", - "enabled-console-msg": "Festival now enabled, English selected (adjust with /fe lang ).", + "enabled-console-msg": "Festival now enabled, English selected (adjust with /fe lang ).", "cmd-ingameonly-msg": "Festival command only to be used in-game.", "cmd-unknown-msg": "Unknown Festival command", diff --git a/resources/es.json b/resources/es.json index 2db3f88..0286962 100644 --- a/resources/es.json +++ b/resources/es.json @@ -2,7 +2,7 @@ "language-name": "Espaol", "language-selected": "Has Seleccionado el Espaol", - "enabled-console-msg": "Festival ahora habilitado, ingls seleccionado (ajustar con /fe lang ).", + "enabled-console-msg": "Festival ahora habilitado, ingls seleccionado (ajustar con /fe lang ).", "cmd-ingameonly-msg": "El comando solo puede ser usado en el juego.", "cmd-unknown-msg": "Comando desconocido", diff --git a/resources/nl.json b/resources/nl.json index 708b8c1..6f1400e 100644 --- a/resources/nl.json +++ b/resources/nl.json @@ -2,7 +2,7 @@ "language-name": "Nederlands", "language-selected": "Nederlands geselecteerd.", - "enabled-console-msg": "Festival opgestart, Nederlands geselecteerd (pas aan met /fe lang )", + "enabled-console-msg": "Festival opgestart, Nederlands geselecteerd (pas aan met /fe lang )", "cmd-ingameonly-msg": "Commando alleen voor gebruik in het spel.", "cmd-unknown-msg": "Onbekend Festival commando", diff --git a/resources/pl.json b/resources/pl.json new file mode 100644 index 0000000..62a57d9 --- /dev/null +++ b/resources/pl.json @@ -0,0 +1,114 @@ +{ + "language-name": "Polski", // updated by github user @dearminder + "language-selected": "Teraz wybrany Polski.", + + "enabled-console-msg": "Festival jest teraz włączony, wybrany Polski (dostosuj za pomocą /fe lang ).", + + "cmd-ingameonly-msg": "Polecenie Festival używane tylko w grze.", + "cmd-unknown-msg": "Nieznane polecenie Festival", + "cmd-noperms-msg": "Nie możesz użyć tego polecenia Festival", + "cmd-noperms-subcommand": "Nie masz uprawnień do używania tej podkomendy.", + + "pos-select-active": "Już wybrałeś pozycję!", + "select-both-pos-first":"Najpierw wybierz obie pozycje.", + "pos1": "Pozycja 1", + "pos2": "Pozycja 2", + "make-pos1": "Połóż albo zniszcz pierwszą pozycję.", + "make-pos2": "Połóż albo zniszcz drugą pozycję.", + "give-area-name": "Podaj nazwę dla tego obszaru.", + + "in-unknown-area": "Jesteś w nieznanym obszarze", + + "area": "Obszar", + "areas": "obszary", + "level": "poziom", + "level": "poziomy", + "player": "gracz", + "players": "gracze", + "the-area": "Strefa", + "the-level": "Poziom", + "area-created": "Obszar utworzony!", + "created-by":"utworzony przez", + "area-here": "Obszar tutaj", + "area-no-area-available": "Brak dostępnego obszaru", + "area-no-area-to-edit": "Nie ma obszarów które można edytować", + "area-name-excist": "Obszar o tej nazwie już istnieje.", + "area-not-excist": "Obszar nie istnieje.", + "cannot-be-found": "nie może zostać znaleziony.", + "area-list" : "Lista obszarów", + "players-in-area": "gracze w okolicy", + "area-whitelist": "biała lista", + "area-no-commands": "brak dołączonych poleceń", + "player-has-been-whitelisted": "został dodany do białej listy w tym obszarze", + "player-allready-whitelisted": "jest już na białej liście w tym obszarze", + "player-has-been-unwhitelisted": "został usunięty z obszaru", + "player-allready-unwhitelisted": "już został usunięty z obszaru", + "whitelist-specify-action": "Podaj prawidłowe działanie. Stosowanie: /area whitelist ", + + "desc-saved": "opis zapisany.", + "desc-write-usage": "Zapisz opis. Stosowanie: /fe desc <..>", + "desc-specify-area": "Określ obszar do edycji opisu. Stosowanie: /fe desc ", + + "area-deleted": "Obszar usunięty!", + "deleted-by":"usunięte przez", + "specify-to-delete":"określ obszar do usunięcia.", + + "flag": "Flaga", + "flags": "flagi", + "flag-not-found-list": "Nie znaleziono flagi. (Flagi: god, pvp, flight, edit, touch, animals, mobs, effects, msg, passage, drop, tnt, shoot, hunger, perms, falldamage)", + "flag-not-specified-list": "określ flagę. (Flagi: god, pvp, flight, edit, touch, animals, mobs, effects, msg, passage, drop, tnt, shoot, hunger, perms, falldamage)", + "specify-to-flag": "określ obszar, który chcesz oznaczyć.", + + "tp-to-area-active": "Teleportuję do obszaru", + "specify-excisting-area-name": "prosze określ istniejącą nazwę obszaru.", + + "cmd": "komenda", + "cmds": "komendy", + "cmd-id": "ID komendy", + "cmd-list": "Lista komend", + "-event": "-wydarzenie", + "set-for-area": "ustawiono dla obszaru", + "added-to-area": "dodano do obszaru", + "allready-used-for": "już używane przez", + "allready-set-for-area": "już ustawiony dla tego obszaru", + "edit-id-or-other": ", edytuj to id lub użyj innego id", + "cmd-specify-id-and-command-usage": "prosze wprowadź id komendy i treść komendy do dodania. Stosowanie: /fe command add ", + "cmd-valid-areaname": "Nie znaleziono obszaru, podaj poprawną nazwę. Stosowanie: /fe command .", + + "cmd-id-not-found": "Identyfikator komendy nie został znaleziony. Zobacz polecenia za pomocą /fe event command list'", + "cmd-specify-id-to-delete": "prosze Wprowadź id komendy, którą chcesz usunąć. Stosowanie /fe event command del ", + "cmd-specify-action": "prosze dodaj akcję do wykonania poleceniem. Stosowanie: /fe command .", + + "event": "zdarzenie", + "event-is-now": "wydarzenie jest teraz", + "change-failed": "zmiana nie powiodła się!", + + "select-and": "i", + "select-in": "w", + "select-yes": "Tak", + "select-no": "Nie", + "status-on": "włączony", + "status-off": "wyłączony", + "set-to": "ustawione na", + "for-area": "dla obszaru", + + "all-players-are-god": "Wszyscy gracze są Bogami w tym obszarze!", + "no-pvp-area": "Jesteś w obszarze bez PVP!", + "no-flight-area": "Nie ma Latania!", + "flight-area": "Latanie tutaj dozwolone!", + + "leaving-area": "opuszczasz", + "enter-area": "wchodzisz", + "leaving-center-area": "Opuszczasz środek obszaru", + "enter-center-area": "Wprowadź środek obszaru", + "cannot-enter-area": "Nie możesz wejść do obszaru", + "cannot-leave-area": "Nie możesz opuścić obszaru", + "enter-barrier-area": "właśnie mijasz barierę!", + + "option-missing-in-config": "brak opcji w config.yml, teraz ustawiona na", + "flag-missing-in-config": "brak domyślnych flag, teraz ustawiony na", + "barrier-is-passage-flag": "Użyto konfiguracji Starej Bariery, teraz ustawionej na 'false'; prosze zmienić nazwę 'Barrier' na 'Passage' w config.yml", + "no-is-falldamage-flag": "Użyto starej konfiguracji NoFalldamage, teraz ustawionej na 'false'; prosze zmienić nazwę 'NoFalldamage' na 'Falldamage' w config.yml", + "option-see-configfile": "prosze zobaczyć oryginalne ustawienia w /resources/config.yml" + +} diff --git a/resources/po.json b/resources/po.json deleted file mode 100644 index a1bc00d..0000000 --- a/resources/po.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "language-name": "Polskie", // proszę sprawdzić .. używane tłumaczenie google - "language-selected": "Teraz wybrany Polskie.", - - "enabled-console-msg": "Festival jest teraz włączony, wybrany angielski (dostosuj za pomocą /fe lang ).", - - "cmd-ingameonly-msg": "Polecenie festiwalu używane tylko w grze.", - "cmd-unknown-msg": "Nieznane polecenie festiwalu", - "cmd-noperms-msg": "Nie możesz użyć tego polecenia Festival", - "cmd-noperms-subcommand": "Nie masz uprawnień do używania tej podkomendy.", - - "pos-select-active": "Już wybierasz pozycję!", - "select-both-pos-first":"Najpierw wybierz obie pozycje.", - "pos1": "pozycja 1", - "pos2": "pozycja 2", - "make-pos1": "Proszę umieścić lub złamać pierwszą pozycję.", - "make-pos2": "Proszę umieścić lub złamać drugą pozycję.", - "give-area-name": "Podaj nazwę dla tego obszaru.", - - "in-unknown-area": "Jesteś w nieznanym obszarze", - - "area": "Obszar", - "areas": "obszary", - "level": "poziom", - "level": "poziomy", - "player": "gracz", - "players": "gracze", - "the-area": "Strefa", - "the-level": "Poziom", - "area-created": "Obszar utworzony!", - "created-by":"stworzone przez", - "area-here": "Obszar tutaj", - "area-no-area-available": "Brak dostępnego obszaru", - "area-no-area-to-edit": "Nie ma obszarów, które można edytować", - "area-name-excist": "Obszar o tej nazwie już istnieje.", - "area-not-excist": "Obszar nie istnieje.", - "cannot-be-found": "nie może być znalezione.", - "area-list" : "Lista obszarów", - "players-in-area": "gracze w okolicy", - "area-whitelist": "biała lista", - "area-no-commands": "brak dołączonych poleceń", - "player-has-been-whitelisted": "został umieszczony na białej liście w okolicy", - "player-allready-whitelisted": "jest już na białej liście w okolicy", - "player-has-been-unwhitelisted": "został usunięty z obszaru", - "player-allready-unwhitelisted": "jest już nie na liście z obszaru", - "whitelist-specify-action": "Podaj prawidłowe działanie. Stosowanie: /area whitelist ", - - "desc-saved": "opis zapisany.", - "desc-write-usage": "Proszę napisz opis. Stosowanie: /fe desc <..>", - "desc-specify-area": "Proszę określ obszar do edycji opisu. Stosowanie: /fe desc ", - - "area-deleted": "Obszar usunięty!", - "deleted-by":"usunięte przez", - "specify-to-delete":"Proszę określ obszar do usunięcia.", - - "flag": "Flaga", - "flags": "flagi", - "flag-not-found-list": "Nie znaleziono flagi. (Flagi: god, pvp, flight, edit, touch, animals, mobs, effects, msg, passage, drop, tnt, shoot, hunger, perms, falldamage)", - "flag-not-specified-list": "Proszę określ flagę. (Flagi: god, pvp, flight, edit, touch, animals, mobs, effects, msg, passage, drop, tnt, shoot, hunger, perms, falldamage)", - "specify-to-flag": "Proszę określ obszar, który chcesz oznaczyć.", - - "tp-to-area-active": "Teleportowanie do okolicy", - "specify-excisting-area-name": "Proszę określ istniejącą nazwę obszaru.", - - "cmd": "dowództwo", - "cmds": "poleceń", - "cmd-id": "Identyfikator polecenia", - "cmd-list": "Lista poleceń", - "-event": "-wydarzenie", - "set-for-area": "ustawić dla obszaru", - "added-to-area": "dodane do obszaru", - "allready-used-for": "już użyte", - "allready-set-for-area": "już ustawiony dla tego obszaru", - "edit-id-or-other": ", edytuj ten identyfikator lub użyj innego identyfikatora", - "cmd-specify-id-and-command-usage": "Proszę wprowadź identyfikator polecenia i ciąg poleceń do dodania. Stosowanie: /fe command add ", - "cmd-valid-areaname": "Nie znaleziono obszaru, podaj poprawną nazwę. Stosowanie: /fe command .", - - "cmd-id-not-found": "Identyfikator polecenia nie został znaleziony. Zobacz polecenia za pomocą /fe event command list'", - "cmd-specify-id-to-delete": "Proszę Wprowadź identyfikator polecenia, które chcesz usunąć. Stosowanie /fe event command del ", - "cmd-specify-action": "Proszę dodaj akcję do wykonania poleceniem. Stosowanie: /fe command .", - - "event": "zdarzenie", - "event-is-now": "wydarzenie jest teraz", - "change-failed": "zmiana nie powiodła się!", - - "select-and": "i", - "select-in": "w", - "select-yes": "tak", - "select-no": "nie", - "status-on": "włączony", - "status-off": "wyłączony", - "set-to": "zestaw", - "for-area": "dla obszaru", - - "all-players-are-god": "Wszyscy gracze są Bogiem w tym obszarze!", - "no-pvp-area": "Jesteś w obszarze bez gracza przeciwko graczowi!", - "no-flight-area": "NO Latanie tutaj!", - "flight-area": "Flying allowed here!", - - "leaving-area": "wyjazd", - "enter-area": "wchodzić", - "leaving-center-area": "Opuszczając centrum obszaru", - "enter-center-area": "Wprowadź centrum obszaru", - "cannot-enter-area": "Nie możesz wejść do obszaru", - "cannot-leave-area": "Nie możesz opuścić tego obszaru", - "enter-barrier-area": "właśnie minął barierę!", - - "option-missing-in-config": "brak opcji w config.yml, teraz ustawiona na", - "flag-missing-in-config": "brak domyślnych flag, teraz ustawiony na", - "barrier-is-passage-flag": "Użyto konfiguracji Old Barrier, teraz ustawionej na 'false'; proszę zmienić nazwę 'Barrier' do 'Passage' w config.yml", - "no-is-falldamage-flag": "Użyto starej konfiguracji NoFalldamage, teraz ustawionej na 'false'; proszę zmienić nazwę 'NoFalldamage' do 'Falldamage' w config.yml", - "option-see-configfile": "proszę zobaczyć oryginalne configs w /resources/config.yml" - -} From f697def60a09072e35d8ee6c6b01b030b6b245aa Mon Sep 17 00:00:00 2001 From: genboy Date: Fri, 19 Apr 2019 23:49:40 +0200 Subject: [PATCH 16/26] dub code fix --- resources/en.json | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/en.json b/resources/en.json index 8e0fe27..a080636 100644 --- a/resources/en.json +++ b/resources/en.json @@ -15,7 +15,6 @@ "pos2": "position 2", "make-pos1": "Please place or break the first position.", "make-pos2": "Please place or break the second position.", - "make-pos2": "Please place or break the second position.", "give-area-name": "Please specify a name for this area.", "in-unknown-area": "You are in an unknown area", From d99dccaea50893baa902aa9e9a9a5a242e685cbd Mon Sep 17 00:00:00 2001 From: Genboy <30810841+genboy@users.noreply.github.com> Date: Mon, 22 Apr 2019 08:26:42 +0200 Subject: [PATCH 17/26] update pl.json - reviewed by @dearminder --- resources/pl.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/pl.json b/resources/pl.json index 62a57d9..e84d39a 100644 --- a/resources/pl.json +++ b/resources/pl.json @@ -1,8 +1,8 @@ { - "language-name": "Polski", // updated by github user @dearminder + "language-name": "Polski", "language-selected": "Teraz wybrany Polski.", - "enabled-console-msg": "Festival jest teraz włączony, wybrany Polski (dostosuj za pomocą /fe lang ).", + "enabled-console-msg": "Festival jest teraz włączony, wybrany Polski (dostosuj za pomocą /fe lang ).", "cmd-ingameonly-msg": "Polecenie Festival używane tylko w grze.", "cmd-unknown-msg": "Nieznane polecenie Festival", From 42caca47885223c7ff4312db39f4bdef7dc4d6cc Mon Sep 17 00:00:00 2001 From: Genboy <30810841+genboy@users.noreply.github.com> Date: Mon, 22 Apr 2019 09:54:31 +0200 Subject: [PATCH 18/26] add level load function --- src/genboy/Festival/Main.php | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/src/genboy/Festival/Main.php b/src/genboy/Festival/Main.php index e810d20..3237bdd 100644 --- a/src/genboy/Festival/Main.php +++ b/src/genboy/Festival/Main.php @@ -448,7 +448,10 @@ public function onEnable() : void{ } $ca = $ca + count( $a->getCommands() ); } - $this->getLogger()->info( $fa.' '.Language::translate("flags").' '.Language::translate("select-and").' '. $ca .' '. Language::translate("cmds") .' '.Language::translate("select-in").' '. count($this->areas) .' '. Language::translate("areas")); + + $levelsloaded = count( $this->getServerWorlds() ); + + $this->getLogger()->info( $fa.' '.Language::translate("flags").' '.Language::translate("select-and").' '. $ca .' '. Language::translate("cmds") .' '.Language::translate("select-in").' '. count($this->areas) .' '. Language::translate("areas").' ('.$levelsloaded.' levels)'); // warnings changes if( count($newchange) > 0 ){ @@ -760,13 +763,13 @@ public function onCommand(CommandSender $sender, Command $cmd, string $label, ar break; case "list": if( $sender->hasPermission("festival") || $sender->hasPermission("festival.command") || $sender->hasPermission("festival.command.fe.list")){ - $levelNamesArray = scandir($this->getServer()->getDataPath() . "worlds/"); - foreach($levelNamesArray as $levelName) { + $levelNamesArray = $this->getServerWorlds(); // scandir($this->getServer()->getDataPath() . "worlds/"); + /*foreach($levelNamesArray as $levelName) { if($levelName === "." || $levelName === "..") { continue; } $this->getServer()->loadLevel($levelName); //Note that this will return false if the world folder is not a valid level, and could not be loaded. - } + }*/ $lvls = $this->getServer()->getLevels(); $o = ''; $l = ''; @@ -1299,6 +1302,27 @@ public function onQuit(PlayerQuitEvent $event){ } unset( $this->areaTitles[$playerName] ); + } + + /** getServerWorlds + * @func plugin getServer()->getDataPath() + * @dir worlds + */ + public function getServerWorlds() : ARRAY { + $worlds = []; + $worldfolders = array_filter( glob($this->getServer()->getDataPath() . "worlds/*") , 'is_dir'); + foreach( $worldfolders as $worldfolder) { + $worlds[] = basename($worldfolder); + $worldfolder = str_replace( $worldfolders, "", $worldfolder); + if( $this->getServer()->isLevelLoaded($worldfolder) ) { + continue; + } + /* Load all world levels + if( !empty( $worldfolder ) ){ + $this->plugin->getServer()->loadLevel($worldfolder); + } */ + } + return $worlds; } /** levelChange From 8b10b58a0bee60981ad6c6e7dbca637ceb5109bc Mon Sep 17 00:00:00 2001 From: Genboy <30810841+genboy@users.noreply.github.com> Date: Mon, 22 Apr 2019 09:55:41 +0200 Subject: [PATCH 19/26] Update en.json --- resources/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/en.json b/resources/en.json index a080636..bbd177b 100644 --- a/resources/en.json +++ b/resources/en.json @@ -22,7 +22,7 @@ "area": "Area", "areas": "areas", "level": "level", - "level": "levels", + "levels": "levels", "player": "player", "players": "players", "the-area": "The area", From 08d7fcf6b9b89068956f36bc83962754c4c2f0b2 Mon Sep 17 00:00:00 2001 From: Genboy <30810841+genboy@users.noreply.github.com> Date: Mon, 22 Apr 2019 09:56:28 +0200 Subject: [PATCH 20/26] Update nl.json --- resources/nl.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/nl.json b/resources/nl.json index 6f1400e..c00b724 100644 --- a/resources/nl.json +++ b/resources/nl.json @@ -22,7 +22,7 @@ "area": "gebied", "areas": "gebieden", "level": "level", - "level": "levels", + "levels": "levels", "player": "speler", "players": "spelers", "the-area": "Het gebied", From 086de3a5f6347845da85b2481ad95c6ca79c2ab3 Mon Sep 17 00:00:00 2001 From: Genboy <30810841+genboy@users.noreply.github.com> Date: Mon, 22 Apr 2019 09:56:51 +0200 Subject: [PATCH 21/26] Update es.json --- resources/es.json | 92 +++++++++++++++++++++++------------------------ 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/resources/es.json b/resources/es.json index dd54039..d0d2e81 100644 --- a/resources/es.json +++ b/resources/es.json @@ -1,83 +1,83 @@ { - "language-name": "Espaol", - "language-selected": "Has Seleccionado el Espaol", + "language-name": "Español", + "language-selected": "Has Seleccionado el Español", - "enabled-console-msg": "Festival ahora habilitado, ingls seleccionado (ajustar con /fe lang ).", + "enabled-console-msg": "Festival ahora habilitado, inglés seleccionado (ajustar con /fe lang ).", "cmd-ingameonly-msg": "El comando solo puede ser usado en el juego.", "cmd-unknown-msg": "Comando desconocido", "cmd-noperms-msg": "No puedes usar este comando del Festival.", "cmd-noperms-subcommand": "No tienes permiso para usar este subcomando.", - "pos-select-active": "Ya ests seleccionando una posicin!", + "pos-select-active": "¡Ya estás seleccionando una posición!", "select-both-pos-first":"Por favor, seleccione ambas posiciones primero.", - "pos1": "posicin 1", - "pos2": "posicin 2", - "make-pos1": "Por favor coloque o rompa la primera posicin.", - "make-pos2": "Por favor coloque o rompa la segunda posicin.", - "give-area-name": "Por favor, especifique un nombre para esta rea.", + "pos1": "posición 1", + "pos2": "posición 2", + "make-pos1": "Por favor coloque o rompa la primera posición.", + "make-pos2": "Por favor coloque o rompa la segunda posición.", + "give-area-name": "Por favor, especifique un nombre para esta área.", "in-unknown-area": "Estas en un area desconocida", "area": "Area", "areas": "areas", "level": "nivel", - "level": "niveles", + "levels": "niveles", "player": "jugador", "players": "jugadores", "the-area": "La zona", "the-level": "El nivel", - "area-created": "rea creada!", + "area-created": "Área creada!", "created-by":"creado por", "area-here": "Area aqui", - "area-no-area-available": "No hay rea disponible", - "area-no-area-to-edit": "No hay reas que puedas editar.", - "area-name-excist": "Ya existe un rea con ese nombre.", - "area-not-excist": "rea no existe.", + "area-no-area-available": "No hay área disponible", + "area-no-area-to-edit": "No hay áreas que puedas editar.", + "area-name-excist": "Ya existe un área con ese nombre.", + "area-not-excist": "Área no existe.", "cannot-be-found": "no pudo ser encontrado.", - "area-list" : "Lista de reas", + "area-list" : "Lista de áreas", "players-in-area": "jugadores en el area", "area-whitelist": "lista blanca", "area-no-commands": "sin comandos adjuntos", - "player-has-been-whitelisted": "ha sido incluido en la lista blanca en el rea", - "player-allready-whitelisted": "Ya est en la lista blanca en el rea", - "player-has-been-unwhitelisted": "Ha sido excluido de la lista blanca de est area", - "player-allready-unwhitelisted": "ya est excluido en la lista blanca del rea", - "whitelist-specify-action": "Por favor, especifique una accin vlida. Us: /area whitelist ", + "player-has-been-whitelisted": "ha sido incluido en la lista blanca en el área", + "player-allready-whitelisted": "Ya está en la lista blanca en el área", + "player-has-been-unwhitelisted": "Ha sido excluido de la lista blanca de está area", + "player-allready-unwhitelisted": "ya está excluido en la lista blanca del área", + "whitelist-specify-action": "Por favor, especifique una acción válida. Usé: /area whitelist ", - "desc-saved": "Descripcin guardada.", - "desc-write-usage": "Por favor escriba la descripcin. Us: /fe desc <..>", - "desc-specify-area": "Por favor, especifique un rea para editar la descripcin. Us: /fe desc ", + "desc-saved": "Descripción guardada.", + "desc-write-usage": "Por favor escriba la descripción. Usé: /fe desc <..>", + "desc-specify-area": "Por favor, especifique un área para editar la descripción. Usé: /fe desc ", - "area-deleted": "rea eliminada!", + "area-deleted": "Área eliminada!", "deleted-by":"eliminado por", - "specify-to-delete":"Por favor, especifique un rea para eliminar.", + "specify-to-delete":"Por favor, especifique un área para eliminar.", "flag": "flag", "flags": "flags", "flag-not-found-list": "Flag no encontrada (Flags: god, pvp, flight, edit, touch, animals, mobs, effects, msg, passage, drop, tnt, shoot, hunger, perms, falldamage)", "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)", - "specify-to-flag": "Por favor, especifique el rea en la que le gustara colocar una flag", + "specify-to-flag": "Por favor, especifique el área en la que le gustaría colocar una flag", - "tp-to-area-active": "Ests teletransportando a la zona", - "specify-excisting-area-name": "Por favor, especifique un nombre de rea existente.", + "tp-to-area-active": "Estás teletransportando a la zona", + "specify-excisting-area-name": "Por favor, especifique un nombre de área existente.", "cmd": "comando", "cmds": "comandos", "cmd-id": "ID del comando", "cmd-list": "Lista de comandos", "-event": "-evento", - "set-for-area": "establecer para el rea", - "added-to-area": "aadido al rea", + "set-for-area": "establecer para el área", + "added-to-area": "añadido al área", "allready-used-for": "ya utilizado para", - "allready-set-for-area": "ya establecido para el rea", + "allready-set-for-area": "ya establecido para el área", "edit-id-or-other": ", edita este id o usa otro id", - "cmd-specify-id-and-command-usage": "Por favor, especifique el ID de comando y el comando para agregar. Us: /fe command y ", - "cmd-valid-areaname": "rea no encontrada, por favor enve un nombre vlido. Us: /fe command .", + "cmd-specify-id-and-command-usage": "Por favor, especifique el ID de comando y el comando para agregar. Usé: /fe command y ", + "cmd-valid-areaname": "Área no encontrada, por favor envíe un nombre válido. Usé: /fe command .", "cmd-id-not-found": "ID de comando no encontrado. Ver los comandos con /fe event command list'", - "cmd-specify-id-to-delete": "Por favor, especifique el ID del comando para eliminar. Us /fe event command del ", - "cmd-specify-action": "Por favor agregue una accin para realizar con el comando. Us: /fe command .", + "cmd-specify-id-to-delete": "Por favor, especifique el ID del comando para eliminar. Usé /fe event command del ", + "cmd-specify-action": "Por favor agregue una acción para realizar con el comando. Usé: /fe command .", "event": "evento", "event-is-now": "evento es ahora", @@ -85,30 +85,30 @@ "select-and": "y", "select-in": "en", - "select-yes": "S", + "select-yes": "Sí", "select-no": "No", "status-on": "Encendido", "status-off": "Apagado", "set-to": "ajustado a", - "for-area": "Por rea", + "for-area": "Por área", - "all-players-are-god": "Todos los jugadores son dios en esta rea!", - "no-pvp-area": "Ests en un rea sin PVP!", - "no-flight-area": "NO puede volar aqu!", - "flight-area": "Se permite volar aqu!", + "all-players-are-god": "¡Todos los jugadores son dios en esta área!", + "no-pvp-area": "¡Estás en un área sin PVP!", + "no-flight-area": "NO puede volar aquí!", + "flight-area": "¡Se permite volar aquí!", "leaving-area": "saliendo", "enter-area": "entrando", "leaving-center-area": "Saliendo del centro de la area.", - "enter-center-area": "Entrando en el centro del rea.", + "enter-center-area": "Entrando en el centro del área.", "cannot-enter-area": "No puedes entrar al area", "cannot-leave-area": "No puedes dejar la zona.", "enter-barrier-area": "acaba de pasar una barrera!", - "option-missing-in-config": "opcin que falta en config.yml, ahora configurada en", + "option-missing-in-config": "opción que falta en config.yml, ahora configurada en", "flag-missing-in-config": "faltan valores predeterminados de la bandera, ahora se establece en", - "barrier-is-passage-flag": "Se us la antigua configuracin de barrera, ahora configurada en 'false'; por favor renombra 'Barrier' por 'Passage' en config.yml", - "no-is-falldamage-flag": "Se us la antigua configuracin de NoFalldamage, ahora configurada en 'false'; por favor renombra 'NoFalldamage' por 'Falldamage' en config.yml", + "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", + "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", "option-see-configfile": "Por favor, vea configuraciones originales en /resources/config.yml" } From 57a8023c91965a522862f9e89a539cda97346d4b Mon Sep 17 00:00:00 2001 From: Genboy <30810841+genboy@users.noreply.github.com> Date: Mon, 22 Apr 2019 09:57:21 +0200 Subject: [PATCH 22/26] Update pl.json --- resources/pl.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/pl.json b/resources/pl.json index e84d39a..206dd49 100644 --- a/resources/pl.json +++ b/resources/pl.json @@ -22,7 +22,7 @@ "area": "Obszar", "areas": "obszary", "level": "poziom", - "level": "poziomy", + "levels": "poziomy", "player": "gracz", "players": "gracze", "the-area": "Strefa", From 04dbcf3ba353b3d99ecb1a97368ba3940f14f4a1 Mon Sep 17 00:00:00 2001 From: Genboy <30810841+genboy@users.noreply.github.com> Date: Mon, 22 Apr 2019 09:59:41 +0200 Subject: [PATCH 23/26] Update Main.php --- src/genboy/Festival/Main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/genboy/Festival/Main.php b/src/genboy/Festival/Main.php index 3237bdd..eb4c2ea 100644 --- a/src/genboy/Festival/Main.php +++ b/src/genboy/Festival/Main.php @@ -451,7 +451,7 @@ public function onEnable() : void{ $levelsloaded = count( $this->getServerWorlds() ); - $this->getLogger()->info( $fa.' '.Language::translate("flags").' '.Language::translate("select-and").' '. $ca .' '. Language::translate("cmds") .' '.Language::translate("select-in").' '. count($this->areas) .' '. Language::translate("areas").' ('.$levelsloaded.' levels)'); + $this->getLogger()->info( $fa.' '.Language::translate("flags").' '.Language::translate("select-and").' '. $ca .' '. Language::translate("cmds") .' '.Language::translate("select-in").' '. count($this->areas) .' '. Language::translate("areas").' ('.$levelsloaded.' '.Language::translate("levels").')'); // warnings changes if( count($newchange) > 0 ){ From 7c74c82dc8db314e1a496586e9ccfca5db3931c2 Mon Sep 17 00:00:00 2001 From: genboy Date: Tue, 23 Apr 2019 22:38:25 +0200 Subject: [PATCH 24/26] added ForceUTF8 for correct translation encoding --- src/ForceUTF8/Encoding.php | 351 +++++++++++++++++++++++++++++++++++ src/genboy/Festival/Main.php | 7 +- 2 files changed, 356 insertions(+), 2 deletions(-) create mode 100644 src/ForceUTF8/Encoding.php diff --git a/src/ForceUTF8/Encoding.php b/src/ForceUTF8/Encoding.php new file mode 100644 index 0000000..7801ebc --- /dev/null +++ b/src/ForceUTF8/Encoding.php @@ -0,0 +1,351 @@ + + * @package Encoding + * @version 2.0 + * @link https://github.com/neitanod/forceutf8 + * @example https://github.com/neitanod/forceutf8 + * @license Revised BSD + */ + +namespace ForceUTF8; + +class Encoding { + + const ICONV_TRANSLIT = "TRANSLIT"; + const ICONV_IGNORE = "IGNORE"; + const WITHOUT_ICONV = ""; + + protected static $win1252ToUtf8 = array( + 128 => "\xe2\x82\xac", + + 130 => "\xe2\x80\x9a", + 131 => "\xc6\x92", + 132 => "\xe2\x80\x9e", + 133 => "\xe2\x80\xa6", + 134 => "\xe2\x80\xa0", + 135 => "\xe2\x80\xa1", + 136 => "\xcb\x86", + 137 => "\xe2\x80\xb0", + 138 => "\xc5\xa0", + 139 => "\xe2\x80\xb9", + 140 => "\xc5\x92", + + 142 => "\xc5\xbd", + + + 145 => "\xe2\x80\x98", + 146 => "\xe2\x80\x99", + 147 => "\xe2\x80\x9c", + 148 => "\xe2\x80\x9d", + 149 => "\xe2\x80\xa2", + 150 => "\xe2\x80\x93", + 151 => "\xe2\x80\x94", + 152 => "\xcb\x9c", + 153 => "\xe2\x84\xa2", + 154 => "\xc5\xa1", + 155 => "\xe2\x80\xba", + 156 => "\xc5\x93", + + 158 => "\xc5\xbe", + 159 => "\xc5\xb8" + ); + + protected static $brokenUtf8ToUtf8 = array( + "\xc2\x80" => "\xe2\x82\xac", + + "\xc2\x82" => "\xe2\x80\x9a", + "\xc2\x83" => "\xc6\x92", + "\xc2\x84" => "\xe2\x80\x9e", + "\xc2\x85" => "\xe2\x80\xa6", + "\xc2\x86" => "\xe2\x80\xa0", + "\xc2\x87" => "\xe2\x80\xa1", + "\xc2\x88" => "\xcb\x86", + "\xc2\x89" => "\xe2\x80\xb0", + "\xc2\x8a" => "\xc5\xa0", + "\xc2\x8b" => "\xe2\x80\xb9", + "\xc2\x8c" => "\xc5\x92", + + "\xc2\x8e" => "\xc5\xbd", + + + "\xc2\x91" => "\xe2\x80\x98", + "\xc2\x92" => "\xe2\x80\x99", + "\xc2\x93" => "\xe2\x80\x9c", + "\xc2\x94" => "\xe2\x80\x9d", + "\xc2\x95" => "\xe2\x80\xa2", + "\xc2\x96" => "\xe2\x80\x93", + "\xc2\x97" => "\xe2\x80\x94", + "\xc2\x98" => "\xcb\x9c", + "\xc2\x99" => "\xe2\x84\xa2", + "\xc2\x9a" => "\xc5\xa1", + "\xc2\x9b" => "\xe2\x80\xba", + "\xc2\x9c" => "\xc5\x93", + + "\xc2\x9e" => "\xc5\xbe", + "\xc2\x9f" => "\xc5\xb8" + ); + + protected static $utf8ToWin1252 = array( + "\xe2\x82\xac" => "\x80", + + "\xe2\x80\x9a" => "\x82", + "\xc6\x92" => "\x83", + "\xe2\x80\x9e" => "\x84", + "\xe2\x80\xa6" => "\x85", + "\xe2\x80\xa0" => "\x86", + "\xe2\x80\xa1" => "\x87", + "\xcb\x86" => "\x88", + "\xe2\x80\xb0" => "\x89", + "\xc5\xa0" => "\x8a", + "\xe2\x80\xb9" => "\x8b", + "\xc5\x92" => "\x8c", + + "\xc5\xbd" => "\x8e", + + + "\xe2\x80\x98" => "\x91", + "\xe2\x80\x99" => "\x92", + "\xe2\x80\x9c" => "\x93", + "\xe2\x80\x9d" => "\x94", + "\xe2\x80\xa2" => "\x95", + "\xe2\x80\x93" => "\x96", + "\xe2\x80\x94" => "\x97", + "\xcb\x9c" => "\x98", + "\xe2\x84\xa2" => "\x99", + "\xc5\xa1" => "\x9a", + "\xe2\x80\xba" => "\x9b", + "\xc5\x93" => "\x9c", + + "\xc5\xbe" => "\x9e", + "\xc5\xb8" => "\x9f" + ); + + static function toUTF8($text){ + /** + * Function \ForceUTF8\Encoding::toUTF8 + * + * This function leaves UTF8 characters alone, while converting almost all non-UTF8 to UTF8. + * + * It assumes that the encoding of the original string is either Windows-1252 or ISO 8859-1. + * + * It may fail to convert characters to UTF-8 if they fall into one of these scenarios: + * + * 1) when any of these characters: ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞß + * are followed by any of these: ("group B") + * ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶•¸¹º»¼½¾¿ + * For example: %ABREPRESENT%C9%BB. «REPRESENTÉ» + * The "«" (%AB) character will be converted, but the "É" followed by "»" (%C9%BB) + * is also a valid unicode character, and will be left unchanged. + * + * 2) when any of these: àáâãäåæçèéêëìíîï are followed by TWO chars from group B, + * 3) when any of these: ðñòó are followed by THREE chars from group B. + * + * @name toUTF8 + * @param string $text Any string. + * @return string The same string, UTF8 encoded + * + */ + + if(is_array($text)) + { + foreach($text as $k => $v) + { + $text[$k] = self::toUTF8($v); + } + return $text; + } + + if(!is_string($text)) { + return $text; + } + + $max = self::strlen($text); + + $buf = ""; + for($i = 0; $i < $max; $i++){ + $c1 = $text{$i}; + if($c1>="\xc0"){ //Should be converted to UTF8, if it's not UTF8 already + $c2 = $i+1 >= $max? "\x00" : $text{$i+1}; + $c3 = $i+2 >= $max? "\x00" : $text{$i+2}; + $c4 = $i+3 >= $max? "\x00" : $text{$i+3}; + if($c1 >= "\xc0" & $c1 <= "\xdf"){ //looks like 2 bytes UTF8 + if($c2 >= "\x80" && $c2 <= "\xbf"){ //yeah, almost sure it's UTF8 already + $buf .= $c1 . $c2; + $i++; + } else { //not valid UTF8. Convert it. + $cc1 = (chr(ord($c1) / 64) | "\xc0"); + $cc2 = ($c1 & "\x3f") | "\x80"; + $buf .= $cc1 . $cc2; + } + } elseif($c1 >= "\xe0" & $c1 <= "\xef"){ //looks like 3 bytes UTF8 + if($c2 >= "\x80" && $c2 <= "\xbf" && $c3 >= "\x80" && $c3 <= "\xbf"){ //yeah, almost sure it's UTF8 already + $buf .= $c1 . $c2 . $c3; + $i = $i + 2; + } else { //not valid UTF8. Convert it. + $cc1 = (chr(ord($c1) / 64) | "\xc0"); + $cc2 = ($c1 & "\x3f") | "\x80"; + $buf .= $cc1 . $cc2; + } + } elseif($c1 >= "\xf0" & $c1 <= "\xf7"){ //looks like 4 bytes UTF8 + if($c2 >= "\x80" && $c2 <= "\xbf" && $c3 >= "\x80" && $c3 <= "\xbf" && $c4 >= "\x80" && $c4 <= "\xbf"){ //yeah, almost sure it's UTF8 already + $buf .= $c1 . $c2 . $c3 . $c4; + $i = $i + 3; + } else { //not valid UTF8. Convert it. + $cc1 = (chr(ord($c1) / 64) | "\xc0"); + $cc2 = ($c1 & "\x3f") | "\x80"; + $buf .= $cc1 . $cc2; + } + } else { //doesn't look like UTF8, but should be converted + $cc1 = (chr(ord($c1) / 64) | "\xc0"); + $cc2 = (($c1 & "\x3f") | "\x80"); + $buf .= $cc1 . $cc2; + } + } elseif(($c1 & "\xc0") == "\x80"){ // needs conversion + if(isset(self::$win1252ToUtf8[ord($c1)])) { //found in Windows-1252 special cases + $buf .= self::$win1252ToUtf8[ord($c1)]; + } else { + $cc1 = (chr(ord($c1) / 64) | "\xc0"); + $cc2 = (($c1 & "\x3f") | "\x80"); + $buf .= $cc1 . $cc2; + } + } else { // it doesn't need conversion + $buf .= $c1; + } + } + return $buf; + } + + static function toWin1252($text, $option = self::WITHOUT_ICONV) { + if(is_array($text)) { + foreach($text as $k => $v) { + $text[$k] = self::toWin1252($v, $option); + } + return $text; + } elseif(is_string($text)) { + return static::utf8_decode($text, $option); + } else { + return $text; + } + } + + static function toISO8859($text, $option = self::WITHOUT_ICONV) { + return self::toWin1252($text, $option); + } + + static function toLatin1($text, $option = self::WITHOUT_ICONV) { + return self::toWin1252($text, $option); + } + + static function fixUTF8($text, $option = self::WITHOUT_ICONV){ + if(is_array($text)) { + foreach($text as $k => $v) { + $text[$k] = self::fixUTF8($v, $option); + } + return $text; + } + + if(!is_string($text)) { + return $text; + } + + $last = ""; + while($last <> $text){ + $last = $text; + $text = self::toUTF8(static::utf8_decode($text, $option)); + } + $text = self::toUTF8(static::utf8_decode($text, $option)); + return $text; + } + + static function UTF8FixWin1252Chars($text){ + // If you received an UTF-8 string that was converted from Windows-1252 as it was ISO8859-1 + // (ignoring Windows-1252 chars from 80 to 9F) use this function to fix it. + // See: http://en.wikipedia.org/wiki/Windows-1252 + + return str_replace(array_keys(self::$brokenUtf8ToUtf8), array_values(self::$brokenUtf8ToUtf8), $text); + } + + static function removeBOM($str=""){ + if(substr($str, 0,3) == pack("CCC",0xef,0xbb,0xbf)) { + $str=substr($str, 3); + } + return $str; + } + + protected static function strlen($text){ + return (function_exists('mb_strlen') && ((int) ini_get('mbstring.func_overload')) & 2) ? + mb_strlen($text,'8bit') : strlen($text); + } + + public static function normalizeEncoding($encodingLabel) + { + $encoding = strtoupper($encodingLabel); + $encoding = preg_replace('/[^a-zA-Z0-9\s]/', '', $encoding); + $equivalences = array( + 'ISO88591' => 'ISO-8859-1', + 'ISO8859' => 'ISO-8859-1', + 'ISO' => 'ISO-8859-1', + 'LATIN1' => 'ISO-8859-1', + 'LATIN' => 'ISO-8859-1', + 'UTF8' => 'UTF-8', + 'UTF' => 'UTF-8', + 'WIN1252' => 'ISO-8859-1', + 'WINDOWS1252' => 'ISO-8859-1' + ); + + if(empty($equivalences[$encoding])){ + return 'UTF-8'; + } + + return $equivalences[$encoding]; + } + + public static function encode($encodingLabel, $text) + { + $encodingLabel = self::normalizeEncoding($encodingLabel); + if($encodingLabel == 'ISO-8859-1') return self::toLatin1($text); + return self::toUTF8($text); + } + + protected static function utf8_decode($text, $option = self::WITHOUT_ICONV) + { + if ($option == self::WITHOUT_ICONV || !function_exists('iconv')) { + $o = utf8_decode( + str_replace(array_keys(self::$utf8ToWin1252), array_values(self::$utf8ToWin1252), self::toUTF8($text)) + ); + } else { + $o = iconv("UTF-8", "Windows-1252" . ($option == self::ICONV_TRANSLIT ? '//TRANSLIT' : ($option == self::ICONV_IGNORE ? '//IGNORE' : '')), $text); + } + return $o; + } +} diff --git a/src/genboy/Festival/Main.php b/src/genboy/Festival/Main.php index eb4c2ea..179add2 100644 --- a/src/genboy/Festival/Main.php +++ b/src/genboy/Festival/Main.php @@ -26,6 +26,7 @@ namespace genboy\Festival; +use ForceUTF8\Encoding; use genboy\Festival\lang\Language; use pocketmine\command\Command; @@ -477,11 +478,13 @@ public function loadLanguage( $languageCode = false ){ foreach($resources as $resource){ if($resource->getFilename() === "en.json"){ - $text = utf8_encode( file_get_contents($resource->getPathname(), true) ); // json content in utf-8 + //$text = utf8_encode( file_get_contents($resource->getPathname(), true) ); // json content in utf-8 + $text = Encoding::toUTF8( file_get_contents($resource->getPathname(), true) ); $default = json_decode($text, true); // php decode utf-8 } if($resource->getFilename() === $languageCode.".json"){ - $text = utf8_encode( file_get_contents($resource->getPathname(), true) ); + //$text = utf8_encode( file_get_contents($resource->getPathname(), true) ); + $text = Encoding::toUTF8( file_get_contents($resource->getPathname(), true) ); $setting = json_decode($text, true); // php decode utf-8 } } From 885ff34f601f3c71578b5fcb23515290df733672 Mon Sep 17 00:00:00 2001 From: genboy Date: Tue, 23 Apr 2019 23:46:52 +0200 Subject: [PATCH 25/26] update v1.1.3 option flightcontrol off --- plugin.yml | 2 +- resources/config.yml | 5 ++++- src/genboy/Festival/Main.php | 12 ++++++++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/plugin.yml b/plugin.yml index 6612230..b34042f 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,6 +1,6 @@ name: Festival author: Genboy -version: 1.1.2 +version: 1.1.3 main: genboy\Festival\Main load: POSTWORLD api: [3.0.0] diff --git a/resources/config.yml b/resources/config.yml index 90b287d..b6aaca3 100644 --- a/resources/config.yml +++ b/resources/config.yml @@ -1,4 +1,4 @@ -# Config file for Festival 1.1.1 +# Config file for Festival 1.1.3 # Festival options Options: @@ -14,6 +14,9 @@ Options: # Area Messages persist display to ops (off/op/on) Msgdisplay: off + # Use flight flag (on/off) - since v.1.1.3 flight flag usage can be turn off + FlightControl: on + # Auto whitelist area creator (on/off) AutoWhitelist: on diff --git a/src/genboy/Festival/Main.php b/src/genboy/Festival/Main.php index 179add2..b5a17ca 100644 --- a/src/genboy/Festival/Main.php +++ b/src/genboy/Festival/Main.php @@ -196,13 +196,17 @@ public function onEnable() : void{ $c["Options"]["Areadisplay"] = 'off'; $newchange['Areadisplay'] = "! Areadisplay ".Language::translate("option-missing-in-config")." 'off'; ". Language::translate("option-see-configfile"); } + if(!isset($c["Options"]["FlightControl"])){ // check since v1.1.3 + $c["Options"]["FlightControl"] = 'on'; + $newchange['Msgtype'] = "! FlightControl ".Language::translate("option-missing-in-config")." 'on'; ". Language::translate("option-see-configfile"); + } if(!isset($c["Options"]["AutoWhitelist"])){ // check since v1.0.5-12 $c["Options"]["AutoWhitelist"] = 'on'; $newchange['Msgtype'] = "! AutoWhitelist ".Language::translate("option-missing-in-config")." 'on'; ". Language::translate("option-see-configfile"); } $this->options = $c["Options"]; }else{ - $this->options = array("Language"=>"en", "Msgtype"=>"pop", "Msgdisplay"=>"off", "AutoWhitelist"=>"on"); // Fallback defaults + $this->options = array("Language"=>"en", "Msgtype"=>"pop", "Msgdisplay"=>"off", "FlightControl"=>"on", "AutoWhitelist"=>"on"); // Fallback defaults //$newchange['Options'] = "! Config Options missing in config.yml, defaults are set for now; please see /resources/config.yml"; $newchange['Options'] = "! ".Language::translate("option-missing-in-config")."; ". Language::translate("option-see-configfile"); } @@ -1402,8 +1406,12 @@ public function onMove(PlayerMoveEvent $ev) : void{ } // Area Player Monitor $this->AreaPlayerMonitor($area, $ev); } - $this->checkPlayerFlying( $ev->getPlayer() ); + + if( $this->options["FlightControl"] == "on" ){ // since v.1.1.3 flight flag usage can be turn off + $this->checkPlayerFlying( $ev->getPlayer() ); + } return; + } /** Block Place From ceb6272c0e6bef0df0c0acc6007cca17e9e23357 Mon Sep 17 00:00:00 2001 From: genboy Date: Wed, 24 Apr 2019 15:39:45 +0200 Subject: [PATCH 26/26] Update 1.1.3 --- README.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2a014c5..8e6bf3c 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Create a festival with this custom area events plugin for Pocketmine Server: ### Manage area's and run commmands attachted to area events. -![Festival creation & usage](https://genboy.net/wp-content/uploads/2019/03/festival_usage_1.1.0.png) +![Festival creation & usage](https://genboy.net/wp-content/uploads/2019/04/festival_usage_v1.1.3.png) ###### Copyright [Genboy](https://genboy.net) 2018 @@ -17,8 +17,8 @@ Create a festival with this custom area events plugin for Pocketmine Server: --- ## Info -Festival 1.1.2 functionalities will not extend further more. Maybe Flight flag will change. Important translations and bug fixes will still be done untill Festival 2 is ready. -Festival 2 is in [development](https://github.com/genboy/Festival/projects/2) including FormUI for easy control, a new code structure and some of the flags will be completely rewritten. I probably dump the translations untill there is request for it. Just to let you know .. +Festival 1.1.3 has now option to disable Flight flag (flight control off) and Spanish and Polish ranslations! +Festival 2 is paused for a little while now, development in [development](https://github.com/genboy/Festival/projects/2) including FormUI for easy control, a new code structure and some of the flags will be completely rewritten. Just to let you know .. # Festival @@ -31,7 +31,7 @@ Festival 2 is in [development](https://github.com/genboy/Festival/projects/2) in More info also available at [the Festival Wiki](https://github.com/genboy/Festival/wiki) -Download the latest .phar files from [poggit.pmmp.io](https://poggit.pmmp.io/p/Festival/1.1.1), also available at [mcpehost.ru](https://panel.mcpehost.ru/repository/plugin?name=Festival) +Download the latest .phar files from [poggit.pmmp.io](https://poggit.pmmp.io/p/Festival/1.1.3), also available at [mcpehost.ru](https://panel.mcpehost.ru/repository/plugin?name=Festival) !Please before asking; first double-check your server basic world configurations, other plugins configurations (ie. worldguard) and the used player permissions incl. Festival whitelistings. @@ -43,6 +43,7 @@ Download the latest .phar files from [poggit.pmmp.io](https://poggit.pmmp.io/p/F - Msgtype: msg - Area Messages Display position (msg/title/tip/pop) - Msgdisplay: off - Area Messages persist display to ops (off/op/on) - Areadisplay: op - Area Floating Title display to ops (off/op/on) + - FlightControl: on - To disable flight flag for all Festival usage (on/off) - AutoWhitelist: on - Auto whitelist area creator (on/off) **Area** @@ -145,7 +146,7 @@ and all [other iProtector devs](https://github.com/LDX-MCPE/iProtector/network). ##### A visualisation of Festival command usage - ![Festival creation & usage](https://genboy.net/wp-content/uploads/2019/03/festival_usage_1.1.0.png) + ![Festival creation & usage](https://genboy.net/wp-content/uploads/2019/04/festival_usage_v1.1.3.png) ###### Copyright [Genboy](https://genboy.net) 2018 @@ -153,9 +154,11 @@ and all [other iProtector devs](https://github.com/LDX-MCPE/iProtector/network). #### Language - Set Festival language en/nl for area and command returned messages. + Set Festival language en/nl/es/pl for area and command returned messages. en = english nl = nederlands + es = Espanol + pl = Polski __ = your language, please help [translate __.js](https://github.com/genboy/Festival/blob/master/resources/en.json) @@ -439,6 +442,10 @@ Thank you **Since v1.1.2** - new pl.json and @dearminder reviewed Polskie(/fe lang pl) + + **Since v1.1.3** + - new class ForceUTF8 for json encoding translations + - new FlightControl option to disable flight flag ------