[
  {
    "path": ".checkstyle/checkstyle.xml",
    "content": "<?xml version=\"1.0\"?>\n\n<!--\n  ~ MurderMystery - Find the murderer, kill him and survive!\n  ~ Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n  ~\n  ~ This program is free software: you can redistribute it and/or modify\n  ~ it under the terms of the GNU General Public License as published by\n  ~ the Free Software Foundation, either version 3 of the License, or\n  ~ (at your option) any later version.\n  ~\n  ~ This program is distributed in the hope that it will be useful,\n  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of\n  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n  ~ GNU General Public License for more details.\n  ~\n  ~ You should have received a copy of the GNU General Public License\n  ~ along with this program.  If not, see <http://www.gnu.org/licenses/>.\n  -->\n\n<!--\n  ~ Murder Mystery is free software: you can redistribute it and/or modify\n  ~ it under the terms of the GNU General Public License as published by\n  ~ the Free Software Foundation; either version 3 of the License, or\n  ~ (at your option) any later version.\n  ~\n  ~ Murder Mystery is distributed in the hope that it will be useful,\n  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of\n  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n  ~ GNU General Public License for more details.\n  ~\n  ~ You should have received a copy of the GNU General Public License\n  ~ along with Murder Mystery.  If not, see <http://www.gnu.org/licenses/>.\n  -->\n\n<!--\n  ~ Murder Mystery is free software: you can redistribute it and/or modify\n  ~ it under the terms of the GNU General Public License as published by\n  ~ the Free Software Foundation; either version 3 of the License, or\n  ~ (at your option) any later version.\n  ~\n  ~ Murder Mystery is distributed in the hope that it will be useful,\n  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of\n  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n  ~ GNU General Public License for more details.\n  ~\n  ~ You should have received a copy of the GNU General Public License\n  ~ along with Murder Mystery.  If not, see <http://www.gnu.org/licenses/>.\n  -->\n\n<!DOCTYPE module PUBLIC\n        \"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN\"\n        \"https://checkstyle.org/dtds/configuration_1_3.dtd\">\n\n<!--\n    Checkstyle configuration that checks the Google coding conventions from Google Java Style\n    that can be found at https://google.github.io/styleguide/javaguide.html.\n\n    Checkstyle is very configurable. Be sure to read the documentation at\n    http://checkstyle.sf.net (or in your downloaded distribution).\n\n    To completely disable a check, just comment it out or delete it from the file.\n\n    Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.\n -->\n\n<module name=\"Checker\">\n    <property name=\"charset\" value=\"UTF-8\"/>\n\n    <property name=\"severity\" value=\"warning\"/>\n\n    <property name=\"fileExtensions\" value=\"java, properties, xml\"/>\n    <!-- Checks for whitespace                               -->\n    <!-- See http://checkstyle.sf.net/config_whitespace.html -->\n    <module name=\"FileTabCharacter\">\n        <property name=\"eachLine\" value=\"true\"/>\n    </module>\n\n    <module name=\"TreeWalker\">\n        <module name=\"OuterTypeFilename\"/>\n        <module name=\"IllegalTokenText\">\n            <property name=\"tokens\" value=\"STRING_LITERAL, CHAR_LITERAL\"/>\n            <property name=\"format\"\n                      value=\"\\\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\\\(0(10|11|12|14|15|42|47)|134)\"/>\n            <property name=\"message\"\n                      value=\"Consider using special escape sequence instead of octal value or Unicode escaped value.\"/>\n        </module>\n        <module name=\"AvoidEscapedUnicodeCharacters\">\n            <property name=\"allowEscapesForControlCharacters\" value=\"true\"/>\n            <property name=\"allowByTailComment\" value=\"true\"/>\n            <property name=\"allowNonPrintableEscapes\" value=\"true\"/>\n        </module>\n        <module name=\"LineLength\">\n            <property name=\"max\" value=\"250\"/>\n            <property name=\"ignorePattern\" value=\"^package.*|^import.*|a href|href|http://|https://|ftp://\"/>\n        </module>\n        <module name=\"AvoidStarImport\"/>\n        <module name=\"OneTopLevelClass\"/>\n        <module name=\"NoLineWrap\"/>\n        <module name=\"EmptyBlock\">\n            <property name=\"option\" value=\"TEXT\"/>\n            <property name=\"tokens\"\n                      value=\"LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH\"/>\n        </module>\n        <module name=\"NeedBraces\"/>\n        <module name=\"LeftCurly\"/>\n        <module name=\"RightCurly\">\n            <property name=\"id\" value=\"RightCurlySame\"/>\n            <property name=\"tokens\"\n                      value=\"LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE,\n                    LITERAL_DO\"/>\n        </module>\n        <module name=\"RightCurly\">\n            <property name=\"id\" value=\"RightCurlyAlone\"/>\n            <property name=\"option\" value=\"alone\"/>\n            <property name=\"tokens\"\n                      value=\"CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT,\n                    INSTANCE_INIT\"/>\n        </module>\n        <module name=\"WhitespaceAround\">\n            <property name=\"allowEmptyConstructors\" value=\"true\"/>\n            <property name=\"allowEmptyMethods\" value=\"true\"/>\n            <property name=\"allowEmptyTypes\" value=\"true\"/>\n            <property name=\"allowEmptyLoops\" value=\"true\"/>\n            <message key=\"ws.notFollowed\"\n                     value=\"WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)\"/>\n            <message key=\"ws.notPreceded\"\n                     value=\"WhitespaceAround: ''{0}'' is not preceded with whitespace.\"/>\n        </module>\n        <module name=\"OneStatementPerLine\"/>\n        <module name=\"MultipleVariableDeclarations\"/>\n        <module name=\"ArrayTypeStyle\"/>\n        <module name=\"MissingSwitchDefault\"/>\n        <module name=\"FallThrough\"/>\n        <module name=\"UpperEll\"/>\n        <module name=\"ModifierOrder\"/>\n        <module name=\"EmptyLineSeparator\">\n            <property name=\"allowNoEmptyLineBetweenFields\" value=\"true\"/>\n        </module>\n        <module name=\"SeparatorWrap\">\n            <property name=\"id\" value=\"SeparatorWrapDot\"/>\n            <property name=\"tokens\" value=\"DOT\"/>\n            <property name=\"option\" value=\"nl\"/>\n        </module>\n        <module name=\"SeparatorWrap\">\n            <property name=\"id\" value=\"SeparatorWrapComma\"/>\n            <property name=\"tokens\" value=\"COMMA\"/>\n            <property name=\"option\" value=\"EOL\"/>\n        </module>\n        <module name=\"SeparatorWrap\">\n            <!-- ELLIPSIS is EOL until https://github.com/google/styleguide/issues/258 -->\n            <property name=\"id\" value=\"SeparatorWrapEllipsis\"/>\n            <property name=\"tokens\" value=\"ELLIPSIS\"/>\n            <property name=\"option\" value=\"EOL\"/>\n        </module>\n        <module name=\"SeparatorWrap\">\n            <!-- ARRAY_DECLARATOR is EOL until https://github.com/google/styleguide/issues/259 -->\n            <property name=\"id\" value=\"SeparatorWrapArrayDeclarator\"/>\n            <property name=\"tokens\" value=\"ARRAY_DECLARATOR\"/>\n            <property name=\"option\" value=\"EOL\"/>\n        </module>\n        <module name=\"SeparatorWrap\">\n            <property name=\"id\" value=\"SeparatorWrapMethodRef\"/>\n            <property name=\"tokens\" value=\"METHOD_REF\"/>\n            <property name=\"option\" value=\"nl\"/>\n        </module>\n        <module name=\"TypeName\">\n            <message key=\"name.invalidPattern\"\n                     value=\"Type name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"MemberName\">\n            <property name=\"format\" value=\"^[a-z][a-z0-9][a-zA-Z0-9]*$\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Member name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"ParameterName\">\n            <property name=\"format\" value=\"^[a-z]([a-z0-9][a-zA-Z0-9]*)?$\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Parameter name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"LambdaParameterName\">\n            <property name=\"format\" value=\"^[a-z]([a-z0-9][a-zA-Z0-9]*)?$\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Lambda parameter name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"CatchParameterName\">\n            <property name=\"format\" value=\"^[a-z]([a-z0-9][a-zA-Z0-9]*)?$\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Catch parameter name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"LocalVariableName\">\n            <property name=\"tokens\" value=\"VARIABLE_DEF\"/>\n            <property name=\"format\" value=\"^[a-z]([a-z0-9][a-zA-Z0-9]*)?$\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Local variable name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"ClassTypeParameterName\">\n            <property name=\"format\" value=\"(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Class type name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"MethodTypeParameterName\">\n            <property name=\"format\" value=\"(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Method type name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"InterfaceTypeParameterName\">\n            <property name=\"format\" value=\"(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Interface type name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"NoFinalizer\"/>\n        <module name=\"GenericWhitespace\">\n            <message key=\"ws.followed\"\n                     value=\"GenericWhitespace ''{0}'' is followed by whitespace.\"/>\n            <message key=\"ws.preceded\"\n                     value=\"GenericWhitespace ''{0}'' is preceded with whitespace.\"/>\n            <message key=\"ws.illegalFollow\"\n                     value=\"GenericWhitespace ''{0}'' should followed by whitespace.\"/>\n            <message key=\"ws.notPreceded\"\n                     value=\"GenericWhitespace ''{0}'' is not preceded with whitespace.\"/>\n        </module>\n        <module name=\"Indentation\">\n            <property name=\"basicOffset\" value=\"2\"/>\n            <property name=\"braceAdjustment\" value=\"0\"/>\n            <property name=\"caseIndent\" value=\"2\"/>\n            <property name=\"throwsIndent\" value=\"4\"/>\n            <property name=\"lineWrappingIndentation\" value=\"4\"/>\n            <property name=\"arrayInitIndent\" value=\"2\"/>\n        </module>\n        <module name=\"AbbreviationAsWordInName\">\n            <property name=\"ignoreFinal\" value=\"false\"/>\n            <property name=\"allowedAbbreviationLength\" value=\"1\"/>\n        </module>\n        <module name=\"OverloadMethodsDeclarationOrder\"/>\n        <module name=\"VariableDeclarationUsageDistance\"/>\n        <module name=\"CustomImportOrder\">\n            <property name=\"sortImportsInGroupAlphabetically\" value=\"true\"/>\n            <property name=\"separateLineBetweenGroups\" value=\"true\"/>\n            <property name=\"customImportOrderRules\" value=\"STATIC###THIRD_PARTY_PACKAGE\"/>\n        </module>\n        <module name=\"MethodParamPad\"/>\n        <module name=\"NoWhitespaceBefore\">\n            <property name=\"tokens\"\n                      value=\"COMMA, SEMI, POST_INC, POST_DEC, DOT, ELLIPSIS, METHOD_REF\"/>\n            <property name=\"allowLineBreaks\" value=\"true\"/>\n        </module>\n        <module name=\"ParenPad\"/>\n        <module name=\"OperatorWrap\">\n            <property name=\"option\" value=\"NL\"/>\n            <property name=\"tokens\"\n                      value=\"BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR,\n                    LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR, METHOD_REF \"/>\n        </module>\n        <module name=\"AnnotationLocation\">\n            <property name=\"id\" value=\"AnnotationLocationMostCases\"/>\n            <property name=\"tokens\"\n                      value=\"CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF\"/>\n        </module>\n        <module name=\"AnnotationLocation\">\n            <property name=\"id\" value=\"AnnotationLocationVariables\"/>\n            <property name=\"tokens\" value=\"VARIABLE_DEF\"/>\n            <property name=\"allowSamelineMultipleAnnotations\" value=\"true\"/>\n        </module>\n        <module name=\"NonEmptyAtclauseDescription\"/>\n        <module name=\"AtclauseOrder\">\n            <property name=\"tagOrder\" value=\"@param, @return, @throws, @deprecated\"/>\n            <property name=\"target\"\n                      value=\"CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF\"/>\n        </module>\n        <module name=\"MethodName\">\n            <property name=\"format\" value=\"^[a-z][a-z0-9][a-zA-Z0-9_]*$\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Method name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"SingleLineJavadoc\">\n            <property name=\"ignoreInlineTags\" value=\"false\"/>\n        </module>\n        <module name=\"EmptyCatchBlock\">\n            <property name=\"exceptionVariableName\" value=\"expected\"/>\n        </module>\n        <module name=\"CommentsIndentation\"/>\n    </module>\n</module>"
  },
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*.java]\nindent_size = 2\ncharset = utf-8"
  },
  {
    "path": ".github/CHANGELOG.md",
    "content": "### 2.1.6 Release (17.01.2026)\n* Updated minigamesbox to 1.4.5\n\n### 2.1.5 Release (13.07.2025)\n* Updated minigamesbox to 1.4.3\n\n### 2.1.4 Release (09.06.2025)\n* Fixed ICCE: Found class org.bukkit.inventory.InventoryView\n* Fixed PlugilyEntityPickupItemEvent IAE greater 0 on paper 1.21 +\n* Updated to minigamesbox 1.4.2\n\n### 2.1.3 Release (03.05.2025)\n* Added config option to not spawn more than 1 gold per spawner \"GOLD_MULTIPLE\"\n* Fixed respawn location of spectators\n* Changed bow dropped message now gets only to players without the role murderer\n* Fixed on Murderer Leave the new murderer message was send to all players instead of new murderer\n* Fixed default rewards.yml\n* Fixed onMurdererDeath the subtitle did not translate placeholders\n* Fixed spectator mode - since core usage its not needed to substract by one the playersleft value\n* Updated to minigamesbox 1.4.1\n\n### 2.1.2 Release (13.03.2025)\n* Updated to minigamesbox 1.4.0\n\n### 2.1.1 Release (18.02.2025)\n* Fixed PotionEffects on different server versions\n* Fixed Spectators sometimes counted as players\n* Updated to minigamesbox 1.3.16\n\n### 2.1.0 Release (13.07.2024)\n* Changed onDisable process to make sure all data gets saved even on mysql\n* Fixed Detective bow glitches away on startup\n* Fixed gold removing and therefore not working mystery cauldrons and prayers on newer mc versions\n* Fixed prayer grants new gold after usage\n\n### 2.0.10 Release (09.07.2024)\n* Updated to minigamesbox 1.3.11\n* Fixed arena after playing does not reset the arena options from config\n\n### 2.0.9 Release (25.06.2024)\n* Updated to minigamesbox 1.3.10\n\n### 2.0.8 Release (18.06.2024)\n* Updated to minigamesbox 1.3.9\n* Updated API\n\n### 2.0.7 Release (24.04.2024)\n* Fixed bug where the murderer gets teleported to the lobby to fast when arena ends\n* Updated to minigamesbox 1.3.8\n\n### 2.0.6 Release (15.01.2024)\n* Fixed Hungerlose option in config.yml\n* Changed Round chances are now full numbers (no ,xx)\n* Updated to minigamesbox 1.3.7\n\n### 2.0.5 Release (13.01.2024)\n* Updated to minigamesbox 1.3.6\n\n### 2.0.4 Release (03.01.2024)\n* Added new command /mma locale <locale> to set your locale\n* Fixed GameProfile API 1.20 change\n* Fixed none kits related plugins issues\n\n### 2.0.3 Release (31.12.2023)\n* Added 1.20.3 & 1.20.4 support\n* Updated to minigamesbox 1.3.4\n\n### 2.0.2 Release (29.11.2023)\n* Fixed cauldronclick adds gold instead of removing gold\n* Fixed IAE on particles \n* Removed debug messages\n* Updated to minigamesbox 1.3.3\n\n### 2.0.1 Release (21.08.2023)\n* Updated to minigamesbox 1.3.2-SNAPSHOT to fix urgent bugs\n\n### 2.0.0 Release (08.08.2023)\n* Added up to 1.20 compatibility\n* Added sword skins.yml\n* Added trails.yml\n* Changed supported languages [https://translate.plugily.xyz]\n* Changed plugin base is based on MinigamesCore [https://github.com/Plugily-Projects/MiniGamesBox]\n* Changed native java building to java17, java 8 downloadable on our discord [https://discord.plugily.xyz]\n* Fixed all known bugs\n\n### 1.8.0 Release (05.08.2021 - 2022)\n* Improved leaderboard command\n* Added murderer and detective chance placeholders to scoreboard\n* Now weather changing will be cancelled when a game is running\n* Now users can use placeholderapi placeholders in bossbar, titles, without player specified\n* Added option to determine if the deletion of arena needs confirmation or not\n\n### 1.7.9 Release (30.05.2021 - 01.08.2021)\n* Added forcestart item\n* Added murderer and detective pass (Command and Item to activate)\n* Added new stat (new tables on mysql needs to be manually added murderer_pass, detective_pass *or* recreated)  \n* Added special_items.yml\n* Added 1.17 support\n* Reuse XMaterial for specialitems\n* Fix NoSuchMethodError when hasCooldown method is not existed in 1.11 and lowest versions\n* Removed lobbyitems.yml\n* Removed Rainbow Bed option\n>>> beta1 \n* Fixed party (parties v3.1.0) not working anymore\n* Fixed when plugins scoreboards not re-appeared after game end\n* Fixed join maxplayers did not match the arena with highest player amount\n* Removed temp added scoreboard rewards\n\n### 1.7.8 Release (15.04.2021 - 10.05.2021)\n* Added /mm join maxplayers which tries to get the arena with the highest amount of players\n* Added placeholder arena_players_online\n* Added new RewardType scoreboard_add\n* Changed Now the arena will be set to isDone false if the world is not exist, after the plugin loaded.\n* Changed randomjoin mechanics -> Searches for starting -> random join -> Searches for waiting -> random join\n* Fixed arrow trails are only on player\n\n### 1.7.7 Release (31.03.2021 - 13.04.2021)\n* Fixed NoSuchElementException when iterating through players in gold locations but there is no player available.\n* Fixed issue when there was no murderer in game and it caused to not choose another one.\n* Fix when arena selector GUI does not opened\n* Fixed NPE on ArrowEvents and other version improvements\n\n### 1.7.6 Release (19.03.2021)\n* Fixed Last words & trails for non op players\n* Fixed particle issues\n* Fixed invisible bug for spectators that joined while ingame\n* Fixed trail particle are random even on bow shoot  \n* Changed config.yml Item values of states and added all states\n* Added trails blacklist\n\n### 1.7.5 Release (01.02.2021 - 14.03.2021)\n* Added modifiable arena state names to language\n* Added configurable map selector items\n* Added legacy support\n* Added support for multiple last words that will randomize\n* Added a lot of new Trails (Should support every particle name that is supported since 1.8)\n* Added TeleportArgument (/mma tp)\n* Added new RewardType scoreboard_remove\n* Changed trails will now randomize if you got perms for more than one  \n* Cached armor stands will be removed after block break if type is matches\n* Now special block holograms will get removed after game stop, after game start, it will show again\n* Fixed CME error when removing special blocks\n\n### 1.7.4 Release (25.01.2021 - 28.01.2021)\n* Fix stack trace array length is 0 when trying to send exception to service\n* Updated commonsbox to fix actionbar problems\n* Fixed spectators can not see each other after joining game while being ingame\n\n### 1.7.3 Release (18.01.2021 - 22.01.2021)\n* Fixed mm items are not removed if inventory manager is enabled and the server is stopping\n* Fixed 2nd last char of name gets removed if only one murderer\n\n### 1.7.2 Release (10.01.2021 - 18.01.2021)\n* Fix NPE for armor stand hologram location is null\n* Fixed issue when sign instances section not found in file\n* Fixed arena join permission\n* Added 1.11+ compatibility\n* Added murderer and detective shuffler to avoid the same characters when you are only playing with the same people\n* Added option to disable death message completely \n\n### 1.7.1 Release (04.01.2021)\n* Changed summary message for one murderer round\n* Changed Innocents will be killed if they kill the detective (if ENABLE_KILL_DETECTIVE_IF_INNOCENT_KILLED enabled)\n* Added customizable item name in arena selector gui\n\n### 1.7.0 Release (29.12.2020)\n* Rewritten scoreboardlib (fixed flickering and color matching) -> 122 chars for 1.14 up and 48 for lower versions\n* Fixed issue that murderer is not removed from alive list if there are only 2 players left\n* Fixed player teleport on void death while in lobby stage\n>>> b2\n* Attempt to fix scoreboard problems\n>>> b1\n* Fix NoSuchMethodError when CommandSender#spigot does not exists on 1.11\n* Updated ScoreboardLib to fix problems with color matching\n* Now spectators will not launch fireworks once game stopped\n\n### 1.6.9 Release (28.11.2020)\n* Fixed joining through a sign while hotbar slot for leave-item is active\n* Fixed gold visuals broke the whole plugin while enabled\n\n### 1.6.8 Release (10.11.2020)\n* Fixed particle effects not working on 1.13+\n\n### 1.6.7 Release (02.11.2020 - 08.11.2020)\n* Added particle effect to gold spawn locations to show where gold will spawn\n* Added death/spectator roles therefore users will not get rewards if they are spectator\n* Added rainbow beds\n\n### 1.6.6 Stable (31.10.2020)\n* Fixed armorstands are not correctly displayed\n* Fixed dead body heads \n* Fixed locales not working\n* Fixed heads\n* Fixed sign loading\n* Fixed sign after arena validation\n* Fixed new arena is not proper registered \n* Fixed scoreboard friendly fire caused players visible \n* Fixed arrows can damage entities outside the game\n* Changed disabled arrow bouncing\n\n### 1.6.5 (07.10.2020 - 29.10.2020)\n* Added special blocks remove command /mma removeblock\n* Fixed hologram spawn item height (bow) \n* Fixed the bow item got not removed on some cases\n* Another fix for cauldron click event\n* Fixed locations of special blocks on setup menu\n* Optimized special block click performance\n* Fixed stacked armorstands\n* Fixed players will die under water\n\n### 1.6.4 Hotfix (05.10.2020)\n* Fixed cauldron click event\n* Fixed detectives will get bow from prayer\n\n### 1.6.3 Release (19.09.2020 - 02.10.2020)\n* Updated locales to latest version\n* Added the possibility to disable the innocent locator\n* Added the possibility to change messages of locales on language.yml \n* Fixed adding cauldrons to the arena\n* Removed HolographicDisplays dependency\n\n### 1.6.2 Release (15.08.2020 - 13.09.2020)\n* (Developer Alert - Changed class names)\n* Added support for 1.16 hex colors\n* Added ArenaSelector\n* Added config option to play sound when adding score to user\n* Added new reward type gold_pickup\n* Fixed NPE when trying to teleport players to lobby location\n* Fixed no permission message not found\n* Fixed goldrush & goldban prayer did not reset on game end\n* Fixed MYSQL stats can't update\n* Fixed special blocks registering click twice\n* Fixed IllegalPluginAccessException on plugin disable\n* Fixed wrong order in trails\n* Fixed local values got no reset\n* Changed Death prefix can now be changed\n* Changed message delay of \"Waiting for players\" from 15 to 45 seconds \n* Optimized player corpse heads on paper\n* Reworked version checker\n\n### 1.6.1 Release (01.07.2020 - 27.07.2020)\n* Added missing 1.14 & 1.15 & 1.16 Materials\n* Added simple head corpse when no CorpseReborn is installed\n* Added new reward event -> death\n* Changed Reduce message will now only come on debug mode\n* Changed mysql updates to do only one instead of more than 10 (should improve performance)\n* Fixed spectators that wasn't ingame got rewards\n* Fixed reset of contributions not applied when leaving ingame\n* Fixed in rare cases is the speed not the default one after changing it with spectator menu\n* Fixed sword is flying further after player hit\n* Fixed separate chat (and prefix for death players)\n\n### 1.6.0 Release\n* Fixed spectators preventing arrows\n* Fixed editor value \"spawn gold time\"\n* Added bungeemode Arena shuffler\n* Added option to disable separate chat\n* Added 1.16.x compatibility \n* Added possibility to change table name of mysql database\n* Removed stats save on quitevent as it wasn't necessary\n* Fixed different sword cooldown time than 5 seconds\n* Fixed bungeemanager enable null text error\n* Optimized murderer leave before they got the sword\n* Optimized the death respawn location \n* Fixed prayer multi gold\n\n### 1.5.5 Hotfix\n* Fixed language list getting\n\n### 1.5.4 Release\n* Added new config values to change arrow amount of fake detective and bow on gold\n* Fixed properties getting on language list\n* Disabled creating of reducedDependencyPom\n\n### 1.5.3 Release\n* Added a config value to disable detective killing on innocent kill\n* Added a config value to change the spawner mode\n* Added a way to disable gold spawn limit\n* Added a config value to change the get bow from gold value (default: 10)\n* Added Murderer speed can be disabled\n* Added Murderer speed multiplier can be changed\n* Added Now you can change the hit range and max range of the flying sword\n* Fixed an 1.15.x reporter service plugin crash\n* Fixed murderer can kill other murderer with bow\n* Fixed amount of arrows on gold pickup\n* Changed default language value as there does not exist /mm admin\n* Updated setup tips Feedback page link\n* Optimized sword fly \n* Fixed Stats will now get saved on restart stage\n* Fixed stats were not loaded on bungee mode\n* Fixed chances are not displayed on new players for the first round (occurred for all who using mysql database)\n\n### 1.5.2 Release \n* Fixed Commands.Main-Command.Heads not found \n\n### 1.5.1 Release (20.03.2020) \n* Fixed broken language\n* Added PlaceholderAPI for some per player messages\n* Fixed Parties Integration \n* Attempt to fix player respawn\n\n### 1.5.0 Release (20.12.2019 - 17.03.2020) (by Tigerpanzer)\n* Fixed spectator gui opened on physical actions\n* Added option to control the time between gold spawns\n* Added better option to allow only 1 murderer/detectives\n* Fixed division by null error\n* Fixed murderer can kill other murderer\n* Fixed bungeecord shutdown when game ends (Thanks to barpec12)\n* Added option to hide chances\n* Changed the setup radius of enchanting table and cauldron to 15\n* PlaceholderAPI placeholders are no longer case sensitive\n* Added arena state placeholders for PlaceholderAPI:\n   * %murdermystery_{arena id}:{data}% where data types are:\n      * players - amount of players in arena\n      * max_players - max players in arena\n      * state - current state raw enum name eg. STARTING\n      * state_pretty - prettified name of enum eg. Waiting (instead WAITING_FOR_PLAYERS)\n      * mapname - name of arena map\n* Fixed mysql database - Create a new one and your stats should be saved correctly (Thanks to add5tar)\n* Fixed loading arena values (Some values had a wrong file location)\n* Added party dependency, you can join with more players to one arena\n* Fixed murder gets sword as spectator\n* Changed murder speed boost from potion to walkspeed to hide particles\n* Added Connect-To-Hub boolean to bungee.yml\n* Added End-Location-Hub boolean to bungee.yml\n\n### 1.4.1 Release (05.12.2019 - 13.12.2019) (by Tigerpanzer)\n* Added a new MOTD Manager in the bungee.yml (Now you can define the states on yourself) \n* Now the values in bungee.yml will work\n* Arena will not be stopped anymore on starting phase\n  when there are null players (only resetting it to waiting for players)\n* You can now activate short commands (/start and /leave)\n* Fixed incompatibility with chatcontrol\n* Minecraft 1.15 compatible\n* Fixed the murderer draw when murderer leaves ingame\n* Fixed SummaryMessage (murderer will now be strike out)\n\n### 1.4.0 Release (26.10.2019 - 16.11.2019) (by Tigerpanzer)\n* Fixed incompatibility with essentials respawn\n* You can now choose your own cooldown for sword attack/fly and bow shoot\n* Clearer way of error reporting\n* Added option to change murderer sword item\n* Added options to specify arrows amount\n* Added a way to configure how many murderers & detectives are selected for a game (definable per arena)\n* Changed the way of drop bow (The bow will be dropped if the last detective die)\n* Fixed scoreboard innocents count\n* Added compass distance to bow and player locator\n* Fixed the +- message for minus points in score messages\n* Fixed the exp and level save on InventoryManager\n* Fixed instant respawn bug on last murderer\n\n### 1.3.1 Release (11/18.10.2019) (by Tigerpanzer)\n* Fixed that you can sleep in beds\n* Fixed player spawning after a death in blocks\n* Fixed arena stop when it will be called due to reload, stop, delete\n* Fixed the NoSuchMethodException on arena sign load when the sign isn´t a wallsign\n* Dropped 1.11 support\n\n### 1.3.0 Release (21.09.2019 - 03.10.2019) (by Tigerpanzer)\n* Changed the way how randomjoin works (now it will search for the most players first)\n* Fixed wrong location of corpse, hologram and bow spawn after player left the game\n* Fixed when you took death prayer you could die in next game\n* Fixed getting damage from fire after you join a game\n* Fixed the hero name in the summary message was always none\n* Inventories will now properly regenerate on plugin disable\n* Changed that player will be a spectator when the starting time is under 3\n* Added option to disable fall damage in the arena\n* Fixed sound after player death that could be heard in lobby\n* Fixed the ArrayIndexOutOfBoundsException when the murder left before the game starts (crashing game)\n* Now players can´t interact with armorstands when they are in the arena\n* Now players can´t destroy itemframes, paintings, and armorstands when they are in the arena\n* Proofread and updated locales ~Plajer\n\n### 1.2.1 Release (11/13.09.2019) (by Tigerpanzer)\n* Added a lobby time shorter when the maximum player size is reached\n* The sword will be now available at cooldown to hit someone as murder (after a 1 sec throw\ncooldown because the sword is not available if you throw it)\n* Fixed 1.14 ClassNotFoundException error when a paper server version is used\n* Fix GUI opening on physical actions (Especially on redstone block) (thanks to BestMark)\n* Fix null on getting corpse data from corpse reborn (thanks to BestMark)\n\n### 1.2.0 Release (08/09.09.2019) (by Tigerpanzer)\n* Added name tags hide feature in game\n* Game will now properly end when murderer dies by environment\n* Detective will now drop bow when dies by environment\n* Fixed 1.14 NoClassFound error when user tries to pick up an arrow\n* You shouldn't be teleported to spawn on death in game (you'll stay at the death location)\n* Murderer will no longer throw the sword if you interact physically with redstone mechanisms\n* Fixed issue that you could join full games before they started (in game you join as spectator)\nnow proper full game permission check will occur and do the thing to allow or disallow you to join\n* /mm randomjoin will now really join random arena not first one it find good to join\n* Updated bunch of locales\n* Fixed Russian locale was broken\n* Added Slovak and Turkish locales (thanks to POEditor contributors)\n* Fixed bug that auto respawn didn't work\n\n### 1.1.6 Release (13/29.07.2019)\n* Changed Chinese (Simplified) locale prefix from zh to cn and Chinese (Traditional) from zh_hk to zh_tw\n* Respawn will now properly work on 1.14\n* Fixed /vda typo in force start command\n* Prettified special blocks setup messages\n* Dropped leaderheads support, leaderheads now uses PlaceholderAPI to retrieve statistics and we do support\nPAPI so please use that\n\n### 1.1.5 Release (12.07.2019)\n* Fixed errors in console when joining game via sign\n\n### 1.1.4 Release (15.06.2019 - 10.07.2019)\n* Plugin will no longer send error messages `failed to register events` if corpse reborn wasn't installed\n* Join permission message outputs required permission node now\n* Added Portuguese (BR) locale (`pt_br` in config.yml)\n* Locales with special characters like Russian or Korean will now work properly and won't be seen as `?` characters\n* Added configurable murderer thrown sword speed\n* Added 1.14 sign game states (thanks to montlikadani)\n\n### 1.1.3 Release (01/08.06.2019)\n* Fixed boss bar when disabled could throw errors breaking the game\n* Fixed PlaceholderAPI placeholders didn't work on in-game scoreboard\n* Fixed locales never worked if there was no locales folder\n* Fixed new arena name message wasn't sent in setup editor\n\n### 1.1.2 Release (21/25.05.2019)\n* Fixed that you couldn't edit arena via /mm <arena> edit\n* You will now receive additional message when adding gold/player spawns that 4 is minimum spawns amount so you can add more\n* Totally recoded arena setup gui UI and code structure, now all changes applies to arena instantly\n* Arena setup map name option now is chat based not name tag based\n* Added shift + right click to delete all gold/player spawns (useful if you made a mistke, better than nothing)\n* Added sign spawn protection radius warning, non opped players can't join via signs if sign is in radius of spawn protection\n* Debug section is no longer visible part of config, it can be added manually but won't be there by default from now\n* Reload command is no longer discouraged and reloads both config and language file\n* Sword does fly bit faster now (from 0.5 to 0.65 fly speed)\n* Murderer no longer always receive lose statistic even on win\n* Fixed boss bar displays game end message instead of waiting for players after start up\n* /mma help and /mm help will display help pages now\n* Players shouldn't be able to interact with flower pots and paintings anymore\n\n### 1.1.1 Release (28.04.2019 - 18.05.2019)\n* Relocate Plajer's Lair Services and TigerHix's ScoreboardLib packages in order to avoid conflict between our minigames if used on same server\n* Fixed saving user data on plugin disable while using MySQL\n* /mma delete and reload require confirmation before execution now, theymust be typed twice to execute\n* Added permissions for increased chance of being murderer or detective, node: `murdermystery.role.murderer.<1/100>` or\n`murdermystery.role.detective.<1/100>` the number is the amount of bonus points to give on arena join\n* Fixed update notify message was sent to everybody without proper permission check\n* First time database creation is now made async not in main server thread\n* Implemented faster Hikari connection pool library and removed BoneCP, jar size is now 3 times smaller too\n* Apache commons-io is now shaded into jar, 1.14 removed it\n* Recoded whole commands structure\n* Scoreboard colors were broken sometimes, this is now fixed (I hope so)\n\n### 1.1.0 Release (28.04.2019)\n* Fixed wins/loses weren't properly assigned on game end, only murderer received these stats\n* You can no longer join the game if it's in restarting state\n* You can no longer swap items via hands (i.e. main hand > off hand) when being in game\n* Added `win` and `lose` sections to rewards.yml when player wins or loses the game\n* CorpseReborn is made now soft-dependency, it will enable corpses feature if present but won't otherwise\n\n### 1.0.3 Release (20.04.2019)\n* Fixed MySQL database didn't work due to create statement failure\n* Now /mma reload command will force stop all current games before Arenas reload, still command usage is discouraged! (uservoice report)\n* Leaderheads stats placeholders length has been decreased to fit in the sign (uservoice report)\n\n### 1.0.2 Release (19.04.2019)\n* Fixed Hero in game summary was always `Nobody`\n* Fixed error when nobody was alive and game has ended then the exception would occur\n* Now when typing /mma forcestart with only 1 player game won't start\n* Added few pro tips when editing arena via /mm <arena> edit\n\n### 1.0.1 Release (18.04.2019)\n* CorpseReborn and HolographicDisplays are now set as soft dependencies in plugin.yml to allow plugin loader\nto load them before MurderMystery starts and avoid plugin start failure\n\n### 1.0.0 Release (28.10.2018-16.04.2019)\n* Added Russian, Spanish and Dutch locales support\n* Detective bow will now spawn bit higher to avoid touching the floor\n* Spectators can no longer pickup the bow\n* Added arenas.yml instances section check to avoid errors\n* Added death cases caused by fall, game won't break anymore when murderer or detective dies from fall\n* /murdermystery and /murdermysteryadmin commands will now work in game for non ops\n* Sword can no longer go through walls/solid blocks\n* Bow no longer loses durability on arrow shoot\n* New users will now start with default value of contributions for each role 1 not 0 that would\nthrow errors in lobby stage\n* Fixed action bar colors were broken\n* Fixed game end announce didn't happen\n* Fixed sword glitch after throwing it\n* Users cannot longer pickup anything from the ground\n* Spectators cannot use special blocks anymore\n* CorpseReborn and HolographicDisplays are no longer hardcoded dependencies in plugin.yml so without them\nplugin will start with fancy message to install them without throwing not user-friendly exception\n* Fixed kills, loses and wins statistics weren't added anytime\n* Misc code performance improvements\n* Removed Locale suggester\n> Release Candidate 2 (28.03.2019)\n* Setup GUI will now display 0 minimum players option if accidentally set\n* Bow Time prayer will now add new arrow to the inventory not set and override current amount\n* Improvement for bow cooldown display action bar\n* Fixed corpses were instantly removed on spawn, timer was set in ticks not seconds\n* Fixed spectator items didn't work on death (spigot bug)\n* Fixed corpse will no longer spawn on ending location when leaving game via /mm leave\nif you were fake detective or a detective\n* Fixed bow couldn't be picked up by innocents\n* Fixed more than one corpse was spawned on death\n* Fixed you couldn't receive bow when you had more than 10 gold taken\n(you have 9 gold and pickup 2 then you cannot get bow cause you have 11 not 10)\n* Fixed more corpses could spawn on death by arrow\n* Fixed last words didn't display on death other than by arrow\n* Fixed message Game-Started which was copied from Village Defense\n> Release Candidate 1 (24/26.03.2019)\n* Now clicking corpses in game won't open their inventories\n* Improved sign manager\n* Removed ' character from default join permission node\n* Crucial block center calculations fix - now holograms will display properly\n* Fixed prayer particle display and arena setup\n* Fixed single compensation prayer from Confessional did give gold but it was\nuseless as user gold statistics weren't increased\n* Now using special blocks if game has ended/not started (in lobby) is blocked\n* Bow Time prayer (receive bow + arrows) is applied to everyone\n* Bow Time prayer has been nerfed, only 1 arrow is given not whole stack now\n* Now player health will be set to full when joining the game\n* Bow drop announcement will no longer appear when only 1 player has left in the game\n* When game ends users will get reset their non persistent user data (like gained gold amount)\n> Pre 5 (24.03.2019)\n* Abandoned the direct try-catch exception handling in most of methods and event listeners in favour of logger\nlistening, code looks better now\n* Fixed setup inventory didn't work\n* Using new Scoreboard library, whole game will perform now much better without lags\n* Now language.yml file is cached on load so it will drastically reduce lag of plugin\n> Pre 4 (11.01.2019-06.02.2019)\n* Added useSSL=false argument in mysql.yml address to avoid mysql warnings in console (not harmful)\n* Added %MAX_PLAYERS% placeholder in scoreboard\n> Pre 3 (30.10.2018/26.12.2018)\n* Now arena is stopped 10 seconds after the game ends not 5 seconds after\n* Arena is now properly clean up after the game when using bungee mode\n* Fixed arrows weren't given to innocents when they got 10 gold ingots\n* Fixed /mma forcestart wasn't working properly if there were not enough players to start\n* In case of server crash players' inventories will be loaded on join from backup from Murder Mystery minigame if exists\n* When murderer picked up gold, it's amount didn't increase - now it's fixed\n> Pre 2 (28.10.2018)\n* Fixed wrong cast error when you were damaged by skeleton's arrow (https://plajer.xyz/errorservice/viewer.php?id=336)\n* Fixed NPE when murderer was null - I must use player objects instead of these terrible UUID's\n> Pre 1 (11/20.10.2018)\n* Minimum amount of players cannot be now less than 2 (game will automatically set it to 2 if so)\n* Block destroying item frames and paintings\n* Added mystery cauldron and mystery potions (soon more)\n* Added praise the developer block (end portal and levers)\n* Fixed only one gold ingot could be picked up from few ones in a stack\n* Fixed scores weren't added to account\n* Added bow trails\n* Native 1.13 support added\n* Added PAPI placeholders in scoreboard\n* Added murdermystery.command.override permission\n* Added setup video link to the game\n\n### 0.0.8 Beta (06/07.10.2018)\n* Added throwable sword for murderer\n* Added multiple last words\n* Fixed gold not spawning\n* Fixed starting scoreboard gamestate wasn't displayed\n* Murderer sword won't be taken now when he receives additional arrows\n* Now actions that gives you score (like +15 score for gold pickup will properly format without %action% placeholder)\n* Added 1.13 and 1.13.1 support\n* Removed 1.9 and 1.10 support\n* Added spectator settings\n* API recode\n* JavaDocs created\n* Fixed throwable sword angle\n* You cannot join game now infinitely through command\n* Added corpses override option in config\n* Now players that will leave game will be visible by other players outside game\n* Fixed some potions amplifiers were 1 level higher, amplifiers are counted from 0\n\n### 0.0.7 Beta (03.10.2018)\n* Added PAPI placeholders in chat (chat formatting must be enabled)\n* General code improvements and changes\n* Added %MAPNAME% placeholder in scoreboard\n* Added checking for minimum players amount in lobby to start\n"
  },
  {
    "path": ".github/CONTRIBUTORS.md",
    "content": "## This file is dedicated to **Murder Mystery** project's all-time contributors.\n\n## **very outdated, please nag me if you still see it here**\n\n**I'm sincerely glad to everyone who supported our project every time!**\n\n**Contributors are listed in alphabetical order, every contributor is equally important!**\n* Adolfo Garolfo - Spanish translator\n* Andrei - Romanian translator\n* [Borc55](https://www.spigotmc.org/members/borc55.108890/) - Czech translator\n* [ColaIan](https://www.spigotmc.org/members/colaian.608965/) - Chinese (Traditional) translator\n* [Dianox](https://www.spigotmc.org/members/dianox.74931/) - French translator\n* EnderBoyHUN - Hungarian translator\n* HStreamGamer - Vietnamese translator\n* [KitsuneSakul](https://www.spigotmc.org/members/kitsunesakul.61401/) - Czech translator\n* [Melonzrix](https://www.spigotmc.org/members/melongun77.147284/) - German translator\n* [montlikadani](https://www.spigotmc.org/members/toldi.251100/) - Hungarian translator\n* [N4TH4NOT](https://www.spigotmc.org/members/n4th4not.400311/) - French translator\n* SteveFox - Italian translator\n* [Tigerkatze](https://www.spigotmc.org/members/tigerkatze.414545/) - Main tester, German translator and one of current maintainers of Murder Mystery project\n* [zuhir](https://www.spigotmc.org/members/zuhir.31452/) - Spanish translator\n* 壁灯 - Chinese (Simplified) translator\n\n**Thanks to these companies for providing free licenses for MurderMystery open source work:**\n* Code Whale Inc. - POEditor open source project license\n\n**Also thanks to every bug reporters for reporting us those nasty bugs, and code contributors for making Murder Mystery better!**\n\n`Please note that translators are put here only if their contribution to the language is higher than 15% of total strings and language is used in plugin`\n\n![](https://i.imgur.com/LFakRC8.png)\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "patreon: plugily\n"
  },
  {
    "path": ".github/LICENSE.md",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<http://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<http://www.gnu.org/philosophy/why-not-lgpl.html>.\n"
  },
  {
    "path": ".github/README.md",
    "content": "![](https://images.plugily.xyz/banner/display.php?id=MurderMystery)\n\n# Murder Mystery [![Maven Repository](https://maven.plugily.xyz/api/badge/latest/releases/plugily/projects/murdermystery?color=40c14a&name=Maven&prefix=v)](https://maven.plugily.xyz/#/releases/plugily/projects/murdermystery) [![JavaDoc Repository](https://maven.plugily.xyz/api/badge/latest/releases/plugily/projects/murdermystery?color=40c14a&name=JavaDoc&prefix=v)](https://maven.plugily.xyz/javadoc/releases/plugily/projects/murdermystery/latest) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=Plugily-Projects_MurderMystery&metric=sqale_rating)](https://sonarcloud.io/summary/overall?id=Plugily-Projects_MurderMystery) [![Discord](https://img.shields.io/discord/345628548716822530.svg?color=7289DA&style=for-the-badge&logo=discord)](https://discord.plugily.xyz) [![Patreon](    https://img.shields.io/badge/Patreon-F96854?style=for-the-badge&logo=patreon&logoColor=white)](https://patreon.com/plugily)\n\nMurder Mystery is a Minecraft minigame designed for small and big servers. This minigame is unique and very\nconfigurable, 100% free and open source!\n\nBe the murderer and kill everyone in the game! Beware of the detective and armored innocents! As a detective you must\nkill the murderer and protect as much innocents as you can!\nAs an innocent you must just survive till the end!\n\nHave fun using it! Leave a good rating if you really like it.\n\n## Want to contribute in this project?\n\n[**💣 Issues Reporting (Discord)**](https://discordapp.com/invite/UXzUdTP)\n[**❤ Make Donation**](https://www.paypal.me/plugilyprojects)\n\n# Credits\n\n## Open Source Libraries\n\n| Library                                                          | Author                                                 | License                                                                            |\n|------------------------------------------------------------------|--------------------------------------------------------|------------------------------------------------------------------------------------|\n| [ScoreboardLib](https://github.com/TigerHix/ScoreboardLib/)      | [TigerHix](https://github.com/TigerHix)                | [LGPLv3](https://github.com/TigerHix/ScoreboardLib/blob/master/LICENSE)            |\n| [HikariCP](https://github.com/brettwooldridge/HikariCP)          | [brettwooldridge](https://github.com/brettwooldridge)  | [Apache License 2.0](https://github.com/brettwooldridge/HikariCP/blob/dev/LICENSE) |\n| [bStats](https://github.com/Bastian/bStats-Metrics)              | [Bastian](https://github.com/Bastian)                  | [LGPLv3](https://github.com/Bastian/bStats-Metrics/blob/master/LICENSE)            |\n| [Commons Box](https://github.com/Plajer/Commons-Box)             | [Plajer](https://github.com/Plajer)                    | [GPLv3](https://github.com/Plajer/Commons-Box/blob/master/LICENSE.md)              |\n| [MiniGamesBox](https://github.com/Plugily-Projects/MiniGamesBox) | [Plugily Projets](https://github.com/Plugily-Projects) | [GPLv3](https://github.com/Plugily-Projects/MiniGamesBox/blob/master/LICENSE.md)   |\n\n## Open Source Licenses\n\n#### Code Whale\n\n<img src=\"https://poeditor.com/public/images/logo/logo_head_500_transparent.png\" alt=\"jetbrains logo\" width=\"150\"/>\n\nThanks to Code Whale for Open Source license for POEditor project.\n\n## Contributors\n\nThis section will be updated soon\n\n<img align=\"right\" src=\"https://i.imgur.com/BAHeLR2.png\">\n\n"
  },
  {
    "path": ".github/building/build.gradle.kts",
    "content": "plugins {\n    id(\"signing\")\n    `maven-publish`\n    id (\"com.gradleup.shadow\") version \"9.0.0-beta5\"\n    java\n}\n\nrepositories {\n    mavenLocal()\n    maven(\"https://hub.spigotmc.org/nexus/content/repositories/snapshots/\")\n    maven(\"https://oss.sonatype.org/content/repositories/snapshots\")\n    maven(\"https://oss.sonatype.org/content/repositories/central\")\n    maven {\n        name = \"papermc\"\n        url = uri(\"https://repo.papermc.io/repository/maven-public/\")\n    }\n    maven(uri(\"https://maven.plugily.xyz/releases\"))\n    maven(uri(\"https://maven.plugily.xyz/snapshots\"))\n    maven(uri(\"https://repo.maven.apache.org/maven2/\"))\n}\n\ndependencies {\n    implementation(\"plugily.projects:MiniGamesBox-Classic:1.3.17\") { isTransitive = false }\n\n    compileOnly(\"io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT\")\n    compileOnly(\"org.jetbrains:annotations:24.0.1\")\n    compileOnly(files(\"lib/CorpseReborn.jar\"))\n}\n\ngroup = \"plugily.projects\"\nversion = \"2.1.1-SNAPSHOT1\"\ndescription = \"MurderMystery\"\n\njava {\n    withJavadocJar()\n}\n\ntasks {\n    build {\n        dependsOn(shadowJar)\n    }\n\n    shadowJar {\n        archiveClassifier.set(\"\")\n        relocate(\"plugily.projects.minigamesbox\", \"plugily.projects.murdermystery.minigamesbox\")\n        relocate(\"com.zaxxer.hikari\", \"plugily.projects.murdermystery.database.hikari\")\n        minimize()\n    }\n\n    processResources {\n        filesMatching(\"**/plugin.yml\") {\n            expand(project.properties)\n        }\n    }\n\n    javadoc {\n        options.encoding = \"UTF-8\"\n    }\n\n}\n\npublishing {\n    repositories {\n        maven {\n            name = \"Releases\"\n            url = uri(\"https://maven.plugily.xyz/releases\")\n            credentials {\n                username = System.getenv(\"MAVEN_USERNAME\")\n                password = System.getenv(\"MAVEN_PASSWORD\")\n            }\n        }\n        maven {\n            name = \"Snapshots\"\n            url = uri(\"https://maven.plugily.xyz/snapshots\")\n            credentials {\n                username = System.getenv(\"MAVEN_USERNAME\")\n                password = System.getenv(\"MAVEN_PASSWORD\")\n            }\n        }\n    }\n    publications {\n        create<MavenPublication>(\"mavenJava\") {\n            from(components[\"java\"])\n        }\n    }\n}\n"
  },
  {
    "path": ".github/building/gradlew",
    "content": "#!/bin/sh\n\n#\n# Copyright © 2015-2021 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n#\n\n##############################################################################\n#\n#   Gradle start up script for POSIX generated by Gradle.\n#\n#   Important for running:\n#\n#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is\n#       noncompliant, but you have some other compliant shell such as ksh or\n#       bash, then to run this script, type that shell name before the whole\n#       command line, like:\n#\n#           ksh Gradle\n#\n#       Busybox and similar reduced shells will NOT work, because this script\n#       requires all of these POSIX shell features:\n#         * functions;\n#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,\n#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;\n#         * compound commands having a testable exit status, especially «case»;\n#         * various built-in commands including «command», «set», and «ulimit».\n#\n#   Important for patching:\n#\n#   (2) This script targets any POSIX shell, so it avoids extensions provided\n#       by Bash, Ksh, etc; in particular arrays are avoided.\n#\n#       The \"traditional\" practice of packing multiple parameters into a\n#       space-separated string is a well documented source of bugs and security\n#       problems, so this is (mostly) avoided, by progressively accumulating\n#       options in \"$@\", and eventually passing that to Java.\n#\n#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,\n#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;\n#       see the in-line comments for details.\n#\n#       There are tweaks for specific operating systems such as AIX, CygWin,\n#       Darwin, MinGW, and NonStop.\n#\n#   (3) This script is generated from the Groovy template\n#       https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt\n#       within the Gradle project.\n#\n#       You can find Gradle at https://github.com/gradle/gradle/.\n#\n##############################################################################\n\n# Attempt to set APP_HOME\n\n# Resolve links: $0 may be a link\napp_path=$0\n\n# Need this for daisy-chained symlinks.\nwhile\n    APP_HOME=${app_path%\"${app_path##*/}\"}  # leaves a trailing /; empty if no leading path\n    [ -h \"$app_path\" ]\ndo\n    ls=$( ls -ld \"$app_path\" )\n    link=${ls#*' -> '}\n    case $link in             #(\n      /*)   app_path=$link ;; #(\n      *)    app_path=$APP_HOME$link ;;\n    esac\ndone\n\n# This is normally unused\n# shellcheck disable=SC2034\nAPP_BASE_NAME=${0##*/}\n# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)\nAPP_HOME=$( cd -P \"${APP_HOME:-./}\" > /dev/null && printf '%s\n' \"$PWD\" ) || exit\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=maximum\n\nwarn () {\n    echo \"$*\"\n} >&2\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n} >&2\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"$( uname )\" in                #(\n  CYGWIN* )         cygwin=true  ;; #(\n  Darwin* )         darwin=true  ;; #(\n  MSYS* | MINGW* )  msys=true    ;; #(\n  NONSTOP* )        nonstop=true ;;\nesac\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=$JAVA_HOME/jre/sh/java\n    else\n        JAVACMD=$JAVA_HOME/bin/java\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=java\n    if ! command -v java >/dev/null 2>&1\n    then\n        die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nfi\n\n# Increase the maximum file descriptors if we can.\nif ! \"$cygwin\" && ! \"$darwin\" && ! \"$nonstop\" ; then\n    case $MAX_FD in #(\n      max*)\n        # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC2039,SC3045\n        MAX_FD=$( ulimit -H -n ) ||\n            warn \"Could not query maximum file descriptor limit\"\n    esac\n    case $MAX_FD in  #(\n      '' | soft) :;; #(\n      *)\n        # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC2039,SC3045\n        ulimit -n \"$MAX_FD\" ||\n            warn \"Could not set maximum file descriptor limit to $MAX_FD\"\n    esac\nfi\n\n# Collect all arguments for the java command, stacking in reverse order:\n#   * args from the command line\n#   * the main class name\n#   * -classpath\n#   * -D...appname settings\n#   * --module-path (only if needed)\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.\n\n# For Cygwin or MSYS, switch paths to Windows format before running java\nif \"$cygwin\" || \"$msys\" ; then\n    APP_HOME=$( cygpath --path --mixed \"$APP_HOME\" )\n    CLASSPATH=$( cygpath --path --mixed \"$CLASSPATH\" )\n\n    JAVACMD=$( cygpath --unix \"$JAVACMD\" )\n\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    for arg do\n        if\n            case $arg in                                #(\n              -*)   false ;;                            # don't mess with options #(\n              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath\n                    [ -e \"$t\" ] ;;                      #(\n              *)    false ;;\n            esac\n        then\n            arg=$( cygpath --path --ignore --mixed \"$arg\" )\n        fi\n        # Roll the args list around exactly as many times as the number of\n        # args, so each arg winds up back in the position where it started, but\n        # possibly modified.\n        #\n        # NB: a `for` loop captures its iteration list before it begins, so\n        # changing the positional parameters here affects neither the number of\n        # iterations, nor the values presented in `arg`.\n        shift                   # remove old arg\n        set -- \"$@\" \"$arg\"      # push replacement arg\n    done\nfi\n\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS='\"-Xmx64m\" \"-Xms64m\"'\n\n# Collect all arguments for the java command:\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,\n#     and any embedded shellness will be escaped.\n#   * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be\n#     treated as '${Hostname}' itself on the command line.\n\nset -- \\\n        \"-Dorg.gradle.appname=$APP_BASE_NAME\" \\\n        -classpath \"$CLASSPATH\" \\\n        org.gradle.wrapper.GradleWrapperMain \\\n        \"$@\"\n\n# Stop when \"xargs\" is not available.\nif ! command -v xargs >/dev/null 2>&1\nthen\n    die \"xargs is not available\"\nfi\n\n# Use \"xargs\" to parse quoted args.\n#\n# With -n1 it outputs one arg per line, with the quotes and backslashes removed.\n#\n# In Bash we could simply go:\n#\n#   readarray ARGS < <( xargs -n1 <<<\"$var\" ) &&\n#   set -- \"${ARGS[@]}\" \"$@\"\n#\n# but POSIX shell has neither arrays nor command substitution, so instead we\n# post-process each arg (as a line of input to sed) to backslash-escape any\n# character that might be a shell metacharacter, then use eval to reverse\n# that process (while maintaining the separation between arguments), and wrap\n# the whole thing up as a single \"set\" statement.\n#\n# This will of course break if any of these variables contains a newline or\n# an unmatched quote.\n#\n\neval \"set -- $(\n        printf '%s\\n' \"$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\" |\n        xargs -n1 |\n        sed ' s~[^-[:alnum:]+,./:=@_]~\\\\&~g; ' |\n        tr '\\n' ' '\n    )\" '\"$@\"'\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": ".github/building/gradlew.bat",
    "content": "@rem\n@rem Copyright 2015 the original author or authors.\n@rem\n@rem Licensed under the Apache License, Version 2.0 (the \"License\");\n@rem you may not use this file except in compliance with the License.\n@rem You may obtain a copy of the License at\n@rem\n@rem      https://www.apache.org/licenses/LICENSE-2.0\n@rem\n@rem Unless required by applicable law or agreed to in writing, software\n@rem distributed under the License is distributed on an \"AS IS\" BASIS,\n@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n@rem See the License for the specific language governing permissions and\n@rem limitations under the License.\n@rem\n@rem SPDX-License-Identifier: Apache-2.0\n@rem\n\n@if \"%DEBUG%\"==\"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\"==\"\" set DIRNAME=.\n@rem This is normally unused\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Resolve any \".\" and \"..\" in APP_HOME to make it shorter.\nfor %%i in (\"%APP_HOME%\") do set APP_HOME=%%~fi\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\"-Xmx64m\" \"-Xms64m\"\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif %ERRORLEVEL% equ 0 goto execute\n\necho. 1>&2\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2\necho. 1>&2\necho Please set the JAVA_HOME variable in your environment to match the 1>&2\necho location of your Java installation. 1>&2\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto execute\n\necho. 1>&2\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2\necho. 1>&2\necho Please set the JAVA_HOME variable in your environment to match the 1>&2\necho location of your Java installation. 1>&2\n\ngoto fail\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %*\n\n:end\n@rem End local scope for the variables with windows NT shell\nif %ERRORLEVEL% equ 0 goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nset EXIT_CODE=%ERRORLEVEL%\nif %EXIT_CODE% equ 0 set EXIT_CODE=1\nif not \"\"==\"%GRADLE_EXIT_CONSOLE%\" exit %EXIT_CODE%\nexit /b %EXIT_CODE%\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": ".github/building/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n  ~ MurderMystery - Find the murderer, kill him and survive!\n  ~ Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n  ~\n  ~ This program is free software: you can redistribute it and/or modify\n  ~ it under the terms of the GNU General Public License as published by\n  ~ the Free Software Foundation, either version 3 of the License, or\n  ~ (at your option) any later version.\n  ~\n  ~ This program is distributed in the hope that it will be useful,\n  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of\n  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n  ~ GNU General Public License for more details.\n  ~\n  ~ You should have received a copy of the GNU General Public License\n  ~ along with this program.  If not, see <http://www.gnu.org/licenses/>.\n  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>plugily.projects</groupId>\n    <artifactId>murdermystery</artifactId>\n    <version>2.1.2-SNAPSHOT0</version>\n    <name>MurderMystery</name>\n\n    <properties>\n        <java.version>1.8</java.version>\n        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n    </properties>\n\n    <licenses>\n        <license>\n            <name>GNU General Public License v3</name>\n            <url>https://www.gnu.org/licenses/gpl-3.0.en.html</url>\n        </license>\n    </licenses>\n\n    <repositories>\n        <repository>\n            <id>plugilyprojects</id>\n            <url>https://maven.plugily.xyz/releases</url>\n        </repository>\n        <repository>\n            <id>plugilyprojects-snapshots</id>\n            <url>https://maven.plugily.xyz/snapshots</url>\n        </repository>\n        <repository>\n            <id>spigot-repo</id>\n            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>\n        </repository>\n        <repository>\n            <id>papermc</id>\n            <url>https://repo.papermc.io/repository/maven-public/</url>\n        </repository>\n    </repositories>\n\n    <dependencies>\n        <dependency>\n            <groupId>io.papermc.paper</groupId>\n            <artifactId>paper-api</artifactId>\n            <version>1.21.4-R0.1-SNAPSHOT</version>\n            <scope>provided</scope>\n        </dependency>\n        <!-- https://mvnrepository.com/artifact/org.jetbrains/annotations -->\n        <dependency>\n            <groupId>org.jetbrains</groupId>\n            <artifactId>annotations</artifactId>\n            <version>23.0.0</version>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>plugily.projects</groupId>\n            <artifactId>MiniGamesBox-Classic</artifactId>\n            <version>1.4.0</version>\n            <scope>compile</scope>\n            <optional>true</optional>\n        </dependency>\n        <dependency>\n            <groupId>org.golde</groupId>\n            <artifactId>corpsereborn</artifactId>\n            <version>2.14.0</version>\n            <scope>system</scope>\n            <systemPath>${project.basedir}/lib/CorpseReborn.jar</systemPath>\n        </dependency>\n    </dependencies>\n\n\n    <build>\n        <resources>\n            <resource>\n                <directory>src/main/resources</directory>\n                <filtering>true</filtering>\n            </resource>\n        </resources>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-compiler-plugin</artifactId>\n                <version>3.14.0</version>\n                <configuration>\n                    <source>${java.version}</source>\n                    <target>${java.version}</target>\n                    <encoding>UTF-8</encoding>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-site-plugin</artifactId>\n                <version>3.21.0</version>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-deploy-plugin</artifactId>\n                <version>3.1.4</version>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-project-info-reports-plugin</artifactId>\n                <version>3.9.0</version>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-javadoc-plugin</artifactId>\n                <version>3.11.2</version>\n                <configuration>\n                    <windowtitle>Murder Mystery API docs for v${project.version}</windowtitle>\n                    <description>Minecraft survival minigame.\n                        Be the murderer, innocent or the detective! Don't be killed during the game to win! API\n                        documentation for hooking Murder Mystery with your plugin.\n                    </description>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-jar-plugin</artifactId>\n                <version>3.4.2</version>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-shade-plugin</artifactId>\n                <version>3.6.0</version>\n                <executions>\n                    <execution>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>\n                        <configuration>\n                            <minimizeJar>true</minimizeJar>\n                            <relocations>\n                                <relocation>\n                                    <pattern>com.zaxxer.hikari</pattern>\n                                    <shadedPattern>plugily.projects.murdermystery.database.hikari</shadedPattern>\n                                </relocation>\n                                <relocation>\n                                    <pattern>plugily.projects.minigamesbox</pattern>\n                                    <shadedPattern>plugily.projects.murdermystery.minigamesbox</shadedPattern>\n                                </relocation>\n                            </relocations>\n                            <createDependencyReducedPom>false</createDependencyReducedPom>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n\n            <!-- External beta versions discord deployer plugin -->\n            <plugin>\n                <groupId>plugily.projects</groupId>\n                <artifactId>betty-maven-plugin</artifactId>\n                <version>1.0.2</version>\n                <configuration>\n                    <changelogFile>${project.basedir}/CHANGELOG.md</changelogFile>\n                </configuration>\n            </plugin>\n            <!-- External beta versions discord deployer plugin -->\n        </plugins>\n        <extensions>\n            <extension>\n                <groupId>org.apache.maven.wagon</groupId>\n                <artifactId>wagon-ssh</artifactId>\n                <version>3.5.3</version>\n            </extension>\n        </extensions>\n    </build>\n    <distributionManagement>\n        <repository>\n            <id>Release</id>\n            <url>https://maven.plugily.xyz/releases</url>\n        </repository>\n        <snapshotRepository>\n            <id>Snapshot</id>\n            <url>https://maven.plugily.xyz/snapshots</url>\n        </snapshotRepository>\n    </distributionManagement>\n</project>"
  },
  {
    "path": ".github/building/settings.gradle.kts",
    "content": "rootProject.name = \"murdermystery\"\n"
  },
  {
    "path": ".github/workflows/deploy-development.yml",
    "content": "name: Bump and Publish Development Branch\n\non:\n  push:\n    branches: [ development ]\n  workflow_dispatch:\njobs:\n  bump:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout Latest Commit\n        uses: actions/checkout@v4.2.2\n      - name: Bump Version\n        id: bump\n        uses: Plugily-Projects/version-bump-action@v10\n        with:\n          github-token: ${{ secrets.github_token }}\n          auto-version-bump: true\n      - name: Print Version\n        run: \"echo 'New Version: ${{steps.bump.outputs.version}}'\"\n  publish:\n    needs: bump\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout Latest Commit\n        uses: actions/checkout@v4.2.2\n        with:\n          ref: 'development'\n      - name: Set up JDK\n        uses: actions/setup-java@v4.6.0\n        with:\n          distribution: 'temurin'\n          java-version: '21'\n          java-package: jdk\n      - name: Set up Maven\n        uses: stCarolas/setup-maven@v5\n        with:\n          maven-version: 3.8.2\n      - name: Cache\n        uses: actions/cache@v4.2.2\n        with:\n          path: ~/.m2/repository\n          key: maven-${{ hashFiles('**/pom.xml') }}\n          restore-keys: maven-\n      - name: Publish with Maven\n        uses: s4u/maven-settings-action@v3.1.0\n        with:\n          servers: |\n            [{\n                \"id\": \"Snapshot\",\n                \"username\": \"${{ secrets.SNAPSHOTSUSERNAME }}\",\n                \"password\": \"${{ secrets.SNAPSHOTSPASSWORD }}\"\n            }]\n      - run: mvn clean verify compile package site:site javadoc:javadoc javadoc:jar deploy -DaltDeploymentRepository=Snapshot::https://maven.plugily.xyz/snapshots -f pom.xml\n"
  },
  {
    "path": ".github/workflows/deploy-master.yml",
    "content": "name: Bump and Publish Master Branch\n\non:\n  pull_request:\n    types:\n      - closed\n  workflow_dispatch:\njobs:\n  bump:\n    if: github.event.pull_request.merged\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout Latest Commit\n        uses: actions/checkout@v4.2.2\n      - name: Bump Version\n        id: bump\n        uses: Plugily-Projects/version-bump-action@v10\n        with:\n          github-token: ${{ secrets.github_token }}\n          auto-version-bump: false\n          auto-version-bump-release: true\n      - name: Print Version\n        run: \"echo 'New Version: ${{steps.bump.outputs.version}}'\"\n  publish:\n    needs: bump\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout Latest Commit\n        uses: actions/checkout@v4.2.2\n        with:\n          ref: 'master'\n      - name: Set up JDK\n        uses: actions/setup-java@v4.6.0\n        with:\n          distribution: 'temurin'\n          java-version: '21'\n          java-package: jdk\n      - name: Set up Maven\n        uses: stCarolas/setup-maven@v5\n        with:\n          maven-version: 3.8.2\n      - name: Cache\n        uses: actions/cache@v4.2.2\n        with:\n          path: ~/.m2/repository\n          key: maven-${{ hashFiles('**/pom.xml') }}\n          restore-keys: maven-\n      - name: Publish with Maven\n        uses: s4u/maven-settings-action@v3.1.0\n        with:\n          servers: |\n            [{\n                \"id\": \"Release\",\n                \"username\": \"${{ secrets.RELEASESUSERNAME }}\",\n                \"password\": \"${{ secrets.RELEASESPASSWORD }}\"\n            }]\n      - run: mvn clean verify compile package site:site javadoc:javadoc javadoc:jar deploy -DaltDeploymentRepository=Release::https://maven.plugily.xyz/releases -f pom.xml\n"
  },
  {
    "path": ".gitignore",
    "content": "/out/\n/generated/\n/minecraft/\n/target/"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-8.10-bin.zip\nnetworkTimeout=10000\nvalidateDistributionUrl=true\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "lib/README.md",
    "content": "_This lib folder contains external libs that are not provided by their author with Maven._\n\n**(The following libraries located in this folder have been released in compliance with the license therein)**\n\nCorpseReborn (License: No License | https://www.spigotmc.org/resources/authors/ericgolde555.23398/ | https://github.com/egold555/CorpseReborn )\n\n\nIf you are the owner of one of these libraries feel free to contact us if you want removal of your lib ( https://discord.plugily.xyz or management@plugily.xyz ) . "
  },
  {
    "path": "pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n  ~ MurderMystery - Find the murderer, kill him and survive!\n  ~ Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n  ~\n  ~ This program is free software: you can redistribute it and/or modify\n  ~ it under the terms of the GNU General Public License as published by\n  ~ the Free Software Foundation, either version 3 of the License, or\n  ~ (at your option) any later version.\n  ~\n  ~ This program is distributed in the hope that it will be useful,\n  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of\n  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n  ~ GNU General Public License for more details.\n  ~\n  ~ You should have received a copy of the GNU General Public License\n  ~ along with this program.  If not, see <http://www.gnu.org/licenses/>.\n  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>plugily.projects</groupId>\n    <artifactId>murdermystery</artifactId>\n    <version>2.1.6</version>\n    <name>MurderMystery</name>\n\n    <properties>\n        <java.version>1.8</java.version>\n        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n    </properties>\n\n    <licenses>\n        <license>\n            <name>GNU General Public License v3</name>\n            <url>https://www.gnu.org/licenses/gpl-3.0.en.html</url>\n        </license>\n    </licenses>\n\n    <repositories>\n        <repository>\n            <id>plugilyprojects</id>\n            <url>https://maven.plugily.xyz/releases</url>\n        </repository>\n        <repository>\n            <id>plugilyprojects-snapshots</id>\n            <url>https://maven.plugily.xyz/snapshots</url>\n        </repository>\n        <repository>\n            <id>spigot-repo</id>\n            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>\n        </repository>\n        <repository>\n            <id>papermc</id>\n            <url>https://repo.papermc.io/repository/maven-public/</url>\n        </repository>\n    </repositories>\n\n    <dependencies>\n        <dependency>\n            <groupId>io.papermc.paper</groupId>\n            <artifactId>paper-api</artifactId>\n            <version>1.21.4-R0.1-SNAPSHOT</version>\n            <scope>provided</scope>\n        </dependency>\n        <!-- https://mvnrepository.com/artifact/org.jetbrains/annotations -->\n        <dependency>\n            <groupId>org.jetbrains</groupId>\n            <artifactId>annotations</artifactId>\n            <version>23.0.0</version>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>plugily.projects</groupId>\n            <artifactId>MiniGamesBox-Classic</artifactId>\n            <version>1.4.5</version>\n            <scope>compile</scope>\n            <optional>true</optional>\n        </dependency>\n        <dependency>\n            <groupId>org.golde</groupId>\n            <artifactId>corpsereborn</artifactId>\n            <version>2.14.0</version>\n            <scope>system</scope>\n            <systemPath>${project.basedir}/lib/CorpseReborn.jar</systemPath>\n        </dependency>\n    </dependencies>\n\n\n    <build>\n        <resources>\n            <resource>\n                <directory>src/main/resources</directory>\n                <filtering>true</filtering>\n            </resource>\n        </resources>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-compiler-plugin</artifactId>\n                <version>3.14.0</version>\n                <configuration>\n                    <source>${java.version}</source>\n                    <target>${java.version}</target>\n                    <encoding>UTF-8</encoding>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-site-plugin</artifactId>\n                <version>3.21.0</version>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-deploy-plugin</artifactId>\n                <version>3.1.4</version>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-project-info-reports-plugin</artifactId>\n                <version>3.9.0</version>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-javadoc-plugin</artifactId>\n                <version>3.11.2</version>\n                <configuration>\n                    <windowtitle>Murder Mystery API docs for v${project.version}</windowtitle>\n                    <description>Minecraft survival minigame.\n                        Be the murderer, innocent or the detective! Don't be killed during the game to win! API\n                        documentation for hooking Murder Mystery with your plugin.\n                    </description>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-jar-plugin</artifactId>\n                <version>3.4.2</version>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-shade-plugin</artifactId>\n                <version>3.6.0</version>\n                <executions>\n                    <execution>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>\n                        <configuration>\n                            <minimizeJar>true</minimizeJar>\n                            <relocations>\n                                <relocation>\n                                    <pattern>com.zaxxer.hikari</pattern>\n                                    <shadedPattern>plugily.projects.murdermystery.database.hikari</shadedPattern>\n                                </relocation>\n                                <relocation>\n                                    <pattern>plugily.projects.minigamesbox</pattern>\n                                    <shadedPattern>plugily.projects.murdermystery.minigamesbox</shadedPattern>\n                                </relocation>\n                            </relocations>\n                            <createDependencyReducedPom>false</createDependencyReducedPom>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n\n            <!-- External beta versions discord deployer plugin -->\n            <plugin>\n                <groupId>plugily.projects</groupId>\n                <artifactId>betty-maven-plugin</artifactId>\n                <version>1.0.2</version>\n                <configuration>\n                    <changelogFile>${project.basedir}/CHANGELOG.md</changelogFile>\n                </configuration>\n            </plugin>\n            <!-- External beta versions discord deployer plugin -->\n        </plugins>\n        <extensions>\n            <extension>\n                <groupId>org.apache.maven.wagon</groupId>\n                <artifactId>wagon-ssh</artifactId>\n                <version>3.5.3</version>\n            </extension>\n        </extensions>\n    </build>\n    <distributionManagement>\n        <repository>\n            <id>Release</id>\n            <url>https://maven.plugily.xyz/releases</url>\n        </repository>\n        <snapshotRepository>\n            <id>Snapshot</id>\n            <url>https://maven.plugily.xyz/snapshots</url>\n        </snapshotRepository>\n    </distributionManagement>\n</project>\n"
  },
  {
    "path": "pom.xml.versionsBackup",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n  ~ MurderMystery - Find the murderer, kill him and survive!\n  ~ Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n  ~\n  ~ This program is free software: you can redistribute it and/or modify\n  ~ it under the terms of the GNU General Public License as published by\n  ~ the Free Software Foundation, either version 3 of the License, or\n  ~ (at your option) any later version.\n  ~\n  ~ This program is distributed in the hope that it will be useful,\n  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of\n  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n  ~ GNU General Public License for more details.\n  ~\n  ~ You should have received a copy of the GNU General Public License\n  ~ along with this program.  If not, see <http://www.gnu.org/licenses/>.\n  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>plugily.projects</groupId>\n    <artifactId>murdermystery</artifactId>\n    <version>2.1.1-SNAPSHOT1</version>\n    <name>MurderMystery</name>\n\n    <properties>\n        <java.version>1.8</java.version>\n        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n    </properties>\n\n    <licenses>\n        <license>\n            <name>GNU General Public License v3</name>\n            <url>https://www.gnu.org/licenses/gpl-3.0.en.html</url>\n        </license>\n    </licenses>\n\n    <repositories>\n        <repository>\n            <id>plugilyprojects</id>\n            <url>https://maven.plugily.xyz/releases</url>\n        </repository>\n        <repository>\n            <id>plugilyprojects-snapshots</id>\n            <url>https://maven.plugily.xyz/snapshots</url>\n        </repository>\n        <repository>\n            <id>jitpack</id>\n            <url>https://jitpack.io</url>\n        </repository>\n        <repository>\n            <id>codemc-repo</id>\n            <url>https://repo.codemc.org/repository/maven-public/</url>\n        </repository>\n        <repository>\n            <id>spigot-repo</id>\n            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>\n        </repository>\n        <repository>\n            <id>papermc</id>\n            <url>https://papermc.io/repo/repository/maven-public/</url>\n        </repository>\n    </repositories>\n\n    <dependencies>\n        <dependency>\n            <groupId>io.papermc.paper</groupId>\n            <artifactId>paper-api</artifactId>\n            <version>1.21.4-R0.1-SNAPSHOT</version>\n            <scope>provided</scope>\n        </dependency>\n        <!-- https://mvnrepository.com/artifact/org.jetbrains/annotations -->\n        <dependency>\n            <groupId>org.jetbrains</groupId>\n            <artifactId>annotations</artifactId>\n            <version>23.0.0</version>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>plugily.projects</groupId>\n            <artifactId>MiniGamesBox-Classic</artifactId>\n            <version>1.3.17-SNAPSHOT12</version>\n            <scope>compile</scope>\n            <optional>true</optional>\n        </dependency>\n        <dependency>\n            <groupId>org.golde</groupId>\n            <artifactId>corpsereborn</artifactId>\n            <version>2.14.0</version>\n            <scope>system</scope>\n            <systemPath>${project.basedir}/lib/CorpseReborn.jar</systemPath>\n        </dependency>\n    </dependencies>\n\n\n    <build>\n        <resources>\n            <resource>\n                <directory>src/main/resources</directory>\n                <filtering>true</filtering>\n            </resource>\n        </resources>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-compiler-plugin</artifactId>\n                <version>3.14.0</version>\n                <configuration>\n                    <source>${java.version}</source>\n                    <target>${java.version}</target>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-site-plugin</artifactId>\n                <version>3.21.0</version>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-deploy-plugin</artifactId>\n                <version>3.1.4</version>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-project-info-reports-plugin</artifactId>\n                <version>3.9.0</version>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-javadoc-plugin</artifactId>\n                <version>3.11.2</version>\n                <configuration>\n                    <windowtitle>Murder Mystery API docs for v${project.version}</windowtitle>\n                    <description>Minecraft survival minigame.\n                        Be the murderer, innocent or the detective! Don't be killed during the game to win! API\n                        documentation for hooking Murder Mystery with your plugin.\n                    </description>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-jar-plugin</artifactId>\n                <version>3.4.2</version>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-shade-plugin</artifactId>\n                <version>3.6.0</version>\n                <executions>\n                    <execution>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>\n                        <configuration>\n                            <minimizeJar>true</minimizeJar>\n                            <relocations>\n                                <relocation>\n                                    <pattern>com.zaxxer.hikari</pattern>\n                                    <shadedPattern>plugily.projects.murdermystery.database.hikari</shadedPattern>\n                                </relocation>\n                                <relocation>\n                                    <pattern>plugily.projects.minigamesbox</pattern>\n                                    <shadedPattern>plugily.projects.murdermystery.minigamesbox</shadedPattern>\n                                </relocation>\n                            </relocations>\n                            <createDependencyReducedPom>false</createDependencyReducedPom>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n\n            <!-- External beta versions discord deployer plugin -->\n            <plugin>\n                <groupId>plugily.projects</groupId>\n                <artifactId>betty-maven-plugin</artifactId>\n                <version>1.0.2</version>\n                <configuration>\n                    <changelogFile>${project.basedir}/CHANGELOG.md</changelogFile>\n                </configuration>\n            </plugin>\n            <!-- External beta versions discord deployer plugin -->\n        </plugins>\n        <extensions>\n            <extension>\n                <groupId>org.apache.maven.wagon</groupId>\n                <artifactId>wagon-ssh</artifactId>\n                <version>3.5.3</version>\n            </extension>\n        </extensions>\n    </build>\n    <distributionManagement>\n        <repository>\n            <id>Release</id>\n            <url>https://maven.plugily.xyz/releases</url>\n        </repository>\n        <snapshotRepository>\n            <id>Snapshot</id>\n            <url>https://maven.plugily.xyz/snapshots</url>\n        </snapshotRepository>\n    </distributionManagement>\n</project>"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/HookManager.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery;\n\nimport org.bukkit.Bukkit;\nimport org.bukkit.plugin.java.JavaPlugin;\nimport plugily.projects.murdermystery.Main;\n\nimport java.util.EnumMap;\nimport java.util.Map;\n\n/**\n * @author Plajer\n * <p>\n * Created at 28.04.2019\n */\npublic class HookManager {\n  //todo implement in minigamescore as bb citiziens could benefit from too\n  private final Map<HookFeature, Boolean> hooks = new EnumMap<>(HookFeature.class);\n  private final Main plugin;\n\n  public HookManager(Main plugin) {\n    this.plugin = plugin;\n    enableHooks();\n  }\n\n  private void enableHooks() {\n    for(HookFeature feature : HookFeature.values()) {\n      boolean hooked = true;\n      for(Hook requiredHook : feature.getRequiredHooks()) {\n        if(!Bukkit.getPluginManager().isPluginEnabled(requiredHook.getPluginName())) {\n          hooks.put(feature, false);\n          plugin.getDebugger().debug(\"[HookManager] Feature {0} won't be enabled because \" + requiredHook.getPluginName() + \" is not installed! Please install it in order to enable this feature in-game!\",\n            feature.name());\n          hooked = false;\n          break;\n        }\n      }\n      if(hooked) {\n        hooks.put(feature, true);\n        plugin.getDebugger().debug(\"[HookManager] Feature {0} enabled!\", feature.name());\n      }\n    }\n  }\n\n  public boolean isFeatureEnabled(HookFeature feature) {\n    return hooks.getOrDefault(feature, false);\n  }\n\n  public enum HookFeature {\n    CORPSES(Hook.CORPSE_REBORN);\n\n    private final Hook[] requiredHooks;\n\n    HookFeature(Hook... requiredHooks) {\n      this.requiredHooks = requiredHooks;\n    }\n\n    public Hook[] getRequiredHooks() {\n      return requiredHooks;\n    }\n  }\n\n  public enum Hook {\n    CORPSE_REBORN(\"CorpseReborn\");\n\n    private final String pluginName;\n\n    Hook(String pluginName) {\n      this.pluginName = pluginName;\n    }\n\n    public String getPluginName() {\n      return pluginName;\n    }\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/Main.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery;\n\nimport org.jetbrains.annotations.TestOnly;\nimport plugily.projects.minigamesbox.classic.PluginMain;\nimport plugily.projects.minigamesbox.classic.handlers.setup.SetupInventory;\nimport plugily.projects.minigamesbox.classic.handlers.setup.categories.PluginSetupCategoryManager;\nimport plugily.projects.minigamesbox.classic.utils.services.metrics.Metrics;\nimport plugily.projects.murdermystery.arena.*;\nimport plugily.projects.murdermystery.arena.special.SpecialBlockEvents;\nimport plugily.projects.murdermystery.arena.special.mysterypotion.MysteryPotionRegistry;\nimport plugily.projects.murdermystery.arena.special.pray.PrayerRegistry;\nimport plugily.projects.murdermystery.boot.AdditionalValueInitializer;\nimport plugily.projects.murdermystery.boot.MessageInitializer;\nimport plugily.projects.murdermystery.boot.PlaceholderInitializer;\nimport plugily.projects.murdermystery.commands.arguments.ArgumentsRegistry;\nimport plugily.projects.murdermystery.events.PluginEvents;\nimport plugily.projects.murdermystery.handlers.CorpseHandler;\nimport plugily.projects.murdermystery.handlers.lastwords.LastWordsManager;\nimport plugily.projects.murdermystery.handlers.setup.SetupCategoryManager;\nimport plugily.projects.murdermystery.handlers.skins.sword.SwordSkinManager;\nimport plugily.projects.murdermystery.handlers.trails.BowTrailsHandler;\nimport plugily.projects.murdermystery.handlers.trails.TrailsManager;\n\n/**\n * Created by Tigerpanzer_02 on 13.03.2022\n */\npublic class Main extends PluginMain {\n  private ArenaRegistry arenaRegistry;\n  private ArenaManager arenaManager;\n  private ArgumentsRegistry argumentsRegistry;\n  private LastWordsManager lastWordsManager;\n  private TrailsManager trailsManager;\n  private SwordSkinManager swordSkinManager;\n  private HookManager hookManager;\n  private CorpseHandler corpseHandler;\n\n  @TestOnly\n  public Main() {\n    super();\n  }\n\n  @Override\n  public void onEnable() {\n    long start = System.currentTimeMillis();\n    MessageInitializer messageInitializer = new MessageInitializer(this);\n    super.onEnable();\n    getDebugger().debug(\"[System] [Plugin] Initialization start\");\n    arenaRegistry = new ArenaRegistry(this);\n    new PlaceholderInitializer(this);\n    messageInitializer.registerMessages();\n    new AdditionalValueInitializer(this);\n    initializePluginClasses();\n\n    if(getConfigPreferences().getOption(\"HIDE_NAMETAGS\")) {\n      getServer().getScheduler().scheduleSyncRepeatingTask(this, () ->\n        getServer().getOnlinePlayers().forEach(ArenaUtils::updateNameTagsVisibility), 60, 140);\n    }\n\n    getDebugger().debug(\"Full {0} plugin enabled\", getName());\n    getDebugger()\n      .debug(\n        \"[System] [Plugin] Initialization finished took {0}ms\",\n        System.currentTimeMillis() - start);\n  }\n\n  public void initializePluginClasses() {\n    addFileName(\"lastwords\");\n    addFileName(\"powerups\");\n    addFileName(\"skins\");\n    addFileName(\"special_blocks\");\n    addFileName(\"trails\");\n    Arena.init(this);\n    ArenaUtils.init(this);\n    new ArenaEvents(this);\n    arenaManager = new ArenaManager(this);\n    arenaRegistry.registerArenas();\n    getSignManager().loadSigns();\n    getSignManager().updateSigns();\n    argumentsRegistry = new ArgumentsRegistry(this);\n\n    lastWordsManager = new LastWordsManager(this);\n    new BowTrailsHandler(this);\n    MysteryPotionRegistry.init(this);\n    PrayerRegistry.init(this);\n    new SpecialBlockEvents(this);\n    trailsManager = new TrailsManager(this);\n    hookManager = new HookManager(this);\n    corpseHandler = new CorpseHandler(this);\n    swordSkinManager = new SwordSkinManager(this);\n    new PluginEvents(this);\n    addPluginMetrics();\n  }\n\n  private void addPluginMetrics() {\n    getMetrics()\n      .addCustomChart(\n        new Metrics.SimplePie(\n          \"hooked_addons\",\n          () -> {\n            if(getServer().getPluginManager().getPlugin(\"MurderMystery-Extension\") != null) {\n              return \"Extension\";\n            }\n            return \"None\";\n          }));\n  }\n\n  @Override\n  public ArenaRegistry getArenaRegistry() {\n    return arenaRegistry;\n  }\n\n  @Override\n  public ArgumentsRegistry getArgumentsRegistry() {\n    return argumentsRegistry;\n  }\n\n  @Override\n  public ArenaManager getArenaManager() {\n    return arenaManager;\n  }\n\n  public LastWordsManager getLastWordsManager() {\n    return lastWordsManager;\n  }\n\n  public TrailsManager getTrailsManager() {\n    return trailsManager;\n  }\n\n  public SwordSkinManager getSwordSkinManager() {\n    return swordSkinManager;\n  }\n\n  public HookManager getHookManager() {\n    return hookManager;\n  }\n\n  public CorpseHandler getCorpseHandler() {\n    return corpseHandler;\n  }\n\n  @Override\n  public PluginSetupCategoryManager getSetupCategoryManager(SetupInventory setupInventory) {\n    return new SetupCategoryManager(setupInventory);\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/api/events/game/MurderGameCorpseSpawnEvent.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.api.events.game;\n\nimport org.bukkit.Location;\nimport org.bukkit.entity.Player;\nimport org.bukkit.event.Cancellable;\nimport org.bukkit.event.HandlerList;\nimport plugily.projects.minigamesbox.api.events.PlugilyEvent;\nimport plugily.projects.murdermystery.arena.Arena;\n\n/**\n * @author Tigerpanzer_02\n * <p>\n * Created at 15.04.2022\n */\npublic class MurderGameCorpseSpawnEvent extends PlugilyEvent implements Cancellable {\n\n  private static final HandlerList HANDLERS = new HandlerList();\n  private boolean isCancelled = false;\n  private final Player player;\n  private final Location location;\n\n  public MurderGameCorpseSpawnEvent(Arena arena, Player player, Location location) {\n    super(arena);\n    this.player = player;\n    this.location = location;\n  }\n\n  public static HandlerList getHandlerList() {\n    return HANDLERS;\n  }\n\n  @Override\n  public HandlerList getHandlers() {\n    return HANDLERS;\n  }\n\n  @Override\n  public boolean isCancelled() {\n    return isCancelled;\n  }\n\n  @Override\n  public void setCancelled(boolean cancelled) {\n    isCancelled = cancelled;\n  }\n\n  public Player getPlayer() {\n    return player;\n  }\n\n  public Location getLocation() {\n    return location;\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/api/events/game/package-info.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\n/**\n * All in-game related events.\n */\n\npackage plugily.projects.murdermystery.api.events.game;"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/api/events/player/package-info.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\n/*\n * Murder Mystery is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 3 of the License, or\n * (at your option) any later version.\n *\n * Murder Mystery is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with Murder Mystery.  If not, see <http://www.gnu.org/licenses/>.\n */\n\n\n/**\n * All in-game player related events.\n */\n\npackage plugily.projects.murdermystery.api.events.player;"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/api/package-info.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\n/**\n * Package with all API events and methods to hook with Murder Mystery.\n */\n\npackage plugily.projects.murdermystery.api;"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/arena/Arena.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.arena;\n\nimport org.bukkit.Bukkit;\nimport org.bukkit.Location;\nimport org.bukkit.entity.Item;\nimport org.bukkit.entity.Player;\nimport org.bukkit.scheduler.BukkitTask;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\nimport plugily.projects.minigamesbox.api.arena.IArenaState;\nimport plugily.projects.minigamesbox.api.user.IUser;\nimport plugily.projects.minigamesbox.classic.arena.PluginArena;\nimport plugily.projects.minigamesbox.classic.arena.managers.PluginMapRestorerManager;\nimport plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;\nimport plugily.projects.minigamesbox.classic.utils.hologram.ArmorStandHologram;\nimport plugily.projects.minigamesbox.classic.utils.version.VersionUtils;\nimport plugily.projects.murdermystery.HookManager;\nimport plugily.projects.murdermystery.Main;\nimport plugily.projects.murdermystery.arena.corpse.Corpse;\nimport plugily.projects.murdermystery.arena.corpse.Stand;\nimport plugily.projects.murdermystery.arena.managers.MapRestorerManager;\nimport plugily.projects.murdermystery.arena.managers.ScoreboardManager;\nimport plugily.projects.murdermystery.arena.role.Role;\nimport plugily.projects.murdermystery.arena.special.SpecialBlock;\nimport plugily.projects.murdermystery.arena.states.InGameState;\nimport plugily.projects.murdermystery.arena.states.RestartingState;\nimport plugily.projects.murdermystery.arena.states.StartingState;\nimport plugily.projects.murdermystery.arena.states.WaitingState;\n\nimport java.util.*;\n\n/**\n * @author Tigerpanzer_02\n * <p>\n * Created at 17.12.2021\n */\npublic class Arena extends PluginArena {\n\n  private static Main plugin;\n\n  private final List<Player> spectators = new ArrayList<>();\n  private final List<Player> deaths = new ArrayList<>();\n  private final List<Player> detectives = new ArrayList<>();\n  private final List<Player> murderers = new ArrayList<>();\n  private final List<Item> goldSpawned = new ArrayList<>();\n  private final List<Corpse> corpses = new ArrayList<>();\n  private final List<Stand> stands = new ArrayList<>();\n  private final List<SpecialBlock> specialBlocks = new ArrayList<>();\n  private List<Location> goldSpawnPoints = new ArrayList<>();\n  private List<Location> playerSpawnPoints = new ArrayList<>();\n  private int spawnGoldTimer = 0;\n  private int spawnGoldTime = 0;\n  private boolean detectiveDead;\n  private boolean murdererLocatorReceived;\n  private boolean hideChances;\n  private boolean goldVisuals = false;\n  private final Map<CharacterType, Player> gameCharacters = new EnumMap<>(CharacterType.class);\n  private final MapRestorerManager mapRestorerManager;\n  private ArmorStandHologram bowHologram;\n\n  public Arena(String id) {\n    super(id);\n    setPluginValues();\n    setScoreboardManager(new ScoreboardManager(this));\n    mapRestorerManager = new MapRestorerManager(this);\n    setMapRestorerManager(mapRestorerManager);\n    addGameStateHandler(IArenaState.IN_GAME, new InGameState());\n    addGameStateHandler(IArenaState.RESTARTING, new RestartingState());\n    addGameStateHandler(IArenaState.STARTING, new StartingState());\n    addGameStateHandler(IArenaState.WAITING_FOR_PLAYERS, new WaitingState());\n  }\n\n  public static void init(Main plugin) {\n    Arena.plugin = plugin;\n  }\n\n  @Override\n  public Main getPlugin() {\n    return plugin;\n  }\n\n\n  @Override\n  public PluginMapRestorerManager getMapRestorerManager() {\n    return mapRestorerManager;\n  }\n\n\n  private void setPluginValues() {\n  }\n\n  public void addCorpse(Corpse corpse) {\n    if(plugin.getHookManager().isFeatureEnabled(HookManager.HookFeature.CORPSES)) {\n      corpses.add(corpse);\n    }\n  }\n\n  public List<Corpse> getCorpses() {\n    return corpses;\n  }\n\n  public List<Stand> getStands() {\n    return stands;\n  }\n\n  public void addHead(Stand stand) {\n    stands.add(stand);\n  }\n\n  public void setSpawnGoldTime(int spawnGoldTime) {\n    this.spawnGoldTime = spawnGoldTime;\n  }\n\n  public void setHideChances(boolean hideChances) {\n    this.hideChances = hideChances;\n  }\n\n  public boolean isDetectiveDead() {\n    return detectiveDead;\n  }\n\n  public void setDetectiveDead(boolean detectiveDead) {\n    this.detectiveDead = detectiveDead;\n  }\n\n  public boolean isMurdererLocatorReceived() {\n    return murdererLocatorReceived;\n  }\n\n  public void setMurdererLocatorReceived(boolean murdererLocatorReceived) {\n    this.murdererLocatorReceived = murdererLocatorReceived;\n  }\n\n  public Map<CharacterType, Player> getGameCharacters() {\n    return gameCharacters;\n  }\n\n  public boolean isHideChances() {\n    return hideChances;\n  }\n\n  @NotNull\n  public List<Item> getGoldSpawned() {\n    return goldSpawned;\n  }\n\n  @NotNull\n  public List<Location> getGoldSpawnPoints() {\n    return goldSpawnPoints;\n  }\n\n  public void setGoldSpawnPoints(@NotNull List<Location> goldSpawnPoints) {\n    this.goldSpawnPoints = goldSpawnPoints;\n  }\n\n  private BukkitTask visualTask;\n\n  public void startGoldVisuals() {\n    if(visualTask != null) {\n      return;\n    }\n    visualTask = Bukkit.getScheduler().runTaskTimer(plugin, () -> {\n      if(!goldVisuals || !plugin.isEnabled() || goldSpawnPoints.isEmpty() || getArenaState() != IArenaState.WAITING_FOR_PLAYERS) {\n        //we need to cancel it that way as the arena class is an task\n        visualTask.cancel();\n        return;\n      }\n      for(Location goldLocations : goldSpawnPoints) {\n        Location goldLocation = goldLocations.clone();\n        goldLocation.add(0, 0.4, 0);\n        Bukkit.getOnlinePlayers().forEach(player -> VersionUtils.sendParticles(\"REDSTONE\", player, goldLocation, 10));\n      }\n    }, 20L, 20L);\n  }\n\n  public boolean isGoldVisuals() {\n    return goldVisuals;\n  }\n\n  public void setGoldVisuals(boolean goldVisuals) {\n    this.goldVisuals = goldVisuals;\n    if(goldVisuals) {\n      startGoldVisuals();\n    }\n  }\n\n  public void loadSpecialBlock(SpecialBlock block) {\n    if(!specialBlocks.contains(block)) {\n      specialBlocks.add(block);\n    }\n\n    switch(block.getSpecialBlockType()) {\n      case MYSTERY_CAULDRON:\n        block.setArmorStandHologram(new ArmorStandHologram(plugin.getBukkitHelper().getBlockCenter(block.getLocation()), new MessageBuilder(plugin.getLanguageManager().getLanguageMessage(\"In-Game.Messages.Arena.Playing.Special-Blocks.Cauldron.Hologram\")).build()));\n        break;\n      case PRAISE_DEVELOPER:\n        ArmorStandHologram prayer = new ArmorStandHologram(plugin.getBukkitHelper().getBlockCenter(block.getLocation()));\n        for(String str : plugin.getLanguageManager().getLanguageMessage(\"In-Game.Messages.Arena.Playing.Special-Blocks.Pray.Hologram\").split(\";\")) {\n          prayer.appendLine(new MessageBuilder(str).build());\n        }\n        block.setArmorStandHologram(prayer);\n        break;\n      case HORSE_PURCHASE:\n      case RAPID_TELEPORTATION:\n        //not yet implemented\n      default:\n        break;\n    }\n  }\n\n  public List<SpecialBlock> getSpecialBlocks() {\n    return specialBlocks;\n  }\n\n  public int getTotalRoleChances(Role role) {\n    int totalRoleChances = 0;\n\n    for(Player p : getPlayersLeft()) {\n      IUser user = getPlugin().getUserManager().getUser(p);\n      totalRoleChances += getContributorValue(role, user);\n    }\n    //avoid division / 0\n    return totalRoleChances == 0 ? 1 : totalRoleChances;\n  }\n\n  public boolean isCharacterSet(Arena.CharacterType type) {\n    return gameCharacters.containsKey(type);\n  }\n\n  public void setCharacter(Arena.CharacterType type, Player player) {\n    gameCharacters.put(type, player);\n  }\n\n  public void setCharacter(Role role, Player player) {\n    gameCharacters.put(role == Role.MURDERER ? CharacterType.MURDERER : CharacterType.DETECTIVE, player);\n  }\n\n  @Nullable\n  public Player getCharacter(Arena.CharacterType type) {\n    return gameCharacters.get(type);\n  }\n\n  public void addToDetectiveList(Player player) {\n    detectives.add(player);\n  }\n\n  public boolean lastAliveDetective() {\n    return aliveDetective() <= 1;\n  }\n\n  public int aliveDetective() {\n    int alive = 0;\n    for(Player player : getPlayersLeft()) {\n      if(Role.isRole(Role.ANY_DETECTIVE, plugin.getUserManager().getUser(player), this) && isDetectiveAlive(player)) {\n        alive++;\n      }\n    }\n    return alive;\n  }\n\n  public boolean isDetectiveAlive(Player player) {\n    for(Player p : getPlayersLeft()) {\n      if(p == player && detectives.contains(p)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  public List<Player> getDetectiveList() {\n    return detectives;\n  }\n\n  public void addToMurdererList(Player player) {\n    murderers.add(player);\n  }\n\n  public void removeFromMurdererList(Player player) {\n    murderers.remove(player);\n  }\n\n\n  public boolean lastAliveMurderer() {\n    return aliveMurderer() == 1;\n  }\n\n  public int aliveMurderer() {\n    int alive = 0;\n    for(Player player : getPlayersLeft()) {\n      if(Role.isRole(Role.MURDERER, plugin.getUserManager().getUser(player), this) && isMurderAlive(player)) {\n        alive++;\n      }\n    }\n    return alive;\n  }\n\n  public boolean isMurderAlive(Player player) {\n    for(Player p : getPlayersLeft()) {\n      if(p == player && murderers.contains(p)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  public List<Player> getMurdererList() {\n    return murderers;\n  }\n\n  public void setBowHologram(ArmorStandHologram bowHologram) {\n    if(bowHologram == null) {\n      this.bowHologram = null;\n      return;\n    }\n\n    this.bowHologram = bowHologram;\n  }\n\n  public ArmorStandHologram getBowHologram() {\n    return bowHologram;\n  }\n\n  public void addDeathPlayer(Player player) {\n    deaths.add(player);\n  }\n\n  public void removeDeathPlayer(Player player) {\n    deaths.remove(player);\n  }\n\n  public boolean isDeathPlayer(Player player) {\n    return deaths.contains(player);\n  }\n\n  public List<Player> getDeaths() {\n    return deaths;\n  }\n\n  public void addSpectatorPlayer(Player player) {\n    spectators.add(player);\n  }\n\n  public void removeSpectatorPlayer(Player player) {\n    spectators.remove(player);\n  }\n\n  public boolean isSpectatorPlayer(Player player) {\n    return spectators.contains(player);\n  }\n\n  public List<Location> getPlayerSpawnPoints() {\n    return playerSpawnPoints;\n  }\n\n  public int getSpawnGoldTime() {\n    return spawnGoldTime;\n  }\n\n  public int getSpawnGoldTimer() {\n    return spawnGoldTimer;\n  }\n\n  public void setSpawnGoldTimer(int spawnGoldTimer) {\n    this.spawnGoldTimer = spawnGoldTimer;\n  }\n\n\n  public void setPlayerSpawnPoints(@NotNull List<Location> playerSpawnPoints) {\n    this.playerSpawnPoints = playerSpawnPoints;\n  }\n\n  public void adjustContributorValue(Role role, IUser user, int number) {\n    user.adjustStatistic(\"CONTRIBUTION_\" + role.name(), number);\n  }\n\n  private final Map<IUser, Integer> murdererContributions = new HashMap<>();\n  private final Map<IUser, Integer> detectiveContributions = new HashMap<>();\n\n  public Map<IUser, Integer> getMurdererContributions() {\n    return murdererContributions;\n  }\n\n  public Map<IUser, Integer> getDetectiveContributions() {\n    return detectiveContributions;\n  }\n\n  public int getContributorValue(Role role, IUser user) {\n    if(role == Role.MURDERER && murdererContributions.containsKey(user)) {\n      return murdererContributions.get(user);\n    } else if(detectiveContributions.containsKey(user)) {\n      return detectiveContributions.get(user);\n    }\n    Player player = user.getPlayer();\n    int contributor = user.getStatistic(\"CONTRIBUTION_\" + role.name());\n    int increase = plugin.getPermissionsManager().getPermissionCategoryValue(role.name() + \"_BOOSTER\", player);\n    int multiplicator = plugin.getPermissionsManager().getPermissionCategoryValue(\"CHANCES_BOOSTER\", player);\n    int calculatedContributor = (contributor + increase) * (multiplicator == 0 ? 1 :multiplicator);\n    if(role == Role.MURDERER) {\n      murdererContributions.put(user, calculatedContributor);\n    } else {\n      detectiveContributions.put(user, calculatedContributor);\n    }\n    return calculatedContributor;\n  }\n\n  public void resetContributorValue(Role role, IUser user) {\n    user.setStatistic(\"CONTRIBUTION_\" + role.name(), 1);\n  }\n\n  public enum CharacterType {\n    MURDERER, DETECTIVE, FAKE_DETECTIVE, HERO\n  }\n}"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/arena/ArenaEvents.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.arena;\n\nimport org.bukkit.Bukkit;\nimport org.bukkit.GameMode;\nimport org.bukkit.Material;\nimport org.bukkit.entity.Arrow;\nimport org.bukkit.entity.EntityType;\nimport org.bukkit.entity.Player;\nimport org.bukkit.event.Event;\nimport org.bukkit.event.EventHandler;\nimport org.bukkit.event.EventPriority;\nimport org.bukkit.event.entity.EntityDamageByEntityEvent;\nimport org.bukkit.event.entity.EntityShootBowEvent;\nimport org.bukkit.event.entity.PlayerDeathEvent;\nimport org.bukkit.event.inventory.InventoryClickEvent;\nimport org.bukkit.event.inventory.InventoryType;\nimport org.bukkit.event.player.PlayerDropItemEvent;\nimport org.bukkit.event.player.PlayerMoveEvent;\nimport org.bukkit.event.player.PlayerRespawnEvent;\nimport org.bukkit.inventory.InventoryView;\nimport org.bukkit.inventory.ItemStack;\nimport org.bukkit.inventory.meta.ItemMeta;\nimport org.bukkit.potion.PotionEffectType;\nimport plugily.projects.minigamesbox.api.arena.IArenaState;\nimport plugily.projects.minigamesbox.api.arena.IPluginArena;\nimport plugily.projects.minigamesbox.api.user.IUser;\nimport plugily.projects.minigamesbox.classic.arena.PluginArenaEvents;\nimport plugily.projects.minigamesbox.classic.handlers.items.SpecialItem;\nimport plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;\nimport plugily.projects.minigamesbox.classic.handlers.language.TitleBuilder;\nimport plugily.projects.minigamesbox.classic.utils.misc.complement.ComplementAccessor;\nimport plugily.projects.minigamesbox.classic.utils.version.ServerVersion;\nimport plugily.projects.minigamesbox.classic.utils.version.VersionUtils;\nimport plugily.projects.minigamesbox.classic.utils.version.events.api.PlugilyEntityPickupItemEvent;\nimport plugily.projects.minigamesbox.classic.utils.version.events.api.PlugilyPlayerPickupArrow;\nimport plugily.projects.minigamesbox.classic.utils.version.xseries.XPotion;\nimport plugily.projects.minigamesbox.classic.utils.version.xseries.XSound;\nimport plugily.projects.minigamesbox.classic.utils.version.xseries.inventory.XInventoryView;\nimport plugily.projects.murdermystery.Main;\nimport plugily.projects.murdermystery.arena.managers.MapRestorerManager;\nimport plugily.projects.murdermystery.arena.role.Role;\nimport plugily.projects.murdermystery.arena.special.pray.PrayerRegistry;\nimport plugily.projects.murdermystery.utils.ItemPosition;\n\n/**\n * @author Plajer\n * <p>Created at 13.03.2018\n */\npublic class ArenaEvents extends PluginArenaEvents {\n\n  private final Main plugin;\n\n  public ArenaEvents(Main plugin) {\n    super(plugin);\n    this.plugin = plugin;\n    plugin.getServer().getPluginManager().registerEvents(this, plugin);\n  }\n\n  @Override\n  public void handleIngameVoidDeath(Player victim, IPluginArena arena) {\n    Arena pluginArena = plugin.getArenaRegistry().getArena(arena.getId());\n    if(pluginArena == null) {\n      return;\n    }\n    victim.damage(1000.0);\n    if(arena.getArenaState() == IArenaState.IN_GAME) {\n      VersionUtils.teleport(victim, pluginArena.getPlayerSpawnPoints().get(0));\n    }\n  }\n\n  @EventHandler\n  public void onBowShot(EntityShootBowEvent event) {\n    if(event.getEntityType() != EntityType.PLAYER) {\n      return;\n    }\n    Player player = (Player) event.getEntity();\n    IUser user = plugin.getUserManager().getUser(player);\n    if(!Role.isRole(Role.ANY_DETECTIVE, user)) {\n      return;\n    }\n    if(user.getCooldown(\"bow_shot\") > 0) {\n      event.setCancelled(true);\n      return;\n    }\n    int bowCooldown = plugin.getConfig().getInt(\"Bow.Cooldown\", 5);\n    if(bowCooldown <= 0) {\n      return;\n    }\n    user.setCooldown(\"bow_shot\", bowCooldown);\n    plugin.getBukkitHelper().applyActionBarCooldown(player, bowCooldown);\n    VersionUtils.setMaterialCooldown(player, event.getBow().getType(), 20 * (plugin.getConfig().getInt(\"Bow.Cooldown\", 5)));\n  }\n\n  @EventHandler\n  public void onArrowPickup(PlugilyPlayerPickupArrow e) {\n    if(plugin.getArenaRegistry().isInArena(e.getPlayer())) {\n      e.getItem().remove();\n      e.setCancelled(true);\n    }\n  }\n\n  @EventHandler\n  public void onItemPickup(PlugilyEntityPickupItemEvent e) {\n    if(!(e.getEntity() instanceof Player)) {\n      return;\n    }\n    Player player = (Player) e.getEntity();\n    Arena arena = plugin.getArenaRegistry().getArena(player);\n    if(arena == null) {\n      return;\n    }\n    IUser user = plugin.getUserManager().getUser(player);\n    e.setCancelled(true);\n    if(arena.getBowHologram() != null\n      && e.getItem().equals(arena.getBowHologram().getEntityItem())) {\n      if(!user.isSpectator() && Role.isRole(Role.INNOCENT, user, arena)) {\n        XSound.BLOCK_LAVA_POP.play(player.getLocation(), 1F, 2F);\n\n        ((MapRestorerManager) arena.getMapRestorerManager()).removeBowHolo();\n        e.getItem().remove();\n\n        for(Player loopPlayer : arena.getPlayersLeft()) {\n          IUser loopUser = plugin.getUserManager().getUser(loopPlayer);\n          if(Role.isRole(Role.INNOCENT, loopUser)) {\n            ItemPosition.setItem(loopUser, ItemPosition.BOW_LOCATOR, new ItemStack(Material.AIR, 1));\n          }\n        }\n\n        arena.setCharacter(Arena.CharacterType.FAKE_DETECTIVE, player);\n        ItemPosition.setItem(user, ItemPosition.BOW, new ItemStack(Material.BOW, 1));\n        ItemPosition.setItem(user, ItemPosition.INFINITE_ARROWS, new ItemStack(Material.ARROW, plugin.getConfig().getInt(\"Bow.Amount.Arrows.Fake\", 3)));\n        new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_BOW_PICKUP\").asKey().player(player).arena(arena).sendArena();\n      }\n\n      return;\n    }\n\n    if(e.getItem().getItemStack().getType() != Material.GOLD_INGOT) {\n      return;\n    }\n\n    if(user.isSpectator() || arena.getArenaState() != IArenaState.IN_GAME) {\n      return;\n    }\n\n    if(PrayerRegistry.getBan().contains(player)) {\n      e.setCancelled(true);\n      return;\n    }\n\n    e.getItem().remove();\n\n    XSound.BLOCK_LAVA_POP.play(player.getLocation(), 1, 1);\n    arena.getGoldSpawned().remove(e.getItem());\n\n    ItemStack stack = new ItemStack(Material.GOLD_INGOT, e.getItem().getItemStack().getAmount());\n    if(PrayerRegistry.getRush().contains(player)) {\n      stack.setAmount(3 * e.getItem().getItemStack().getAmount());\n    }\n\n    ItemPosition.addItem(user, ItemPosition.GOLD_INGOTS, stack);\n    user.adjustStatistic(\"LOCAL_GOLD\", stack.getAmount());\n    ArenaUtils.addScore(user, ArenaUtils.ScoreAction.GOLD_PICKUP, stack.getAmount());\n\n    new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_GOLD\").asKey().player(player).arena(arena).sendPlayer();\n    plugin.getRewardsHandler().performReward(player, plugin.getRewardsHandler().getRewardType(\"GOLD_PICKUP\"));\n\n    if(Role.isRole(Role.ANY_DETECTIVE, user, arena)) {\n      ItemPosition.addItem(user, ItemPosition.ARROWS, new ItemStack(Material.ARROW, e.getItem().getItemStack().getAmount() * plugin.getConfig().getInt(\"Bow.Amount.Arrows.Detective\", 3)));\n      return;\n    }\n\n    if(user.getStatistic(\"LOCAL_GOLD\") >= plugin.getConfig().getInt(\"Gold.Amount.Bow\", 10)) {\n      user.setStatistic(\"LOCAL_GOLD\", 0);\n      new TitleBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_BOW_SHOT_TITLE\")\n        .asKey()\n        .player(player)\n        .arena(arena)\n        .sendPlayer();\n      ItemPosition.setItem(user, ItemPosition.BOW, new ItemStack(Material.BOW, 1));\n      ItemPosition.addItem(\n        user,\n        ItemPosition.ARROWS,\n        new ItemStack(Material.ARROW, plugin.getConfig().getInt(\"Bow.Amount.Arrows.Gold\", 3)));\n      player\n        .getInventory()\n        .setItem(\n          /* same for all roles */ ItemPosition.GOLD_INGOTS.getOtherRolesItemPosition(),\n          null);\n    }\n  }\n\n\n  @EventHandler\n  public void onMurdererDamage(EntityDamageByEntityEvent e) {\n    if(!(e.getDamager() instanceof Player) || e.getEntityType() != EntityType.PLAYER) {\n      return;\n    }\n    Player attacker = (Player) e.getDamager();\n    IUser userAttacker = plugin.getUserManager().getUser(attacker);\n    Player victim = (Player) e.getEntity();\n    IUser userVictim = plugin.getUserManager().getUser(victim);\n    if(!ArenaUtils.areInSameArena(attacker, victim)) {\n      return;\n    }\n    //we are killing player via damage() method so event can be cancelled safely, will work for detective damage murderer and others\n    e.setCancelled(true);\n\n    //better check this for future even if anyone else cannot use sword\n    if(!Role.isRole(Role.MURDERER, userAttacker)) {\n      return;\n    }\n\n    //check if victim is murderer\n    if(Role.isRole(Role.MURDERER, userVictim)) {\n      return;\n    }\n    if(VersionUtils.getItemInHand(attacker) == null || plugin.getSwordSkinManager().getMurdererSword(attacker) == null) {\n      return;\n    }\n    //just don't kill user if item isn't murderer sword\n    if(VersionUtils.getItemInHand(attacker).getType() != plugin.getSwordSkinManager().getMurdererSword(attacker).getType()) {\n      return;\n    }\n\n    //check if sword has cooldown\n    if(ServerVersion.Version.isCurrentLower(ServerVersion.Version.v1_11)) {\n      if(plugin.getUserManager().getUser(attacker).getCooldown(\"sword_attack\") > 0) {\n        return;\n      }\n    } else if(attacker.hasCooldown(plugin.getSwordSkinManager().getMurdererSword(attacker).getType())) {\n      return;\n    }\n\n    if(Role.isRole(Role.MURDERER, userVictim)) {\n      plugin.getRewardsHandler().performReward(attacker, plugin.getRewardsHandler().getRewardType(\"KILL_MURDERER\"));\n    } else if(Role.isRole(Role.ANY_DETECTIVE, userVictim)) {\n      plugin.getRewardsHandler().performReward(attacker, plugin.getRewardsHandler().getRewardType(\"KILL_DETECTIVE\"));\n    }\n\n    XSound.ENTITY_PLAYER_DEATH.play(victim.getLocation());\n    victim.damage(100.0);\n\n    IUser user = plugin.getUserManager().getUser(attacker);\n\n    user.adjustStatistic(\"KILLS\", 1);\n    user.adjustStatistic(\"LOCAL_KILLS\", 1);\n    ArenaUtils.addScore(user, ArenaUtils.ScoreAction.KILL_PLAYER, 0);\n\n    Arena arena = plugin.getArenaRegistry().getArena(attacker);\n    if(Role.isRole(Role.ANY_DETECTIVE, userVictim) && arena.lastAliveDetective()) {\n      //if already true, no effect is done :)\n      arena.setDetectiveDead(true);\n      if(Role.isRole(Role.FAKE_DETECTIVE, userVictim)) {\n        arena.setCharacter(Arena.CharacterType.FAKE_DETECTIVE, null);\n      }\n      ArenaUtils.dropBowAndAnnounce(arena, victim);\n    }\n  }\n\n\n  @EventHandler\n  public void onArrowDamage(EntityDamageByEntityEvent e) {\n    if(!(e.getDamager() instanceof Arrow)) {\n      return;\n    }\n    if(!(((Arrow) e.getDamager()).getShooter() instanceof Player)) {\n      return;\n    }\n    Player attacker = (Player) ((Arrow) e.getDamager()).getShooter();\n    IUser userAttacker = plugin.getUserManager().getUser(attacker);\n    if(plugin.getArenaRegistry().isInArena(attacker)) {\n      e.setCancelled(true);\n      e.getDamager().remove();\n    }\n    if(e.getEntityType() != EntityType.PLAYER) {\n      return;\n    }\n    Player victim = (Player) e.getEntity();\n    IUser userVictim = plugin.getUserManager().getUser(victim);\n    if(!ArenaUtils.areInSameArena(attacker, victim)) {\n      return;\n    }\n    //we won't allow to suicide\n    if(attacker.equals(victim)) {\n      e.setCancelled(true);\n      return;\n    }\n    //dont kill murderer on bow damage if attacker is murderer\n    if(Role.isRole(Role.MURDERER, userAttacker) && Role.isRole(Role.MURDERER, userVictim)) {\n      e.setCancelled(true);\n      return;\n    }\n    Arena arena = plugin.getArenaRegistry().getArena(attacker);\n    if (arena == null) {\n      return;\n    }\n    //we need to set it before the victim die, because of hero character\n    if(Role.isRole(Role.MURDERER, userVictim)) {\n      arena.setCharacter(Arena.CharacterType.HERO, attacker);\n    }\n    XSound.ENTITY_PLAYER_DEATH.play(victim.getLocation());\n    victim.damage(100.0);\n\n\n    userAttacker.adjustStatistic(\"KILLS\", 1);\n    if(Role.isRole(Role.MURDERER, userAttacker)) {\n      userAttacker.adjustStatistic(\"LOCAL_KILLS\", 1);\n      arena.adjustContributorValue(Role.DETECTIVE, userAttacker, plugin.getRandom().nextInt(2));\n      ArenaUtils.addScore(userAttacker, ArenaUtils.ScoreAction.KILL_PLAYER, 0);\n    }\n\n    VersionUtils.sendTitles(victim, new MessageBuilder(\"IN_GAME_DEATH_SCREEN\").asKey().build(), null, 5, 40, 50);\n\n    if(Role.isRole(Role.MURDERER, userVictim)) {\n      ArenaUtils.addScore(userAttacker, ArenaUtils.ScoreAction.KILL_MURDERER, 0);\n      arena.adjustContributorValue(Role.MURDERER, userAttacker, plugin.getRandom().nextInt(2));\n    } else if(plugin.getConfigPreferences().getOption(\"BOW_KILL_DETECTIVE\") && (Role.isRole(Role.ANY_DETECTIVE, userVictim) || Role.isRole(Role.INNOCENT, userVictim))) {\n      if(Role.isRole(Role.MURDERER, userAttacker)) {\n        VersionUtils.sendTitles(victim, null, new MessageBuilder(\"IN_GAME_MESSAGES_GAME_END_PLACEHOLDERS_MURDERER_KILLED_YOU\").asKey().build(), 5, 40, 5);\n      } else {\n        VersionUtils.sendTitles(victim, null, new MessageBuilder(\"IN_GAME_MESSAGES_GAME_END_PLACEHOLDERS_INNOCENT_KILLED_YOU\").asKey().build(), 5, 40, 5);\n      }\n\n      //if else, murderer killed, so don't kill him :)\n      if(Role.isRole(Role.ANY_DETECTIVE, userAttacker) || Role.isRole(Role.INNOCENT, userAttacker)) {\n        VersionUtils.sendSubTitle(attacker, new MessageBuilder(\"IN_GAME_MESSAGES_GAME_END_PLACEHOLDERS_INNOCENT_KILLED_WRONGLY\").asKey().build(), 5, 40, 5);\n\n        attacker.damage(100.0);\n        ArenaUtils.addScore(userAttacker, ArenaUtils.ScoreAction.INNOCENT_KILL, 0);\n        plugin.getRewardsHandler().performReward(attacker, plugin.getRewardsHandler().getRewardType(\"KILL_DETECTIVE\"));\n        if(Role.isRole(Role.ANY_DETECTIVE, userAttacker) && arena.lastAliveDetective()) {\n          arena.setDetectiveDead(true);\n          if(Role.isRole(Role.FAKE_DETECTIVE, userAttacker)) {\n            arena.setCharacter(Arena.CharacterType.FAKE_DETECTIVE, null);\n          }\n          ArenaUtils.dropBowAndAnnounce(arena, victim);\n        }\n      }\n    }\n  }\n\n  @EventHandler(priority = EventPriority.HIGH)\n  public void onPlayerDie(PlayerDeathEvent e) {\n    Player player = e.getEntity();\n    Arena arena = plugin.getArenaRegistry().getArena(player);\n    if(arena == null) {\n      return;\n    }\n    IUser user = plugin.getUserManager().getUser(player);\n    ComplementAccessor.getComplement().setDeathMessage(e, \"\");\n    e.getDrops().clear();\n    e.setDroppedExp(0);\n    plugin.getCorpseHandler().spawnCorpse(player, arena);\n    XPotion.BLINDNESS.buildPotionEffect(3 * 20, 1).apply(player);\n    if(arena.getArenaState() == IArenaState.STARTING) {\n      return;\n    } else if(arena.getArenaState() == IArenaState.ENDING || arena.getArenaState() == IArenaState.RESTARTING) {\n      player.getInventory().clear();\n      player.setFlying(false);\n      player.setAllowFlight(false);\n      user.setStatistic(\"LOCAL_GOLD\", 0);\n      return;\n    }\n    if(Role.isRole(Role.MURDERER, user, arena) && arena.lastAliveMurderer()) {\n      ArenaUtils.onMurdererDeath(arena);\n    }\n    if(Role.isRole(Role.ANY_DETECTIVE, user) && arena.lastAliveDetective()) {\n      arena.setDetectiveDead(true);\n      if(Role.isRole(Role.FAKE_DETECTIVE, user)) {\n        arena.setCharacter(Arena.CharacterType.FAKE_DETECTIVE, null);\n      }\n      ArenaUtils.dropBowAndAnnounce(arena, player);\n    }\n    user.adjustStatistic(\"DEATHS\", 1);\n    user.setSpectator(true);\n    VersionUtils.setCollidable(player, false);\n    player.setGameMode(GameMode.SURVIVAL);\n    user.setStatistic(\"LOCAL_GOLD\", 0);\n    ArenaUtils.hidePlayer(player, arena);\n    player.setAllowFlight(true);\n    player.setFlying(true);\n    player.getInventory().clear();\n    if(plugin.getConfigPreferences().getOption(\"HIDE_DEATH\")) {\n      new MessageBuilder(MessageBuilder.ActionType.DEATH).player(player).arena(arena).sendArena();\n    }\n\n    if(arena.getArenaState() != IArenaState.ENDING && arena.getArenaState() != IArenaState.RESTARTING) {\n      arena.addDeathPlayer(player);\n    }\n    //we must call it ticks later due to instant respawn bug\n    Bukkit.getScheduler().runTaskLater(plugin, () -> {\n      player.spigot().respawn();\n      plugin.getSpecialItemManager().addSpecialItemsOfStage(player, SpecialItem.DisplayStage.SPECTATOR);\n    }, 5);\n  }\n\n  @EventHandler(priority = EventPriority.HIGHEST)\n  public void onRespawn(PlayerRespawnEvent event) {\n    Player player = event.getPlayer();\n    Arena arena = plugin.getArenaRegistry().getArena(player);\n    if(arena == null) {\n      return;\n    }\n    if(arena.getArenaState() == IArenaState.STARTING || arena.getArenaState() == IArenaState.WAITING_FOR_PLAYERS) {\n      event.setRespawnLocation(arena.getLobbyLocation());\n      return;\n    }\n    if(arena.getArenaState() == IArenaState.RESTARTING) {\n      event.setRespawnLocation(arena.getEndLocation());\n      return;\n    }\n    if(arena.getPlayers().contains(player)) {\n      IUser user = plugin.getUserManager().getUser(player);\n      org.bukkit.Location firstSpawn = arena.getPlayerSpawnPoints().get(0);\n\n      if(player.getLocation().getWorld().equals(firstSpawn.getWorld())) {\n        event.setRespawnLocation(player.getLocation());\n      } else {\n        event.setRespawnLocation(firstSpawn);\n      }\n      player.setAllowFlight(true);\n      player.setFlying(true);\n      user.setSpectator(true);\n      ArenaUtils.hidePlayer(player, arena);\n      VersionUtils.setCollidable(player, false);\n      player.setGameMode(GameMode.SURVIVAL);\n      player.removePotionEffect(PotionEffectType.NIGHT_VISION);\n      user.setStatistic(\"LOCAL_GOLD\", 0);\n      plugin.getRewardsHandler().performReward(player, plugin.getRewardsHandler().getRewardType(\"PLAYER_DEATH\"));\n    }\n  }\n\n\n  @EventHandler\n  public void locatorDistanceUpdate(PlayerMoveEvent event) {\n    Player player = event.getPlayer();\n    Arena arena = plugin.getArenaRegistry().getArena(player);\n    if(arena == null) {\n      return;\n    }\n    IUser user = plugin.getUserManager().getUser(player);\n    //skip spectators\n    if(user.isSpectator()) {\n      return;\n    }\n    if(arena.getArenaState() == IArenaState.IN_GAME) {\n      if(Role.isRole(Role.INNOCENT, user, arena)) {\n        if(player.getInventory().getItem(ItemPosition.BOW_LOCATOR.getOtherRolesItemPosition()) != null) {\n          ItemStack bowLocator = new ItemStack(Material.COMPASS, 1);\n          ItemMeta bowMeta = bowLocator.getItemMeta();\n          ComplementAccessor.getComplement().setDisplayName(bowMeta, new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_LOCATOR_BOW\").asKey().player(player).arena(arena).build() + \" §7| §a\" + (int) Math.round(player.getLocation().distance(player.getCompassTarget())));\n          bowLocator.setItemMeta(bowMeta);\n          ItemPosition.setItem(user, ItemPosition.BOW_LOCATOR, bowLocator);\n          return;\n        }\n      }\n      if(arena.isMurdererLocatorReceived() && Role.isRole(Role.MURDERER, user, arena) && arena.isMurderAlive(player)) {\n        ItemStack innocentLocator = new ItemStack(Material.COMPASS, 1);\n        ItemMeta innocentMeta = innocentLocator.getItemMeta();\n        for(Player p : arena.getPlayersLeft()) {\n          Arena playerArena = plugin.getArenaRegistry().getArena(p);\n          IUser playerUser = plugin.getUserManager().getUser(p);\n\n          if(Role.isRole(Role.INNOCENT, playerUser, playerArena) || Role.isRole(Role.ANY_DETECTIVE, playerUser, playerArena)) {\n            ComplementAccessor.getComplement().setDisplayName(innocentMeta, new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_LOCATOR_INNOCENT\").asKey().player(player).arena(arena).build() + \" §7| §a\" + (int) Math.round(player.getLocation().distance(p.getLocation())));\n            innocentLocator.setItemMeta(innocentMeta);\n            ItemPosition.setItem(user, ItemPosition.INNOCENTS_LOCATOR, innocentLocator);\n          }\n        }\n      }\n    }\n  }\n\n  @EventHandler\n  public void onDrop(PlayerDropItemEvent event) {\n    if(plugin.getArenaRegistry().getArena(event.getPlayer()) != null && plugin.getArenaRegistry().getArena(event.getPlayer()).getArenaState() == IArenaState.IN_GAME) {\n      event.setCancelled(true);\n    }\n  }\n\n  @EventHandler\n  public void onItemMove(InventoryClickEvent event) {\n    if(event.getWhoClicked() instanceof Player && plugin.getArenaRegistry().isInArena((Player) event.getWhoClicked())) {\n      if(XInventoryView.of(event.getView()).getType() == InventoryType.CRAFTING || XInventoryView.of(event.getView()).getType() == InventoryType.PLAYER) {\n        event.setResult(Event.Result.DENY);\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/arena/ArenaManager.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.arena;\n\nimport org.bukkit.entity.Player;\nimport org.jetbrains.annotations.NotNull;\nimport plugily.projects.minigamesbox.api.arena.IArenaState;\nimport plugily.projects.minigamesbox.api.arena.IPluginArena;\nimport plugily.projects.minigamesbox.api.user.IUser;\nimport plugily.projects.minigamesbox.classic.arena.PluginArenaManager;\nimport plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;\nimport plugily.projects.minigamesbox.classic.handlers.language.TitleBuilder;\nimport plugily.projects.minigamesbox.classic.utils.actionbar.ActionBar;\nimport plugily.projects.minigamesbox.classic.utils.version.VersionUtils;\nimport plugily.projects.murdermystery.Main;\nimport plugily.projects.murdermystery.arena.managers.MapRestorerManager;\nimport plugily.projects.murdermystery.arena.role.Role;\nimport plugily.projects.murdermystery.arena.special.SpecialBlock;\nimport plugily.projects.murdermystery.utils.ItemPosition;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.concurrent.ThreadLocalRandom;\n\n/**\n * @author Plajer\n * <p>Created at 13.05.2018\n */\npublic class ArenaManager extends PluginArenaManager {\n\n  private final Main plugin;\n\n  public ArenaManager(Main plugin) {\n    super(plugin);\n    this.plugin = plugin;\n  }\n\n  @Override\n  public void joinAttempt(@NotNull Player player, @NotNull IPluginArena arena) {\n    Arena pluginArena = (Arena) plugin.getArenaRegistry().getArena(arena.getId());\n    if(pluginArena == null) {\n      return;\n    }\n    super.joinAttempt(player, arena);\n    ArenaUtils.updateNameTagsVisibility(player);\n  }\n\n  @Override\n  public void leaveAttempt(@NotNull Player player, @NotNull IPluginArena arena) {\n    Arena pluginArena = (Arena) plugin.getArenaRegistry().getArena(arena.getId());\n    if(pluginArena == null) {\n      return;\n    }\n    super.leaveAttempt(player, arena);\n    if(pluginArena.isDeathPlayer(player)) {\n      pluginArena.removeDeathPlayer(player);\n    }\n    IUser user = plugin.getUserManager().getUser(player);\n\n    int localScore = user.getStatistic(\"LOCAL_SCORE\");\n    if(localScore > user.getStatistic(\"HIGHEST_SCORE\")) {\n      user.setStatistic(\"HIGHEST_SCORE\", localScore);\n    }\n\n    boolean playerHasMurdererRole = Role.isRole(Role.MURDERER, user, arena);\n    if(playerHasMurdererRole) {\n      pluginArena.removeFromMurdererList(player);\n    }\n\n    if(arena.getArenaState() == IArenaState.IN_GAME && !user.isSpectator()) {\n      List<Player> playersLeft = arena.getPlayersLeft();\n\n      if(playersLeft.size() > 1) {\n        if(playerHasMurdererRole) {\n          if(pluginArena.getMurdererList().isEmpty()) {\n            List<Player> players = new ArrayList<>();\n            for(Player gamePlayer : playersLeft) {\n              IUser userGamePlayer = plugin.getUserManager().getUser(gamePlayer);\n              if(gamePlayer == player || Role.isRole(Role.ANY_DETECTIVE, userGamePlayer, arena) || Role.isRole(Role.MURDERER, userGamePlayer, arena)) {\n                continue;\n              }\n              players.add(gamePlayer);\n            }\n\n            Player newMurderer = players.get(players.size() == 1 ? 0 : ThreadLocalRandom.current().nextInt(players.size()));\n            if(newMurderer != null) {\n              plugin.getDebugger().debug(\"A murderer left the game. New murderer: {0}\", newMurderer.getName());\n              pluginArena.setCharacter(Arena.CharacterType.MURDERER, newMurderer);\n              pluginArena.addToMurdererList(newMurderer);\n            }\n\n            new TitleBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_ROLE_CHANGE\").asKey().player(player).arena(pluginArena).sendArena();\n            if(newMurderer != null) {\n              new TitleBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_ROLE_MURDERER\").asKey().player(player).arena(pluginArena).sendPlayer();\n              plugin.getActionBarManager().addActionBar(player, new ActionBar((new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_ROLE_CHANGE\")).asKey(), ActionBar.ActionBarType.DISPLAY, 5));\n              ItemPosition.setItem(plugin.getUserManager().getUser(newMurderer), ItemPosition.MURDERER_SWORD, plugin.getSwordSkinManager().getRandomSwordSkin(player));\n            }\n          } else {\n            plugin.getDebugger().debug(\"No new murderer added as there are some\");\n          }\n        } else if(Role.isRole(Role.ANY_DETECTIVE, user, arena)\n          && pluginArena.lastAliveDetective()) {\n          pluginArena.setDetectiveDead(true);\n          if(Role.isRole(Role.FAKE_DETECTIVE, user, arena)) {\n            pluginArena.setCharacter(Arena.CharacterType.FAKE_DETECTIVE, null);\n          }\n          ArenaUtils.dropBowAndAnnounce(pluginArena, player);\n        }\n        plugin.getCorpseHandler().spawnCorpse(player, pluginArena);\n      } else {\n        stopGame(false, arena);\n      }\n    }\n  }\n\n  @Override\n  public void stopGame(boolean quickStop, @NotNull IPluginArena arena) {\n    Arena pluginArena = (Arena) plugin.getArenaRegistry().getArena(arena.getId());\n    if(pluginArena == null) {\n      return;\n    }\n    for(SpecialBlock specialBlock : pluginArena.getSpecialBlocks()) {\n      if(specialBlock.getArmorStandHologram() != null) {\n        specialBlock.getArmorStandHologram().delete();\n      }\n    }\n    ((MapRestorerManager) pluginArena.getMapRestorerManager()).removeBowHolo();\n    boolean murderWon = arena.getPlayersLeft().size() == pluginArena.aliveMurderer();\n    for(Player player : arena.getPlayersLeft()) {\n      if(!quickStop) {\n        IUser user = plugin.getUserManager().getUser(player);\n        if(Role.isAnyRole(user, arena)) {\n          boolean hasDeathRole = Role.isRole(Role.DEATH, user, arena);\n          int multiplicator = 1;\n          if(!hasDeathRole) {\n            multiplicator = arena.getMaximumPlayers();\n          }\n          pluginArena.adjustContributorValue(Role.MURDERER, user, plugin.getRandom().nextInt(10 * multiplicator));\n          pluginArena.adjustContributorValue(Role.DETECTIVE, user, plugin.getRandom().nextInt(10 * multiplicator));\n          if(!hasDeathRole) {\n            boolean hasMurdererRole = Role.isRole(Role.MURDERER, user, arena);\n            if(murderWon || !hasMurdererRole) {\n              user.adjustStatistic(\"WINS\", 1);\n              plugin.getRewardsHandler().performReward(player, plugin.getRewardsHandler().getRewardType(\"WIN\"));\n            } else {\n              user.adjustStatistic(\"LOSES\", 1);\n              plugin.getRewardsHandler().performReward(player, plugin.getRewardsHandler().getRewardType(\"LOSE\"));\n            }\n          } else {\n            user.adjustStatistic(\"LOSES\", 1);\n            plugin.getRewardsHandler().performReward(player, plugin.getRewardsHandler().getRewardType(\"LOSE\"));\n          }\n        }\n      }\n    }\n    super.stopGame(quickStop, arena);\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/arena/ArenaRegistry.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.arena;\n\nimport org.bukkit.Location;\nimport org.bukkit.configuration.ConfigurationSection;\nimport org.bukkit.entity.Player;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\nimport plugily.projects.minigamesbox.api.arena.IPluginArena;\nimport plugily.projects.minigamesbox.classic.arena.PluginArena;\nimport plugily.projects.minigamesbox.classic.arena.PluginArenaRegistry;\nimport plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;\nimport plugily.projects.minigamesbox.classic.utils.serialization.LocationSerializer;\nimport plugily.projects.murdermystery.Main;\nimport plugily.projects.murdermystery.arena.special.SpecialBlock;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n * Created by Tom on 27/07/2014.\n */\npublic class ArenaRegistry extends PluginArenaRegistry {\n\n  private final Main plugin;\n\n  public ArenaRegistry(Main plugin) {\n    super(plugin);\n    this.plugin = plugin;\n  }\n\n\n  @Override\n  public PluginArena getNewArena(String id) {\n    return new Arena(id);\n  }\n\n  @Override\n  public boolean additionalValidatorChecks(ConfigurationSection section, PluginArena arena, String id) {\n    boolean checks = super.additionalValidatorChecks(section, arena, id);\n    if(!checks) return false;\n\n    if(!section.getBoolean(id + \".isdone\")) {\n      plugin.getDebugger().sendConsoleMsg(new MessageBuilder(\"VALIDATOR_INVALID_ARENA_CONFIGURATION\").asKey().value(\"NOT VALIDATED\").arena(arena).build());\n      return false;\n    }\n\n    List<Location> playerSpawnPoints = new ArrayList<>();\n    for(String loc : section.getStringList(id + \".playerspawnpoints\")) {\n      org.bukkit.Location serialized = LocationSerializer.getLocation(loc);\n\n      // Ignore the arena if world is not exist at least in spawn points\n      if(serialized == null || serialized.getWorld() == null) {\n        section.set(id + \".isdone\", false);\n      } else {\n        playerSpawnPoints.add(serialized);\n      }\n    }\n\n    ((Arena) arena).setSpawnGoldTime(section.getInt(id + \".spawngoldtime\", 5));\n    ((Arena) arena).setHideChances(section.getBoolean(id + \".hidechances\"));\n    arena.setArenaOption(\"MURDERER_DIVIDER\",section.getInt(id + \".playerpermurderer\", 5));\n    arena.setArenaOption(\"DETECTIVE_DIVIDER\",section.getInt(id + \".playerperdetective\", 7));\n    ((Arena) arena).setGoldVisuals(section.getBoolean(id + \".goldvisuals\"));\n    ((Arena) arena).setPlayerSpawnPoints(playerSpawnPoints);\n\n    List<Location> goldSpawnPoints = new ArrayList<>();\n    for(String loc : section.getStringList(id + \".goldspawnpoints\")) {\n      goldSpawnPoints.add(LocationSerializer.getLocation(loc));\n    }\n    ((Arena) arena).setGoldSpawnPoints(goldSpawnPoints);\n\n    List<SpecialBlock> specialBlocks = new ArrayList<>();\n    for(String loc : section.getStringList(id + \".mystery-cauldrons\")) {\n      specialBlocks.add(new SpecialBlock(LocationSerializer.getLocation(loc), SpecialBlock.SpecialBlockType.MYSTERY_CAULDRON));\n    }\n    for(String loc : section.getStringList(id + \".confessionals\")) {\n      specialBlocks.add(new SpecialBlock(LocationSerializer.getLocation(loc), SpecialBlock.SpecialBlockType.PRAISE_DEVELOPER));\n    }\n\n    specialBlocks.forEach(((Arena) arena)::loadSpecialBlock);\n    return true;\n  }\n\n  @Override\n  public @Nullable Arena getArena(Player player) {\n    IPluginArena pluginArena = super.getArena(player);\n    if(pluginArena instanceof Arena) {\n      return (Arena) pluginArena;\n    }\n    return null;\n  }\n\n  @Override\n  public @Nullable Arena getArena(String id) {\n    IPluginArena pluginArena = super.getArena(id);\n    if(pluginArena instanceof Arena) {\n      return (Arena) pluginArena;\n    }\n    return null;\n  }\n\n  public @NotNull List<Arena> getPluginArenas() {\n    List<Arena> arenas = new ArrayList<>();\n    for(IPluginArena pluginArena : super.getArenas()) {\n      if(pluginArena instanceof Arena) {\n        arenas.add((Arena) pluginArena);\n      }\n    }\n    return arenas;\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/arena/ArenaUtils.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.arena;\n\nimport org.bukkit.Bukkit;\nimport org.bukkit.Location;\nimport org.bukkit.Material;\nimport org.bukkit.entity.Player;\nimport org.bukkit.inventory.ItemStack;\nimport org.bukkit.inventory.meta.ItemMeta;\nimport plugily.projects.minigamesbox.api.arena.IArenaState;\nimport plugily.projects.minigamesbox.api.arena.IPluginArena;\nimport plugily.projects.minigamesbox.api.user.IUser;\nimport plugily.projects.minigamesbox.classic.arena.PluginArenaUtils;\nimport plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;\nimport plugily.projects.minigamesbox.classic.handlers.language.TitleBuilder;\nimport plugily.projects.minigamesbox.classic.utils.hologram.ArmorStandHologram;\nimport plugily.projects.minigamesbox.classic.utils.misc.complement.ComplementAccessor;\nimport plugily.projects.minigamesbox.classic.utils.version.VersionUtils;\nimport plugily.projects.minigamesbox.classic.utils.version.xseries.XSound;\nimport plugily.projects.murdermystery.arena.role.Role;\nimport plugily.projects.murdermystery.utils.ItemPosition;\n\n/**\n * @author Plajer\n * <p>Created at 13.03.2018\n */\npublic class ArenaUtils extends PluginArenaUtils {\n\n  private ArenaUtils() {\n    super();\n  }\n\n  public static void onMurdererDeath(Arena arena) {\n    for(Player player : arena.getPlayers()) {\n      VersionUtils.sendSubTitle(player, new MessageBuilder(\"IN_GAME_MESSAGES_GAME_END_PLACEHOLDERS_MURDERER_STOPPED\").asKey().build(), 5, 40, 5);\n      IUser loopUser = getPlugin().getUserManager().getUser(player);\n      if(Role.isRole(Role.INNOCENT, loopUser, arena)) {\n        addScore(loopUser, ScoreAction.SURVIVE_GAME, 0);\n      } else if(Role.isRole(Role.ANY_DETECTIVE, loopUser, arena)) {\n        addScore(loopUser, ScoreAction.WIN_GAME, 0);\n        addScore(loopUser, ScoreAction.DETECTIVE_WIN_GAME, 0);\n      }\n    }\n    //we must call it ticks later due to instant respawn bug\n    Bukkit.getScheduler().runTask(getPlugin(), () -> getPlugin().getArenaManager().stopGame(false, arena));\n  }\n\n  public static void updateInnocentLocator(Arena arena) {\n    java.util.List<Player> list = arena.getPlayersLeft();\n\n    if(!arena.isMurdererLocatorReceived()) {\n      ItemStack innocentLocator = new ItemStack(Material.COMPASS, 1);\n      ItemMeta innocentMeta = innocentLocator.getItemMeta();\n      ComplementAccessor.getComplement()\n        .setDisplayName(\n          innocentMeta,\n          new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_LOCATOR_INNOCENT\").asKey().build());\n      innocentLocator.setItemMeta(innocentMeta);\n      for(Player p : list) {\n        if(arena.isMurderAlive(p)) {\n          ItemPosition.setItem(getPlugin().getUserManager().getUser(p), ItemPosition.INNOCENTS_LOCATOR, innocentLocator);\n        }\n      }\n      arena.setMurdererLocatorReceived(true);\n\n      for(Player p : list) {\n        if(Role.isRole(Role.MURDERER, getPlugin().getUserManager().getUser(p), arena)) {\n          continue;\n        }\n        new TitleBuilder(\"IN_GAME_MESSAGES_ARENA_LOCATOR_WATCH_OUT\")\n          .asKey()\n          .player(p)\n          .arena(arena)\n          .sendPlayer();\n      }\n    }\n\n    for(Player p : list) {\n      if(Role.isRole(Role.MURDERER, getPlugin().getUserManager().getUser(p), arena)) {\n        continue;\n      }\n      for(Player murder : arena.getMurdererList()) {\n        if(arena.isMurderAlive(murder)) {\n          murder.setCompassTarget(p.getLocation());\n        }\n      }\n      break;\n    }\n  }\n\n  public static void dropBowAndAnnounce(Arena arena, Player victim) {\n    if(arena.getBowHologram() != null) {\n      return;\n    }\n\n    for(Player player : arena.getPlayers()) {\n      IUser user = arena.getPlugin().getUserManager().getUser(player);\n      if(Role.isRole(Role.MURDERER, user, arena)) {\n        continue;\n      }\n      new TitleBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_BOW_DROPPED\").asKey().arena(arena).send(player);\n    }\n\n    ArmorStandHologram hologram =\n      new ArmorStandHologram(victim.getLocation()).appendItem(new ItemStack(Material.BOW, 1));\n\n    arena.setBowHologram(hologram);\n    addBowLocator(arena, hologram.getLocation());\n  }\n\n  private static void addBowLocator(Arena arena, Location loc) {\n    ItemStack bowLocator = new ItemStack(Material.COMPASS, 1);\n    ItemMeta bowMeta = bowLocator.getItemMeta();\n    ComplementAccessor.getComplement()\n      .setDisplayName(\n        bowMeta, new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_LOCATOR_BOW\").asKey().build());\n    bowLocator.setItemMeta(bowMeta);\n    for(Player p : arena.getPlayersLeft()) {\n      IUser user = getPlugin().getUserManager().getUser(p);\n      if(Role.isRole(Role.INNOCENT, user, arena)) {\n        ItemPosition.setItem(user, ItemPosition.BOW_LOCATOR, bowLocator);\n        p.setCompassTarget(loc);\n      }\n    }\n  }\n\n  public static void updateNameTagsVisibility(final Player p) {\n    if(!getPlugin().getConfigPreferences().getOption(\"HIDE_NAMETAGS\")) {\n      return;\n    }\n    for(Player players : getPlugin().getServer().getOnlinePlayers()) {\n      IPluginArena arena = getPlugin().getArenaRegistry().getArena(players);\n      if(arena == null) {\n        continue;\n      }\n      VersionUtils.updateNameTagsVisibility(\n        p, players, \"MMHide\", arena.getArenaState() != IArenaState.IN_GAME);\n    }\n  }\n\n  public static void addScore(IUser user, ScoreAction action, int amount) {\n    XSound.matchXSound(XSound.ENTITY_EXPERIENCE_ORB_PICKUP.parseSound())\n      .play(user.getPlayer().getLocation(), 1F, 2F);\n\n    if(action == ScoreAction.GOLD_PICKUP && amount > 1) {\n      int score = action.points * amount;\n      new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_BONUS\")\n        .asKey()\n        .player(user.getPlayer())\n        .arena(user.getArena())\n        .integer(score)\n        .value(action.action)\n        .sendPlayer();\n      user.adjustStatistic(\"LOCAL_SCORE\", score);\n      return;\n    }\n\n    if(action == ScoreAction.DETECTIVE_WIN_GAME) {\n      int innocents = 0;\n      Arena arena = (Arena) user.getArena();\n\n      for(Player p : arena.getPlayersLeft()) {\n        if(Role.isRole(Role.INNOCENT, getPlugin().getUserManager().getUser(p), arena)) {\n          innocents++;\n        }\n      }\n\n      int overallInnocents = 100 * innocents;\n\n      user.adjustStatistic(\"LOCAL_SCORE\", overallInnocents);\n      new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_BONUS\")\n        .asKey()\n        .player(user.getPlayer())\n        .arena(user.getArena())\n        .integer(overallInnocents)\n        .value(new MessageBuilder(action.action).integer(innocents).build())\n        .sendPlayer();\n      return;\n    }\n    String msg =\n      new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_BONUS\")\n        .asKey()\n        .player(user.getPlayer())\n        .arena(user.getArena())\n        .integer(action.points)\n        .value(action.action)\n        .build();\n\n    if(action.points < 0) {\n      msg = msg.replace(\"+\", \"\");\n    }\n\n    user.adjustStatistic(\"LOCAL_SCORE\", action.points);\n    user.getPlayer().sendMessage(msg);\n  }\n\n  public enum ScoreAction {\n    KILL_PLAYER(\n      100,\n      new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_ACTION_KILL_PLAYER\")\n        .asKey()\n        .build()),\n    KILL_MURDERER(\n      200,\n      new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_ACTION_KILL_MURDERER\")\n        .asKey()\n        .build()),\n    GOLD_PICKUP(\n      15,\n      new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_ACTION_PICKUP_GOLD\")\n        .asKey()\n        .build()),\n    SURVIVE_TIME(\n      150,\n      new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_ACTION_SURVIVING_TIME\")\n        .asKey()\n        .build()),\n    SURVIVE_GAME(\n      200,\n      new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_ACTION_SURVIVING_END\")\n        .asKey()\n        .build()),\n    WIN_GAME(\n      100, new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_ACTION_WIN\").asKey().build()),\n    DETECTIVE_WIN_GAME(\n      0,\n      new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_ACTION_DETECTIVE\")\n        .asKey()\n        .build()),\n    INNOCENT_KILL(\n      -100,\n      new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_ACTION_KILL_INNOCENT\")\n        .asKey()\n        .build());\n\n    int points;\n    String action;\n\n    ScoreAction(int points, String action) {\n      this.points = points;\n      this.action = action;\n    }\n\n    public int getPoints() {\n      return points;\n    }\n\n    public String getAction() {\n      return action;\n    }\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/arena/corpse/Corpse.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.arena.corpse;\n\nimport org.golde.bukkit.corpsereborn.nms.Corpses;\n\nimport plugily.projects.minigamesbox.classic.utils.hologram.ArmorStandHologram;\n\n/**\n * @author Plajer\n * <p>\n * Created at 07.08.2018\n */\npublic class Corpse {\n\n  private final ArmorStandHologram hologram;\n  private final Corpses.CorpseData corpseData;\n\n  public Corpse(ArmorStandHologram hologram, Corpses.CorpseData corpseData) {\n    this.hologram = hologram;\n    this.corpseData = corpseData;\n  }\n\n  public ArmorStandHologram getHologram() {\n    return hologram;\n  }\n\n  public Corpses.CorpseData getCorpseData() {\n    return corpseData;\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/arena/corpse/Stand.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.arena.corpse;\n\nimport org.bukkit.entity.ArmorStand;\n\nimport plugily.projects.minigamesbox.classic.utils.hologram.ArmorStandHologram;\n\n/**\n * @author Plajer\n * <p>\n * Created at 07.08.2018\n */\npublic class Stand {\n\n  private final ArmorStandHologram hologram;\n  private final ArmorStand stand;\n\n  public Stand(ArmorStandHologram hologram, ArmorStand stand) {\n    this.hologram = hologram;\n    this.stand = stand;\n  }\n\n  public ArmorStandHologram getHologram() {\n    return hologram;\n  }\n\n  public ArmorStand getStand() {\n    return stand;\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/arena/managers/MapRestorerManager.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.arena.managers;\n\nimport org.bukkit.Bukkit;\nimport org.bukkit.entity.Item;\nimport org.golde.bukkit.corpsereborn.CorpseAPI.CorpseAPI;\nimport plugily.projects.minigamesbox.classic.arena.managers.PluginMapRestorerManager;\nimport plugily.projects.murdermystery.HookManager;\nimport plugily.projects.murdermystery.arena.Arena;\nimport plugily.projects.murdermystery.arena.corpse.Corpse;\nimport plugily.projects.murdermystery.arena.corpse.Stand;\n\nimport java.util.Objects;\n\npublic class MapRestorerManager extends PluginMapRestorerManager {\n\n  public final Arena arena;\n\n  public MapRestorerManager(Arena arena) {\n    super(arena);\n    this.arena = arena;\n  }\n\n  @Override\n  public void fullyRestoreArena() {\n    cleanUpArena();\n    super.fullyRestoreArena();\n  }\n\n\n  public void cleanUpArena() {\n    removeBowHolo();\n    arena.setMurdererLocatorReceived(false);\n    arena.getDetectiveContributions().clear();\n    arena.getMurdererContributions().clear();\n    arena.getGameCharacters().clear();\n    arena.getMurdererList().clear();\n    arena.getDetectiveList().clear();\n    arena.getDeaths().clear();\n    arena.setDetectiveDead(false);\n    clearCorpses();\n    clearGold();\n  }\n\n  public void removeBowHolo() {\n    if(arena.getBowHologram() != null && !arena.getBowHologram().isDeleted()) {\n      arena.getBowHologram().delete();\n    }\n    arena.setBowHologram(null);\n  }\n\n  public void clearGold() {\n    arena.getGoldSpawned().stream().filter(Objects::nonNull).forEach(Item::remove);\n    arena.getGoldSpawned().clear();\n  }\n\n  public void clearCorpses() {\n    if(!arena.getPlugin().getHookManager().isFeatureEnabled(HookManager.HookFeature.CORPSES)) {\n      for(Stand stand : arena.getStands()) {\n        if(!stand.getHologram().isDeleted()) {\n          stand.getHologram().delete();\n        }\n        if(stand.getStand() != null) {\n          stand.getStand().remove();\n        }\n      }\n      arena.getStands().clear();\n      return;\n    }\n    for(Corpse corpse : arena.getCorpses()) {\n      if(!corpse.getHologram().isDeleted()) {\n        corpse.getHologram().delete();\n      }\n      if(corpse.getCorpseData() != null) {\n        corpse.getCorpseData().destroyCorpseFromEveryone();\n        CorpseAPI.removeCorpse(corpse.getCorpseData());\n      }\n    }\n    arena.getCorpses().clear();\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/arena/managers/ScoreboardManager.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.arena.managers;\n\nimport org.bukkit.entity.Player;\nimport plugily.projects.minigamesbox.api.arena.IArenaState;\nimport plugily.projects.minigamesbox.api.user.IUser;\nimport plugily.projects.minigamesbox.classic.arena.PluginArena;\nimport plugily.projects.minigamesbox.classic.arena.managers.PluginScoreboardManager;\nimport plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;\nimport plugily.projects.murdermystery.arena.role.Role;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n * @author Tigerpanzer_02\n * <p>Created at 19.12.2021\n */\npublic class ScoreboardManager extends PluginScoreboardManager {\n\n  private final PluginArena arena;\n\n  public ScoreboardManager(PluginArena arena) {\n    super(arena);\n    this.arena = arena;\n  }\n\n  @Override\n  public List<String> getScoreboardLines(Player player) {\n    List<String> lines;\n    if(arena.getArenaState() == IArenaState.IN_GAME) {\n      IUser user = arena.getPlugin().getUserManager().getUser(player);\n      lines =\n        arena\n          .getPlugin()\n          .getLanguageManager()\n          .getLanguageList(\n            \"Scoreboard.Content.\" + arena.getArenaState().getFormattedName() + (Role.isRole(Role.MURDERER, user) ? \"-Murderer\" : \"\"));\n    } else {\n      lines = super.getScoreboardLines(player);\n    }\n    return lines;\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/arena/role/Role.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.arena.role;\n\nimport org.bukkit.entity.Player;\nimport plugily.projects.minigamesbox.api.arena.IPluginArena;\nimport plugily.projects.minigamesbox.api.user.IUser;\nimport plugily.projects.minigamesbox.classic.arena.PluginArena;\nimport plugily.projects.minigamesbox.classic.user.User;\nimport plugily.projects.murdermystery.arena.Arena;\n\n/**\n * @author Plajer\n * <p>\n * Created at 06.10.2018\n */\npublic enum Role {\n\n  /**\n   * Detective or fake detective role\n   */\n  ANY_DETECTIVE,\n  /**\n   * Detective role, he must kill murderer\n   */\n  DETECTIVE,\n  /**\n   * Detective role, innocent who picked up bow became fake detective because he wasn't\n   * detective by default\n   */\n  FAKE_DETECTIVE,\n  /**\n   * Innocent player role, must survive to win\n   */\n  INNOCENT,\n  /**\n   * Murderer role, must kill everyone to win\n   */\n  MURDERER,\n  /**\n   * Spectator role, just look :D\n   */\n  SPECTATOR,\n  /**\n   * Death role, when everyone died\n   */\n  DEATH;\n\n  /**\n   * Checks whether player is playing specified role or not\n   *\n   * @param role   role to check\n   * @param user player to check\n   * @return true if is playing it, false otherwise\n   */\n  public static boolean isRole(Role role, IUser user) {\n    return isRole(role, user, user.getArena());\n  }\n\n  /**\n   * Checks whether player is playing specified role or not\n   *\n   * @param role   role to check\n   * @param user player to check\n   * @param arena  the arena where to check\n   * @return true if is playing it, false otherwise\n   */\n  public static boolean isRole(Role role, IUser user, IPluginArena arena) {\n    if(arena == null)\n      return false;\n    Arena pluginArena = (Arena) arena.getPlugin().getArenaRegistry().getArena(arena.getId());\n    if(pluginArena == null) {\n      return false;\n    }\n    Player player = user.getPlayer();\n    switch(role) {\n      case DETECTIVE:\n        return pluginArena.isCharacterSet(Arena.CharacterType.DETECTIVE) && pluginArena.getDetectiveList().contains(player);\n      case FAKE_DETECTIVE:\n        return player.equals(pluginArena.getCharacter(Arena.CharacterType.FAKE_DETECTIVE));\n      case MURDERER:\n        return pluginArena.isCharacterSet(Arena.CharacterType.MURDERER) && pluginArena.getMurdererList().contains(player);\n      case ANY_DETECTIVE:\n        return isRole(Role.DETECTIVE, user) || isRole(Role.FAKE_DETECTIVE, user);\n      case INNOCENT:\n        return !isRole(Role.MURDERER, user) && !isRole(Role.ANY_DETECTIVE, user);\n      case DEATH:\n        return pluginArena.isDeathPlayer(player);\n      case SPECTATOR:\n        return pluginArena.isSpectatorPlayer(player);\n      default:\n        return false;\n    }\n  }\n\n  /**\n   * Checks whether player is playing a role or not\n   *\n   * @param user player to check\n   * @return true if is playing one role, false otherwise\n   */\n  public static boolean isAnyRole(User user) {\n    return isAnyRole(user, user.getArena());\n  }\n\n  private static final Role[] roles = Role.values();\n\n  /**\n   * Checks whether player is playing a role or not\n   *\n   * @param user player to check\n   * @param arena  the player's arena\n   * @return true if is playing one role, false otherwise\n   */\n  public static boolean isAnyRole(IUser user, IPluginArena arena) {\n    return arena != null && java.util.Arrays.stream(roles).anyMatch(role -> isRole(role, user, arena));\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/arena/special/SpecialBlock.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.arena.special;\n\nimport org.bukkit.Location;\n\nimport plugily.projects.minigamesbox.classic.utils.hologram.ArmorStandHologram;\n\n/**\n * @author Plajer\n * <p>\n * Created at 15.10.2018\n */\npublic class SpecialBlock {\n\n  private final Location location;\n  private final SpecialBlockType specialBlockType;\n  private ArmorStandHologram armorStandHologram;\n\n  public SpecialBlock(Location location, SpecialBlockType specialBlockType) {\n    this.location = location;\n    this.specialBlockType = specialBlockType;\n  }\n\n  public Location getLocation() {\n    return location;\n  }\n\n  public SpecialBlockType getSpecialBlockType() {\n    return specialBlockType;\n  }\n\n  public ArmorStandHologram getArmorStandHologram() {\n    return armorStandHologram;\n  }\n\n  public void setArmorStandHologram(ArmorStandHologram armorStandHologram) {\n    this.armorStandHologram = armorStandHologram;\n  }\n\n  public enum SpecialBlockType {\n    HORSE_PURCHASE, MYSTERY_CAULDRON, PRAISE_DEVELOPER, RAPID_TELEPORTATION\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/arena/special/SpecialBlockEvents.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.arena.special;\n\nimport org.bukkit.Bukkit;\nimport org.bukkit.Material;\nimport org.bukkit.entity.Item;\nimport org.bukkit.event.EventHandler;\nimport org.bukkit.event.Listener;\nimport org.bukkit.event.player.PlayerInteractEvent;\nimport org.bukkit.event.player.PlayerItemConsumeEvent;\nimport org.bukkit.inventory.ItemStack;\nimport plugily.projects.minigamesbox.api.arena.IArenaState;\nimport plugily.projects.minigamesbox.api.user.IUser;\nimport plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;\nimport plugily.projects.minigamesbox.classic.utils.helper.ItemBuilder;\nimport plugily.projects.minigamesbox.classic.utils.helper.ItemUtils;\nimport plugily.projects.minigamesbox.classic.utils.misc.complement.ComplementAccessor;\nimport plugily.projects.minigamesbox.classic.utils.version.ServerVersion;\nimport plugily.projects.minigamesbox.classic.utils.version.VersionUtils;\nimport plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;\nimport plugily.projects.murdermystery.Main;\nimport plugily.projects.murdermystery.arena.Arena;\nimport plugily.projects.murdermystery.arena.special.mysterypotion.MysteryPotion;\nimport plugily.projects.murdermystery.arena.special.mysterypotion.MysteryPotionRegistry;\nimport plugily.projects.murdermystery.arena.special.pray.PrayerRegistry;\nimport plugily.projects.murdermystery.utils.ItemPosition;\n\n\n/**\n * @author Plajer\n * <p>\n * Created at 16.10.2018\n */\npublic class SpecialBlockEvents implements Listener {\n\n  private final Main plugin;\n\n  public SpecialBlockEvents(Main plugin) {\n    this.plugin = plugin;\n    plugin.getServer().getPluginManager().registerEvents(this, plugin);\n  }\n\n  @EventHandler\n  public void onSpecialBlockClick(PlayerInteractEvent event) {\n    if(event.getClickedBlock() == null)\n      return;\n\n    if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_11) && event.getHand() == org.bukkit.inventory.EquipmentSlot.OFF_HAND) {\n      return;\n    }\n\n    Arena arena = plugin.getArenaRegistry().getArena(event.getPlayer());\n    if(arena == null) {\n      return;\n    }\n\n    if(arena.getArenaState() != IArenaState.IN_GAME || plugin.getUserManager().getUser(event.getPlayer()).isSpectator()) {\n      return;\n    }\n\n    for(SpecialBlock specialBlock : arena.getSpecialBlocks()) {\n      if(event.getClickedBlock().getType() == XMaterial.LEVER.parseMaterial() && plugin.getBukkitHelper().getNearbyBlocks(specialBlock.getLocation(), 3).contains(event.getClickedBlock())) {\n        onPrayLeverClick(event);\n        return;\n      }\n      if(specialBlock.getLocation().getBlock().equals(event.getClickedBlock())) {\n        switch(specialBlock.getSpecialBlockType()) {\n          case MYSTERY_CAULDRON:\n            onCauldronClick(event);\n            return;\n          case PRAISE_DEVELOPER:\n            onPrayerClick(event);\n            return;\n          case HORSE_PURCHASE:\n          case RAPID_TELEPORTATION:\n            //not yet implemented\n          default:\n            break;\n        }\n      }\n    }\n  }\n\n  private void onCauldronClick(PlayerInteractEvent event) {\n    if(event.getClickedBlock().getType() != Material.CAULDRON) {\n      return;\n    }\n\n    if(event.getPlayer().getInventory().getItem(/* same for all roles */ ItemPosition.POTION.getOtherRolesItemPosition()) != null) {\n      new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_CAULDRON_POTION\").asKey().player(event.getPlayer()).sendPlayer();\n      return;\n    }\n\n    IUser user = plugin.getUserManager().getUser(event.getPlayer());\n\n    int localGold = user.getStatistic(\"LOCAL_GOLD\");\n    if(localGold < 1) {\n      new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_NOT_ENOUGH_GOLD\").asKey().player(event.getPlayer()).integer(1).sendPlayer();\n      return;\n    }\n\n    org.bukkit.Location blockLoc = event.getClickedBlock().getLocation();\n\n    VersionUtils.sendParticles(\"FIREWORKS_SPARK\", event.getPlayer(), blockLoc, 10);\n    Item item = blockLoc.getWorld().dropItemNaturally(blockLoc.clone().add(0, 1, 0), new ItemStack(Material.POTION, 1));\n    item.setPickupDelay(10000);\n    Bukkit.getScheduler().runTaskLater(plugin, item::remove, 20);\n    user.adjustStatistic(\"LOCAL_GOLD\", -1);\n    ItemPosition.removeItem(user, new ItemStack(Material.GOLD_INGOT, 1));\n    ItemPosition.setItem(user, ItemPosition.POTION, new ItemBuilder(XMaterial.POTION.parseItem()).name(MysteryPotionRegistry.getRandomPotion().getName()).build());\n  }\n\n  private void onPrayerClick(PlayerInteractEvent event) {\n    if(event.getClickedBlock().getType() != XMaterial.ENCHANTING_TABLE.parseMaterial()) {\n      return;\n    }\n\n    event.setCancelled(true);\n\n    IUser user = plugin.getUserManager().getUser(event.getPlayer());\n    int localGold = user.getStatistic(\"LOCAL_GOLD\");\n\n    if(localGold < 1) {\n      new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_NOT_ENOUGH_GOLD\").asKey().player(event.getPlayer()).integer(1).sendPlayer();\n      return;\n    }\n    new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_CHAT\").asKey().player(event.getPlayer()).sendPlayer();\n    user.adjustStatistic(\"LOCAL_PRAISES\", 1);\n    VersionUtils.sendParticles(\"FIREWORKS_SPARK\", event.getPlayer(), event.getClickedBlock().getLocation(), 10);\n    user.adjustStatistic(\"LOCAL_GOLD\", -1);\n    ItemPosition.removeItem(user, new ItemStack(Material.GOLD_INGOT, 1));\n  }\n\n  private void onPrayLeverClick(PlayerInteractEvent event) {\n    IUser user = plugin.getUserManager().getUser(event.getPlayer());\n    if(user.getStatistic(\"LOCAL_PRAISES\") < 1) {\n      new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_PAY\").asKey().player(event.getPlayer()).sendPlayer();\n      return;\n    }\n    PrayerRegistry.applyRandomPrayer(user);\n    user.setStatistic(\"LOCAL_PRAISES\", 0);\n  }\n\n  @EventHandler\n  public void onMysteryPotionDrink(PlayerItemConsumeEvent event) {\n    ItemStack item = event.getItem();\n    if(item.getType() != XMaterial.POTION.parseMaterial() || !ItemUtils.isItemStackNamed(item)) {\n      return;\n    }\n\n    if(plugin.getArenaRegistry().getArena(event.getPlayer()) == null) {\n      return;\n    }\n\n    String itemDisplayName = ComplementAccessor.getComplement().getDisplayName(item.getItemMeta());\n    IUser user = plugin.getUserManager().getUser(event.getPlayer());\n    for(MysteryPotion potion : MysteryPotionRegistry.getMysteryPotions()) {\n      if(itemDisplayName.equals(potion.getName())) {\n        event.setCancelled(true);\n        event.getPlayer().sendMessage(potion.getSubtitle());\n        VersionUtils.sendTitles(event.getPlayer(), \"\", potion.getSubtitle(), 5, 40, 5);\n        ItemPosition.setItem(user, ItemPosition.POTION, null);\n        event.getPlayer().addPotionEffect(potion.getPotionEffect());\n        return;\n      }\n    }\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/arena/special/mysterypotion/MysteryPotion.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.arena.special.mysterypotion;\n\nimport org.bukkit.potion.PotionEffect;\n\n/**\n * @author Plajer\n * <p>\n * Created at 15.10.2018\n */\npublic class MysteryPotion {\n\n  private final String name;\n  private final String subtitle;\n  private final PotionEffect potionEffect;\n\n  public MysteryPotion(String name, String subtitle, PotionEffect potionEffect) {\n    this.name = name;\n    this.subtitle = subtitle;\n    this.potionEffect = potionEffect;\n  }\n\n  public String getName() {\n    return name;\n  }\n\n  public String getSubtitle() {\n    return subtitle;\n  }\n\n  public PotionEffect getPotionEffect() {\n    return potionEffect;\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/arena/special/mysterypotion/MysteryPotionRegistry.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.arena.special.mysterypotion;\n\nimport org.bukkit.configuration.file.FileConfiguration;\n\nimport plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;\nimport plugily.projects.minigamesbox.classic.utils.configuration.ConfigUtils;\nimport plugily.projects.minigamesbox.classic.utils.version.xseries.XPotion;\nimport plugily.projects.murdermystery.Main;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.concurrent.ThreadLocalRandom;\n\n/**\n * @author Plajer\n * <p>\n * Created at 15.10.2018\n */\npublic class MysteryPotionRegistry {\n\n  private static final List<MysteryPotion> mysteryPotions = new ArrayList<>();\n\n  public static void init(Main plugin) {\n    FileConfiguration config = ConfigUtils.getConfig(plugin, \"special_blocks\");\n    org.bukkit.configuration.ConfigurationSection section = config.getConfigurationSection(\"Special-Blocks.Cauldron-Potions\");\n    if(section == null) {\n      return;\n    }\n\n    for(String key : section.getKeys(false)) {\n\n\n      mysteryPotions.add(new MysteryPotion(new MessageBuilder(section.getString(key + \".Name\")).build(),\n          new MessageBuilder(section.getString(key + \".Subtitle\")).build(), XPotion.of(section.getString(key + \".Type\", \"\").toUpperCase()).get().buildPotionEffect(section.getInt(key + \".Duration\") * 20, section.getInt(key + \".Amplifier\"))));\n    }\n  }\n\n  public static MysteryPotion getRandomPotion() {\n    return mysteryPotions.get(mysteryPotions.size() == 1 ? 0 : ThreadLocalRandom.current().nextInt(mysteryPotions.size()));\n  }\n\n  public static List<MysteryPotion> getMysteryPotions() {\n    return mysteryPotions;\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/arena/special/pray/Prayer.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.arena.special.pray;\n\n/**\n * @author Plajer\n * <p>\n * Created at 16.10.2018\n */\npublic class Prayer {\n\n  private final PrayerType prayerType;\n  private final boolean goodPray;\n  private final String prayerDescription;\n\n  public Prayer(PrayerType prayerType, boolean goodPray, String prayerDescription) {\n    this.prayerType = prayerType;\n    this.goodPray = goodPray;\n    this.prayerDescription = prayerDescription;\n  }\n\n  public PrayerType getPrayerType() {\n    return prayerType;\n  }\n\n  public boolean isGoodPray() {\n    return goodPray;\n  }\n\n  public String getPrayerDescription() {\n    return prayerDescription;\n  }\n\n  public enum PrayerType {\n    BLINDNESS_CURSE, BOW_TIME, DETECTIVE_REVELATION, GOLD_BAN, GOLD_RUSH, INCOMING_DEATH, SINGLE_COMPENSATION, SLOWNESS_CURSE\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/arena/special/pray/PrayerRegistry.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.arena.special.pray;\n\nimport org.bukkit.Material;\nimport org.bukkit.entity.Player;\nimport org.bukkit.inventory.ItemStack;\nimport org.bukkit.potion.PotionEffect;\nimport org.bukkit.potion.PotionEffectType;\nimport org.bukkit.scheduler.BukkitRunnable;\nimport plugily.projects.minigamesbox.api.arena.IArenaState;\nimport plugily.projects.minigamesbox.api.user.IUser;\nimport plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;\nimport plugily.projects.minigamesbox.classic.utils.misc.MiscUtils;\nimport plugily.projects.minigamesbox.classic.utils.version.ServerVersion;\nimport plugily.projects.minigamesbox.classic.utils.version.xseries.XPotion;\nimport plugily.projects.murdermystery.Main;\nimport plugily.projects.murdermystery.arena.Arena;\nimport plugily.projects.murdermystery.arena.role.Role;\nimport plugily.projects.murdermystery.utils.ItemPosition;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.concurrent.ThreadLocalRandom;\n\n/**\n * @author Plajer\n * <p>\n * Created at 16.10.2018\n */\npublic class PrayerRegistry {\n\n  private static Main plugin;\n  private static final List<Prayer> prayers = new ArrayList<>();\n  private static final List<Player> ban = new ArrayList<>(), rush = new ArrayList<>();\n\n  private PrayerRegistry() {\n  }\n\n  public static void init(Main plugin) {\n    PrayerRegistry.plugin = plugin;\n    //good prayers\n    prayers.add(new Prayer(Prayer.PrayerType.DETECTIVE_REVELATION, true, new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_PRAISE_GIFTS_DETECTIVE_REVELATION\").asKey().build()));\n    prayers.add(new Prayer(Prayer.PrayerType.GOLD_RUSH, true, new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_PRAISE_GIFTS_GOLD_RUSH\").asKey().build()));\n    prayers.add(new Prayer(Prayer.PrayerType.SINGLE_COMPENSATION, true, new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_PRAISE_GIFTS_SINGLE_COMPENSATION\").asKey().build()));\n    prayers.add(new Prayer(Prayer.PrayerType.BOW_TIME, true, new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_PRAISE_GIFTS_BOW\").asKey().build()));\n\n    //bad prayers\n    prayers.add(new Prayer(Prayer.PrayerType.SLOWNESS_CURSE, false, new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_PRAISE_CURSES_SLOWNESS\").asKey().build()));\n    prayers.add(new Prayer(Prayer.PrayerType.BLINDNESS_CURSE, false, new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_PRAISE_CURSES_BLINDNESS\").asKey().build()));\n    prayers.add(new Prayer(Prayer.PrayerType.GOLD_BAN, false, new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_PRAISE_CURSES_GOLD\").asKey().build()));\n    prayers.add(new Prayer(Prayer.PrayerType.INCOMING_DEATH, false, new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_PRAISE_CURSES_DEATH\").asKey().build()));\n  }\n\n  public static Prayer getRandomPray() {\n    return prayers.get(ThreadLocalRandom.current().nextInt(prayers.size()));\n  }\n\n  public static List<Prayer> getPrayers() {\n    return prayers;\n  }\n\n  public static void applyRandomPrayer(IUser user) {\n    Prayer prayer = getRandomPray();\n\n    user.setStatistic(\"LOCAL_CURRENT_PRAY\", prayer.getPrayerType().ordinal());\n\n    Player player = user.getPlayer();\n    Arena arena = plugin.getArenaRegistry().getArena(player);\n    List<String> prayMessage = plugin.getLanguageManager().getLanguageList(\"In-Game.Messages.Arena.Playing.Special-Blocks.Pray.Praise.Heard\");\n\n    String feeling = plugin.getLanguageManager().getLanguageMessage(\"In-Game.Messages.Arena.Playing.Special-Blocks.Pray.Praise.Feeling.\" + (prayer.isGoodPray() ? \"Blessed\" : \"Cursed\"));\n    int praySize = prayMessage.size();\n\n    for(int a = 0; a < praySize; a++) {\n      prayMessage.set(a, prayMessage.get(a).replace(\"%feeling%\", feeling).replace(\"%praise%\", prayer.getPrayerDescription()));\n    }\n\n    switch(prayer.getPrayerType()) {\n      case BLINDNESS_CURSE:\n        XPotion.BLINDNESS.buildPotionEffect(Integer.MAX_VALUE, 1).apply(player);\n        break;\n      case BOW_TIME:\n        if(!Role.isRole(Role.ANY_DETECTIVE, user, arena)) {\n          ItemPosition.addItem(user, ItemPosition.BOW, new ItemStack(Material.BOW, 1));\n        }\n        ItemPosition.setItem(user, ItemPosition.ARROWS, new ItemStack(Material.ARROW, plugin.getConfig().getInt(\"Bow.Amount.Arrows.Prayer\", 2)));\n        break;\n      case DETECTIVE_REVELATION:\n        Player characterType = null;\n\n        if(arena != null) {\n          characterType = arena.getCharacter(Arena.CharacterType.DETECTIVE);\n\n          if(characterType == null) {\n            characterType = arena.getCharacter(Arena.CharacterType.FAKE_DETECTIVE);\n          }\n        }\n\n        String charName = characterType == null ? \"????\" : characterType.getName();\n\n        for(int a = 0; a < praySize; a++) {\n          prayMessage.set(a, prayMessage.get(a).replace(\"%detective%\", charName));\n        }\n\n        break;\n      case INCOMING_DEATH:\n        new BukkitRunnable() {\n          int time = 60;\n\n          @Override\n          public void run() {\n            if(arena == null || arena.getArenaState() != IArenaState.IN_GAME || !arena.getPlayersLeft().contains(player)) {\n              cancel();\n              return;\n            }\n\n            if(time-- == 0) {\n              player.damage(1000);\n              cancel();\n            }\n          }\n        }.runTaskTimer(plugin, 20, 20);\n        break;\n      case SINGLE_COMPENSATION:\n        ItemPosition.addItem(user, ItemPosition.GOLD_INGOTS, new ItemStack(Material.GOLD_INGOT, 5));\n        user.adjustStatistic(\"LOCAL_GOLD\", 5);\n        break;\n      case SLOWNESS_CURSE:\n        XPotion.SLOWNESS.buildPotionEffect(Integer.MAX_VALUE, 1).apply(player);\n        break;\n      case GOLD_BAN:\n        ban.add(player);\n        break;\n      case GOLD_RUSH:\n        rush.add(player);\n        break;\n      default:\n        break;\n    }\n    for(String msg : prayMessage) {\n      MiscUtils.sendCenteredMessage(player, msg);\n    }\n  }\n\n  public static List<Player> getBan() {\n    return ban;\n  }\n\n  public static List<Player> getRush() {\n    return rush;\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/arena/states/InGameState.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.arena.states;\n\nimport org.bukkit.Location;\nimport org.bukkit.Material;\nimport org.bukkit.entity.Entity;\nimport org.bukkit.entity.Item;\nimport org.bukkit.entity.Player;\nimport org.bukkit.inventory.ItemStack;\nimport plugily.projects.minigamesbox.api.user.IUser;\nimport plugily.projects.minigamesbox.classic.arena.PluginArena;\nimport plugily.projects.minigamesbox.classic.arena.states.PluginInGameState;\nimport plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;\nimport plugily.projects.minigamesbox.classic.handlers.language.TitleBuilder;\nimport plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;\nimport plugily.projects.minigamesbox.classic.utils.version.xseries.XSound;\nimport plugily.projects.murdermystery.arena.Arena;\nimport plugily.projects.murdermystery.arena.ArenaUtils;\nimport plugily.projects.murdermystery.arena.role.Role;\nimport plugily.projects.murdermystery.utils.ItemPosition;\n\n/**\n * @author Plajer\n * <p>Created at 03.06.2019\n */\npublic class InGameState extends PluginInGameState {\n\n  @Override\n  public void handleCall(PluginArena arena) {\n    super.handleCall(arena);\n    Arena pluginArena = (Arena) getPlugin().getArenaRegistry().getArena(arena.getId());\n    if(pluginArena == null) {\n      return;\n    }\n\n    // winner checks\n    if(pluginArena.getTimer() <= 0) {\n      getPlugin().getArenaManager().stopGame(false, pluginArena);\n    }\n    if(pluginArena.getPlayersLeft().size() == pluginArena.aliveMurderer()) {\n      getPlugin().getArenaManager().stopGame(false, pluginArena);\n    }\n\n    distributeMurdererSword(pluginArena);\n    //every 30 secs survive reward\n    givePlayerSurviveReward(pluginArena);\n    addInnocentLocator(pluginArena);\n    if(pluginArena.getPlayersLeft().size() == pluginArena.aliveMurderer() + 1) {\n      addMurdererSpeed(pluginArena);\n    }\n    spawnGold(pluginArena);\n  }\n\n  private void addMurdererSpeed(Arena pluginArena) {\n    int multiplier = getPlugin().getConfig().getInt(\"Murderer.Speed\", 3);\n    if(multiplier > 1 && multiplier <= 10) {\n      for(Player player : pluginArena.getMurdererList()) {\n        if(pluginArena.isMurderAlive(player)) {\n          // no potion because it adds particles which can be identified\n          player.setWalkSpeed(0.1f * multiplier);\n        }\n      }\n    }\n  }\n\n  private void distributeMurdererSword(Arena pluginArena) {\n    int inGameLength = getPlugin().getConfig().getInt(\"Time-Manager.In-Game\", 270);\n    if(pluginArena.getTimer() <= (inGameLength - 10) && pluginArena.getTimer() > (inGameLength - 15)) {\n      new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_SWORD_SOON\").asKey().integer(pluginArena.getTimer() - (inGameLength - 15)).arena(pluginArena).sendArena();\n      for(Player p : pluginArena.getPlayers()) {\n        XSound.UI_BUTTON_CLICK.play(p.getLocation(), 1, 1);\n      }\n\n      if(pluginArena.getTimer() == (inGameLength - 14)) {\n        if(pluginArena.getMurdererList().isEmpty()) getPlugin().getArenaManager().stopGame(false, pluginArena);\n\n        for(Player p : pluginArena.getMurdererList()) {\n          IUser murderer = getPlugin().getUserManager().getUser(p);\n\n          if(murderer.isSpectator() || !p.isOnline())\n            continue;\n\n          p.getInventory().setHeldItemSlot(0);\n          ItemPosition.setItem(murderer, ItemPosition.MURDERER_SWORD, pluginArena.getPlugin().getSwordSkinManager().getRandomSwordSkin(p));\n        }\n      }\n    }\n  }\n\n  private void spawnGold(Arena pluginArena) {\n    //don't spawn it every time\n    if(pluginArena.getSpawnGoldTimer() == pluginArena.getSpawnGoldTime()) {\n      spawnSomeGold(pluginArena);\n      pluginArena.setSpawnGoldTimer(0);\n    } else {\n      pluginArena.setSpawnGoldTimer(pluginArena.getSpawnGoldTimer() + 1);\n    }\n  }\n\n  private void givePlayerSurviveReward(Arena pluginArena) {\n    if(pluginArena.getTimer() % 30 == 0) {\n      new TitleBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_TIME_LEFT\").arena(pluginArena).sendArena();\n      for(Player p : pluginArena.getPlayersLeft()) {\n        IUser user = getPlugin().getUserManager().getUser(p);\n        if(Role.isRole(Role.INNOCENT, user, pluginArena)) {\n          ArenaUtils.addScore(user, ArenaUtils.ScoreAction.SURVIVE_TIME, 0);\n        }\n      }\n    }\n  }\n\n  private void addInnocentLocator(Arena pluginArena) {\n    if(pluginArena.getTimer() <= 30 || pluginArena.getPlayersLeft().size() == pluginArena.aliveMurderer() + 1) {\n      if(getPlugin().getConfigPreferences().getOption(\"MURDERER_LOCATOR\")) {\n        ArenaUtils.updateInnocentLocator(pluginArena);\n      }\n    }\n  }\n\n  private void spawnSomeGold(Arena arena) {\n    int spawnPointsSize = arena.getGoldSpawnPoints().size();\n\n    if(spawnPointsSize == 0) {\n      return;\n    }\n    //may users want to disable it and want much gold on their map xD\n    if(!getPlugin().getConfigPreferences().getOption(\"GOLD_LIMITER\")) {\n      //do not exceed amount of gold per spawn\n      if(arena.getGoldSpawned().size() >= spawnPointsSize) {\n        return;\n      }\n    }\n    if(getPlugin().getConfigPreferences().getOption(\"GOLD_SPAWNER_MODE_ALL\")) {\n      for(Location location : arena.getGoldSpawnPoints()) {\n        dropGold(arena, location);\n      }\n    } else {\n      Location loc = arena.getGoldSpawnPoints().get(getPlugin().getRandom().nextInt(spawnPointsSize));\n      dropGold(arena, loc);\n    }\n  }\n\n  private void dropGold(Arena arena, Location location) {\n    //spawn maximum 1 gold per spawner\n    if(!getPlugin().getConfigPreferences().getOption(\"GOLD_MULTIPLE\")) {\n      for(Entity entity : location.getWorld().getNearbyEntities(location, 2, 2, 2)) {\n        if(entity instanceof Item && XMaterial.GOLD_INGOT.isSimilar(((Item) entity).getItemStack())) {\n          return;\n        }\n      }\n    }\n    arena.getGoldSpawned().add(location.getWorld().dropItem(location, new ItemStack(Material.GOLD_INGOT, 1)));\n    getPlugin().getPowerupRegistry().spawnPowerup(location, arena);\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/arena/states/RestartingState.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.arena.states;\n\nimport plugily.projects.minigamesbox.classic.arena.PluginArena;\nimport plugily.projects.minigamesbox.classic.arena.states.PluginRestartingState;\nimport plugily.projects.murdermystery.arena.Arena;\n\n/**\n * @author Plajer\n * <p>\n * Created at 03.06.2019\n */\npublic class RestartingState extends PluginRestartingState {\n\n  @Override\n  public void handleCall(PluginArena arena) {\n    super.handleCall(arena);\n    Arena pluginArena = (Arena) getPlugin().getArenaRegistry().getArena(arena.getId());\n    if(pluginArena == null) {\n      return;\n    }\n    if(arena.getTimer() <= 0) {\n      if(pluginArena.isGoldVisuals()) {\n        pluginArena.startGoldVisuals();\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/arena/states/StartingState.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.arena.states;\n\nimport org.bukkit.Bukkit;\nimport org.bukkit.GameMode;\nimport org.bukkit.Material;\nimport org.bukkit.entity.Player;\nimport org.bukkit.inventory.ItemStack;\nimport plugily.projects.minigamesbox.api.user.IUser;\nimport plugily.projects.minigamesbox.classic.arena.PluginArena;\nimport plugily.projects.minigamesbox.classic.arena.states.PluginStartingState;\nimport plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;\nimport plugily.projects.minigamesbox.classic.handlers.language.TitleBuilder;\nimport plugily.projects.minigamesbox.classic.utils.actionbar.ActionBar;\nimport plugily.projects.minigamesbox.classic.utils.version.VersionUtils;\nimport plugily.projects.murdermystery.arena.Arena;\nimport plugily.projects.murdermystery.arena.ArenaUtils;\nimport plugily.projects.murdermystery.arena.role.Role;\nimport plugily.projects.murdermystery.arena.special.pray.PrayerRegistry;\nimport plugily.projects.murdermystery.utils.ItemPosition;\n\nimport java.util.*;\nimport java.util.stream.Collectors;\n\n/**\n * @author Plajer\n * <p>Created at 03.06.2019\n */\npublic class StartingState extends PluginStartingState {\n\n  int maxmurderer = 1;\n  int maxdetectives = 1;\n\n  @Override\n  public void handleCall(PluginArena arena) {\n    super.handleCall(arena);\n    Arena pluginArena = (Arena) getPlugin().getArenaRegistry().getArena(arena.getId());\n    if(pluginArena == null) {\n      return;\n    }\n\n    if(!pluginArena.isHideChances()) {\n      for(Player player : arena.getPlayersLeft()) {\n        pluginArena.getPlugin().getActionBarManager().addActionBar(player, new ActionBar((new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_ROLE_CHANCES_ACTION_BAR\")).asKey().player(player).arena(pluginArena), ActionBar.ActionBarType.DISPLAY));\n      }\n    }\n\n    if(arena.getTimer() == 0 || arena.isForceStart()) {\n      int size = pluginArena.getPlayerSpawnPoints().size();\n      for(Player player : arena.getPlayersLeft()) {\n        VersionUtils.teleport(player, pluginArena.getPlayerSpawnPoints().get(getPlugin().getRandom().nextInt(size)));\n        IUser user = arena.getPlugin().getUserManager().getUser(player);\n        user.resetNonePersistentStatistics();\n        PrayerRegistry.getRush().remove(player);\n        PrayerRegistry.getBan().remove(player);\n        ArenaUtils.updateNameTagsVisibility(player);\n        player.setGameMode(GameMode.ADVENTURE);\n        getPlugin().getActionBarManager().clearActionBarsFromPlayer(player);\n      }\n\n      Set<Player> playersToSet = new HashSet<>(arena.getPlayersLeft());\n\n      getMaxRolesToSet(pluginArena);\n\n      addRole(pluginArena, Role.MURDERER, playersToSet);\n      addRole(pluginArena, Role.DETECTIVE, playersToSet);\n\n      for(Player player : playersToSet) {\n        new TitleBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_ROLE_INNOCENT\").asKey().player(player).arena(pluginArena).sendPlayer();\n      }\n\n      arena.getPlugin().getDebugger().debug(\"After: Arena: {0} | Detectives = {1}, Murders = {2}, Players = {3} | Players: Detectives = {4}, Murders = {5}\", arena.getId(), maxdetectives, maxmurderer, arena.getPlayersLeft().size(), pluginArena.getDetectiveList(), pluginArena.getMurdererList());\n\n      // Load and append special blocks hologram\n      pluginArena.getSpecialBlocks().forEach(pluginArena::loadSpecialBlock);\n    }\n  }\n\n  private void addRole(Arena arena, Role role, Set<Player> playersToSet) {\n    String roleName = role.toString();\n\n    List<IUser> chancesRanking = getPlugin().getUserManager().getUsers(arena).stream().filter(user -> playersToSet.contains(user.getPlayer())).sorted(Comparator.comparingInt(user -> arena.getContributorValue(role, user))).collect(Collectors.toList());\n    Collections.reverse(chancesRanking);\n    List<Player> chancesPlayer = new ArrayList<>();\n    for(IUser user : chancesRanking) {\n      chancesPlayer.add(user.getPlayer());\n    }\n    getPlugin().getDebugger().debug(\"Arena {0} | Role add {1} | List {2}\", arena.getId(), roleName, chancesPlayer);\n\n    int amount = role == Role.MURDERER ? maxmurderer : maxdetectives;\n    for(int i = 0; i < amount; i++) {\n      IUser user = chancesRanking.get(i);\n      Player userPlayer = user.getPlayer();\n      arena.setCharacter(role, userPlayer);\n      arena.resetContributorValue(role, user);\n      playersToSet.remove(userPlayer);\n      new TitleBuilder(\"IN_GAME_MESSAGES_ARENA_PLAYING_ROLE_\" + roleName).asKey().arena(arena).player(userPlayer).sendPlayer();\n      if(role == Role.MURDERER) {\n        arena.getMurdererList().add(userPlayer);\n      } else if(role == Role.DETECTIVE) {\n        arena.getDetectiveList().add(userPlayer);\n        userPlayer.getInventory().setHeldItemSlot(0);\n        Bukkit.getScheduler().runTaskLater(arena.getPlugin(), () -> {\n          ItemPosition.setItem(user, ItemPosition.BOW, new ItemStack(Material.BOW, 1));\n          ItemPosition.setItem(user, ItemPosition.INFINITE_ARROWS, new ItemStack(Material.ARROW, getPlugin().getConfig().getInt(\"Bow.Amount.Arrows.Detective\", 3)));\n        }, 20);\n      }\n    }\n  }\n\n  private void getMaxRolesToSet(Arena arena) {\n    int playersSize = arena.getPlayersLeft().size();\n    arena.getPlugin().getDebugger().debug(\"Before: Arena: {0} | Detectives = {1}, Murders = {2}, Players = {3} | Configured: Detectives = {4}, Murders = {5}\", arena.getId(), maxdetectives, maxmurderer, playersSize, arena.getArenaOption(\"DETECTIVE_DIVIDER\"), arena.getArenaOption(\"MURDERER_DIVIDER\"));\n    if(arena.getArenaOption(\"MURDERER_DIVIDER\") > 1 && playersSize > arena.getArenaOption(\"MURDERER_DIVIDER\")) {\n      maxmurderer = (playersSize / arena.getArenaOption(\"MURDERER_DIVIDER\"));\n    }\n    if(arena.getArenaOption(\"DETECTIVE_DIVIDER\") > 1 && playersSize > arena.getArenaOption(\"DETECTIVE_DIVIDER\")) {\n      maxdetectives = (playersSize / arena.getArenaOption(\"DETECTIVE_DIVIDER\"));\n    }\n    if(playersSize - (maxmurderer + maxdetectives) < 1) {\n      arena.getPlugin().getDebugger().debug(\"{0} Murderers and detectives amount was reduced because there are not enough players\", arena.getId());\n      // Make sure to have one innocent!\n      if(maxdetectives > 1) {\n        maxdetectives--;\n      } else if(maxmurderer > 1) {\n        maxmurderer--;\n      }\n    }\n    arena.getPlugin().getDebugger().debug(\"After: Arena: {0} | Detectives = {1}, Murders = {2}, Players = {3} | Configured: Detectives = {4}, Murders = {5}\", arena.getId(), maxdetectives, maxmurderer, playersSize, arena.getArenaOption(\"DETECTIVE_DIVIDER\"), arena.getArenaOption(\"MURDERER_DIVIDER\"));\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/arena/states/WaitingState.java",
    "content": "package plugily.projects.murdermystery.arena.states;\n\nimport org.bukkit.configuration.file.FileConfiguration;\nimport plugily.projects.minigamesbox.classic.arena.PluginArena;\nimport plugily.projects.minigamesbox.classic.arena.states.PluginWaitingState;\nimport plugily.projects.minigamesbox.classic.utils.configuration.ConfigUtils;\nimport plugily.projects.murdermystery.arena.Arena;\n\npublic class WaitingState extends PluginWaitingState {\n\n  @Override\n  public void handleCall(PluginArena arena) {\n    super.handleCall(arena);\n    Arena pluginArena = (Arena) getPlugin().getArenaRegistry().getArena(arena.getId());\n    if(pluginArena == null) {\n      return;\n    }\n    if(arena.getTimer() <= 0) {\n      FileConfiguration config =\n        ConfigUtils.getConfig(getPlugin(), \"arenas\");\n      pluginArena.setGoldVisuals(config.getBoolean(pluginArena.getId() + \".goldvisuals\"));\n    }\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/boot/AdditionalValueInitializer.java",
    "content": "package plugily.projects.murdermystery.boot;\n\nimport plugily.projects.minigamesbox.api.preferences.IConfigPreferences;\nimport plugily.projects.minigamesbox.classic.api.StatisticType;\nimport plugily.projects.minigamesbox.classic.api.StatsStorage;\nimport plugily.projects.minigamesbox.classic.arena.options.ArenaOption;\nimport plugily.projects.minigamesbox.classic.arena.options.ArenaOptionManager;\nimport plugily.projects.minigamesbox.classic.handlers.items.SpecialItemManager;\nimport plugily.projects.minigamesbox.classic.handlers.permissions.PermissionCategory;\nimport plugily.projects.minigamesbox.classic.handlers.permissions.PermissionsManager;\nimport plugily.projects.minigamesbox.classic.handlers.reward.RewardType;\nimport plugily.projects.minigamesbox.classic.handlers.reward.RewardsFactory;\nimport plugily.projects.minigamesbox.classic.preferences.ConfigOption;\nimport plugily.projects.murdermystery.Main;\n\n/**\n * @author Tigerpanzer_02\n * <p>\n * Created at 15.10.2022\n */\npublic class AdditionalValueInitializer {\n\n  private final Main plugin;\n\n  public AdditionalValueInitializer(Main plugin) {\n    this.plugin = plugin;\n    registerConfigOptions();\n    registerStatistics();\n    registerPermission();\n    registerRewards();\n    registerSpecialItems();\n    registerArenaOptions();\n  }\n\n  private void registerConfigOptions() {\n    getConfigPreferences().registerOption(\"CORPSES_INTEGRATION_OVERWRITE\", new ConfigOption(\"Corpses.Integration-Overwrite\", true));\n    getConfigPreferences().registerOption(\"BOW_KILL_DETECTIVE\", new ConfigOption(\"Bow.Kill-Detective\", true));\n    getConfigPreferences().registerOption(\"HIDE_DEATH\", new ConfigOption(\"Hide.Death\", false));\n    getConfigPreferences().registerOption(\"HIDE_NAMETAGS\", new ConfigOption(\"Hide.Nametags\", false));\n    getConfigPreferences().registerOption(\"GOLD_SPAWNER_MODE_ALL\", new ConfigOption(\"Gold.Spawner-Mode\", false));\n    getConfigPreferences().registerOption(\"GOLD_LIMITER\", new ConfigOption(\"Gold.Limiter\", false));\n    getConfigPreferences().registerOption(\"GOLD_MULTIPLE\", new ConfigOption(\"Gold.Multiple\", false));\n    getConfigPreferences().registerOption(\"MURDERER_LOCATOR\", new ConfigOption(\"Murderer.Locator\", true));\n  }\n\n  private void registerStatistics() {\n    getStatsStorage().registerStatistic(\"KILLS\", new StatisticType(\"kills\", true, \"int(11) NOT NULL DEFAULT '0'\"));\n    getStatsStorage().registerStatistic(\"DEATHS\", new StatisticType(\"deaths\", true, \"int(11) NOT NULL DEFAULT '0'\"));\n    getStatsStorage().registerStatistic(\"HIGHEST_SCORE\", new StatisticType(\"highest_score\", true, \"int(11) NOT NULL DEFAULT '0'\"));\n    getStatsStorage().registerStatistic(\"CONTRIBUTION_DETECTIVE\", new StatisticType(\"contribution_detective\", true, \"int(11) NOT NULL DEFAULT '0'\"));\n    getStatsStorage().registerStatistic(\"CONTRIBUTION_MURDERER\", new StatisticType(\"contribution_murderer\", true, \"int(11) NOT NULL DEFAULT '0'\"));\n    getStatsStorage().registerStatistic(\"PASS_MURDERER\", new StatisticType(\"pass_murderer\", true, \"int(11) NOT NULL DEFAULT '0'\"));\n    getStatsStorage().registerStatistic(\"PASS_DETECTIVE\", new StatisticType(\"pass_detective\", true, \"int(11) NOT NULL DEFAULT '0'\"));\n    getStatsStorage().registerStatistic(\"LOCAL_PRAISES\", new StatisticType(\"local_praises\", false, \"int(11) NOT NULL DEFAULT '0'\"));\n    getStatsStorage().registerStatistic(\"LOCAL_SCORE\", new StatisticType(\"local_score\", false, \"int(11) NOT NULL DEFAULT '0'\"));\n    getStatsStorage().registerStatistic(\"LOCAL_PRAY\", new StatisticType(\"local_pray\", false, \"int(11) NOT NULL DEFAULT '0'\"));\n    getStatsStorage().registerStatistic(\"LOCAL_GOLD\", new StatisticType(\"local_gold\", false, \"int(11) NOT NULL DEFAULT '0'\"));\n    getStatsStorage().registerStatistic(\"LOCAL_KILLS\", new StatisticType(\"local_kills\", false, \"int(11) NOT NULL DEFAULT '0'\"));\n    getStatsStorage().registerStatistic(\"LOCAL_CURRENT_PRAY\", new StatisticType(\"local_current_pray\", false, \"int(11) NOT NULL DEFAULT '0'\"));\n  }\n\n  private void registerPermission() {\n    getPermissionsManager().registerPermissionCategory(\"CHANCES_BOOSTER\", new PermissionCategory(\"Chances-Boost\", null));\n    getPermissionsManager().registerPermissionCategory(\"MURDERER_BOOSTER\", new PermissionCategory(\"Murderer-Boost\", null));\n    getPermissionsManager().registerPermissionCategory(\"DETECTIVE_BOOSTER\", new PermissionCategory(\"Detective-Boost\", null));\n  }\n\n  private void registerRewards() {\n    getRewardsHandler().registerRewardType(\"KILL_DETECTIVE\", new RewardType(\"detective-kill\"));\n    getRewardsHandler().registerRewardType(\"KILL_MURDERER\", new RewardType(\"murderer-kill\"));\n    getRewardsHandler().registerRewardType(\"WIN\", new RewardType(\"win\"));\n    getRewardsHandler().registerRewardType(\"LOSE\", new RewardType(\"lose\"));\n    getRewardsHandler().registerRewardType(\"PLAYER_DEATH\", new RewardType(\"player-death\"));\n    getRewardsHandler().registerRewardType(\"GOLD_PICKUP\", new RewardType(\"gold-pickup\"));\n  }\n\n  private void registerSpecialItems() {\n    getSpecialItemManager().registerSpecialItem(\"ROLE_PASS\", \"Role-Pass\");\n  }\n\n  private void registerArenaOptions() {\n    getArenaOptionManager().registerArenaOption(\"DETECTIVE_DIVIDER\", new ArenaOption(\"playerperdetective\", 1));\n    getArenaOptionManager().registerArenaOption(\"MURDERER_DIVIDER\", new ArenaOption(\"playerpermurderer\", 1));\n  }\n\n  private IConfigPreferences getConfigPreferences() {\n    return plugin.getConfigPreferences();\n  }\n\n  private StatsStorage getStatsStorage() {\n    return plugin.getStatsStorage();\n  }\n\n  private PermissionsManager getPermissionsManager() {\n    return plugin.getPermissionsManager();\n  }\n\n  private RewardsFactory getRewardsHandler() {\n    return plugin.getRewardsHandler();\n  }\n\n  private SpecialItemManager getSpecialItemManager() {\n    return plugin.getSpecialItemManager();\n  }\n\n  private ArenaOptionManager getArenaOptionManager() {\n    return plugin.getArenaOptionManager();\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/boot/MessageInitializer.java",
    "content": "\npackage plugily.projects.murdermystery.boot;\n\n\nimport plugily.projects.minigamesbox.classic.handlers.language.Message;\nimport plugily.projects.minigamesbox.classic.handlers.language.MessageManager;\nimport plugily.projects.minigamesbox.classic.utils.services.locale.Locale;\nimport plugily.projects.minigamesbox.classic.utils.services.locale.LocaleRegistry;\nimport plugily.projects.murdermystery.Main;\n\nimport java.util.Arrays;\n\n/**\n * @author Tigerpanzer_02\n * <p>\n * Created at 15.10.2022\n */\npublic class MessageInitializer {\n  private final Main plugin;\n\n  public MessageInitializer(Main plugin) {\n    this.plugin = plugin;\n  }\n\n  public void registerMessages() {\n    getMessageManager().registerMessage(\"\", new Message(\"\", \"\"));\n    getMessageManager().registerMessage(\"SCOREBOARD_ROLES_DETECTIVE\", new Message(\"Scoreboard.Roles.Detective\", \"\"));\n    getMessageManager().registerMessage(\"SCOREBOARD_ROLES_MURDERER\", new Message(\"Scoreboard.Roles.Murderer\", \"\"));\n    getMessageManager().registerMessage(\"SCOREBOARD_ROLES_INNOCENT\", new Message(\"Scoreboard.Roles.Innocent\", \"\"));\n    getMessageManager().registerMessage(\"SCOREBOARD_ROLES_DEAD\", new Message(\"Scoreboard.Roles.Dead\", \"\"));\n    getMessageManager().registerMessage(\"SCOREBOARD_DETECTIVE_ALIVE\", new Message(\"Scoreboard.Detective.Alive\", \"\"));\n    getMessageManager().registerMessage(\"SCOREBOARD_DETECTIVE_BOW_DROPPED\", new Message(\"Scoreboard.Detective.Bow.Dropped\", \"\"));\n    getMessageManager().registerMessage(\"SCOREBOARD_DETECTIVE_BOW_PICKED\", new Message(\"Scoreboard.Detective.Bow.Picked\", \"\"));\n\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_GAME_END_PLACEHOLDERS_MURDERER_STOPPED\", new Message(\"In-Game.Messages.Game-End.Placeholders.Murderer.Stopped\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_GAME_END_PLACEHOLDERS_MURDERER_KILLED_YOU\", new Message(\"In-Game.Messages.Game-End.Placeholders.Murderer.Killed.You\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_GAME_END_PLACEHOLDERS_MURDERER_KILLED_ALL\", new Message(\"In-Game.Messages.Game-End.Placeholders.Murderer.Killed.All\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_GAME_END_PLACEHOLDERS_INNOCENT_KILLED_YOU\", new Message(\"In-Game.Messages.Game-End.Placeholders.Innocent.Killed.You\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_GAME_END_PLACEHOLDERS_INNOCENT_KILLED_WRONGLY\", new Message(\"In-Game.Messages.Game-End.Placeholders.Innocent.Killed.All\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_GAME_END_PLACEHOLDERS_NOBODY\", new Message(\"In-Game.Messages.Game-End.Placeholders.Nobody\", \"\"));\n\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_ROLE_CHANCES_ACTION_BAR\", new Message(\"In-Game.Messages.Arena.Chances.Action-Bar\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_COOLDOWN\", new Message(\"In-Game.Messages.Arena.Cooldown\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_LOCATOR_BOW\", new Message(\"In-Game.Messages.Arena.Locator.Bow\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_LOCATOR_INNOCENT\", new Message(\"In-Game.Messages.Arena.Locator.Innocent\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_LOCATOR_WATCH_OUT\", new Message(\"In-Game.Messages.Arena.Locator.Watch-Out\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PASS_NAME\", new Message(\"In-Game.Messages.Arena.Pass.Name\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PASS_ROLE_MURDERER_NAME\", new Message(\"In-Game.Messages.Arena.Pass.Role.Murderer.Name\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PASS_ROLE_MURDERER_LORE\", new Message(\"In-Game.Messages.Arena.Pass.Role.Murderer.Lore\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PASS_ROLE_DETECTIVE_NAME\", new Message(\"In-Game.Messages.Arena.Pass.Role.Detective.Name\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PASS_ROLE_DETECTIVE_LORE\", new Message(\"In-Game.Messages.Arena.Pass.Role.Detective.Lore\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PASS_FAIL\", new Message(\"In-Game.Messages.Arena.Pass.Fail\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PASS_SUCCESS\", new Message(\"In-Game.Messages.Arena.Pass.Success\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PASS_CHANGE\", new Message(\"In-Game.Messages.Arena.Pass.Change\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_TIME_LEFT\", new Message(\"In-Game.Messages.Arena.Playing.Time-Left\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_ROLE_CHANGE\", new Message(\"In-Game.Messages.Arena.Playing.Role.Change\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_ROLE_MURDERER\", new Message(\"In-Game.Messages.Arena.Playing.Role.Murderer\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_ROLE_DETECTIVE\", new Message(\"In-Game.Messages.Arena.Playing.Role.Detective\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_ROLE_INNOCENT\", new Message(\"In-Game.Messages.Arena.Playing.Role.Innocent\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_BONUS\", new Message(\"In-Game.Messages.Arena.Playing.Score.Bonus\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_GOLD\", new Message(\"In-Game.Messages.Arena.Playing.Score.Gold\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_ACTION_KILL_PLAYER\", new Message(\"In-Game.Messages.Arena.Playing.Score.Action.Kill.Player\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_ACTION_KILL_MURDERER\", new Message(\"In-Game.Messages.Arena.Playing.Score.Action.Kill.Murderer\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_ACTION_KILL_INNOCENT\", new Message(\"In-Game.Messages.Arena.Playing.Score.Action.Kill.Innocent\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_ACTION_PICKUP_GOLD\", new Message(\"In-Game.Messages.Arena.Playing.Score.Action.Pickup.Gold\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_ACTION_SURVIVING_TIME\", new Message(\"In-Game.Messages.Arena.Playing.Score.Action.Surviving.Time\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_ACTION_SURVIVING_END\", new Message(\"In-Game.Messages.Arena.Playing.Score.Action.Surviving.End\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_ACTION_WIN\", new Message(\"In-Game.Messages.Arena.Playing.Score.Action.Win\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SCORE_ACTION_DETECTIVE\", new Message(\"In-Game.Messages.Arena.Playing.Score.Action.Detective\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SWORD_SOON\", new Message(\"In-Game.Messages.Arena.Playing.Sword.Soon\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_CAULDRON_POTION\", new Message(\"In-Game.Messages.Arena.Playing.Special-Blocks.Cauldron.Potion\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_CAULDRON_HOLOGRAM\", new Message(\"In-Game.Messages.Arena.Playing.Special-Blocks.Cauldron.Hologram\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_NOT_ENOUGH_GOLD\", new Message(\"In-Game.Messages.Arena.Playing.Special-Blocks.Not-Enough-Gold\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_HOLOGRAM\", new Message(\"In-Game.Messages.Arena.Playing.Special-Blocks.Pray.Hologram\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_CHAT\", new Message(\"In-Game.Messages.Arena.Playing.Special-Blocks.Pray.Chat\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_PAY\", new Message(\"In-Game.Messages.Arena.Playing.Special-Blocks.Pray.Pay\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_PRAISE_HEARD\", new Message(\"In-Game.Messages.Arena.Playing.Special-Blocks.Pray.Praise.Heard\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_PRAISE_FEELING_BLESSED\", new Message(\"In-Game.Messages.Arena.Playing.Special-Blocks.Pray.Praise.Feeling.Blessed\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_PRAISE_FEELING_CURSED\", new Message(\"In-Game.Messages.Arena.Playing.Special-Blocks.Pray.Praise.Feeling.Cursed\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_PRAISE_GIFTS_DETECTIVE_REVELATION\", new Message(\"In-Game.Messages.Arena.Playing.Special-Blocks.Pray.Praise.Gifts.Detective-Revelation\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_PRAISE_GIFTS_GOLD_RUSH\", new Message(\"In-Game.Messages.Arena.Playing.Special-Blocks.Pray.Praise.Gifts.Gold-Rush\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_PRAISE_GIFTS_SINGLE_COMPENSATION\", new Message(\"In-Game.Messages.Arena.Playing.Special-Blocks.Pray.Praise.Gifts.Single-Compensation\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_PRAISE_GIFTS_BOW\", new Message(\"In-Game.Messages.Arena.Playing.Special-Blocks.Pray.Praise.Gifts.Bow\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_PRAISE_CURSES_SLOWNESS\", new Message(\"In-Game.Messages.Arena.Playing.Special-Blocks.Pray.Praise.Curses.Slowness\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_PRAISE_CURSES_BLINDNESS\", new Message(\"In-Game.Messages.Arena.Playing.Special-Blocks.Pray.Praise.Curses.Blindness\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_PRAISE_CURSES_GOLD\", new Message(\"In-Game.Messages.Arena.Playing.Special-Blocks.Pray.Praise.Curses.Gold\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_SPECIAL_BLOCKS_PRAY_PRAISE_CURSES_DEATH\", new Message(\"In-Game.Messages.Arena.Playing.Special-Blocks.Pray.Praise.Curses.Death\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_BOW_DROPPED\", new Message(\"In-Game.Messages.Arena.Playing.Bow.Dropped\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_BOW_PICKUP\", new Message(\"In-Game.Messages.Arena.Playing.Bow.Pickup\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_BOW_SHOT_GOLD\", new Message(\"In-Game.Messages.Arena.Playing.Bow.Shot.Gold\", \"\"));\n    getMessageManager().registerMessage(\"IN_GAME_MESSAGES_ARENA_PLAYING_BOW_SHOT_TITLE\", new Message(\"In-Game.Messages.Arena.Playing.Bow.Shot.Title\", \"\"));\n    getMessageManager().registerMessage(\"LEADERBOARD_STATISTICS_CONTRIBUTION_DETECTIVE\", new Message(\"Leaderboard.Statistics.Detective-Contribution\", \"\"));\n    getMessageManager().registerMessage(\"LEADERBOARD_STATISTICS_CONTRIBUTION_MURDERER\", new Message(\"Leaderboard.Statistics.Murderer-Contribution\", \"\"));\n\n    getMessageManager().registerMessage(\"LEADERBOARD_STATISTICS_PASS_DETECTIVE\", new Message(\"Leaderboard.Statistics.Detective-Pass\", \"\"));\n    getMessageManager().registerMessage(\"LEADERBOARD_STATISTICS_PASS_MURDERER\", new Message(\"Leaderboard.Statistics.Murderer-Pass\", \"\"));\n    getMessageManager().registerMessage(\"LEADERBOARD_STATISTICS_KILLS\", new Message(\"Leaderboard.Statistics.Kills\", \"\"));\n    getMessageManager().registerMessage(\"LEADERBOARD_STATISTICS_DEATHS\", new Message(\"Leaderboard.Statistics.Deaths\", \"\"));\n    getMessageManager().registerMessage(\"LEADERBOARD_STATISTICS_HIGHEST_SCORE\", new Message(\"Leaderboard.Statistics.Highest-Score\", \"\"));\n  }\n\n  private MessageManager getMessageManager() {\n    return plugin.getMessageManager();\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/boot/PlaceholderInitializer.java",
    "content": "\npackage plugily.projects.murdermystery.boot;\n\nimport org.bukkit.ChatColor;\nimport org.bukkit.entity.Player;\nimport org.jetbrains.annotations.Nullable;\nimport plugily.projects.minigamesbox.api.arena.IPluginArena;\nimport plugily.projects.minigamesbox.api.user.IUser;\nimport plugily.projects.minigamesbox.api.user.IUserManager;\nimport plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;\nimport plugily.projects.minigamesbox.classic.handlers.placeholder.Placeholder;\nimport plugily.projects.minigamesbox.classic.handlers.placeholder.PlaceholderManager;\nimport plugily.projects.minigamesbox.number.NumberUtils;\nimport plugily.projects.murdermystery.Main;\nimport plugily.projects.murdermystery.arena.Arena;\nimport plugily.projects.murdermystery.arena.ArenaRegistry;\nimport plugily.projects.murdermystery.arena.role.Role;\n\n/**\n * @author Tigerpanzer_02\n * <p>\n * Created at 15.10.2022\n */\npublic class PlaceholderInitializer {\n\n  private final Main plugin;\n\n  public PlaceholderInitializer(Main plugin) {\n    this.plugin = plugin;\n    registerPlaceholders();\n  }\n\n  private void registerPlaceholders() {\n    getPlaceholderManager().registerPlaceholder(new Placeholder(\"detective_list\", Placeholder.PlaceholderType.ARENA, Placeholder.PlaceholderExecutor.ALL) {\n      @Override\n      public String getValue(Player player, IPluginArena arena) {\n        Arena pluginArena = getArenaRegistry().getArena(arena.getId());\n        if(pluginArena == null) {\n          return null;\n        }\n\n        StringBuilder detectives = new StringBuilder();\n        for(Player p : pluginArena.getDetectiveList()) {\n          detectives.append(p.getName()).append(\", \");\n        }\n\n        int index = detectives.length() - 2;\n        if(index > 0 && index < detectives.length()) {\n          detectives.deleteCharAt(index);\n        }\n\n        return (pluginArena.isDetectiveDead() ? ChatColor.STRIKETHROUGH : \"\")\n            + detectives.toString();\n      }\n    });\n\n    getPlaceholderManager().registerPlaceholder(new Placeholder(\"murderer_list\", Placeholder.PlaceholderType.ARENA, Placeholder.PlaceholderExecutor.ALL) {\n      @Override\n      public String getValue(Player player, IPluginArena arena) {\n        Arena pluginArena = getArenaRegistry().getArena(arena.getId());\n        if(pluginArena == null) {\n          return null;\n        }\n\n        StringBuilder murders = new StringBuilder();\n        for(Player p : pluginArena.getMurdererList()) {\n          IUser user = getUserManager().getUser(p);\n          int localKills = user.getStatistic(\"LOCAL_KILLS\");\n          murders.append(p.getName());\n          if(pluginArena.getMurdererList().size() > 1) {\n            murders.append(\" (\").append(localKills).append(\"), \");\n          }\n        }\n        if(pluginArena.getMurdererList().size() > 1) {\n          murders.deleteCharAt(murders.length() - 2);\n        }\n\n        return (pluginArena.aliveMurderer() == 1 ? \"\" : ChatColor.STRIKETHROUGH)\n            + murders.toString();\n      }\n    });\n\n    getPlaceholderManager().registerPlaceholder(new Placeholder(\"murderer_kills\", Placeholder.PlaceholderType.ARENA, Placeholder.PlaceholderExecutor.ALL) {\n      @Override\n      public String getValue(Player player, IPluginArena arena) {\n        Arena pluginArena = getArenaRegistry().getArena(arena.getId());\n        if(pluginArena == null) {\n          return null;\n        }\n        int murdererKills = 0;\n        for(Player p : pluginArena.getMurdererList()) {\n          IUser user = getUserManager().getUser(p);\n          int localKills = user.getStatistic(\"LOCAL_KILLS\");\n          murdererKills += localKills;\n        }\n        return Integer.toString(murdererKills);\n      }\n    });\n\n    getPlaceholderManager().registerPlaceholder(new Placeholder(\"hero\", Placeholder.PlaceholderType.ARENA, Placeholder.PlaceholderExecutor.ALL) {\n      @Override\n      public String getValue(Player player, IPluginArena arena) {\n        Arena pluginArena = getArenaRegistry().getArena(arena.getId());\n        if(pluginArena == null) {\n          return null;\n        }\n        Player hero = pluginArena.getCharacter(Arena.CharacterType.HERO);\n        return hero != null ? hero.getName() : new MessageBuilder(\"IN_GAME_MESSAGES_GAME_END_PLACEHOLDERS_NOBODY\").asKey().build();\n      }\n    });\n\n    getPlaceholderManager().registerPlaceholder(new Placeholder(\"murderer_chance\", Placeholder.PlaceholderType.ARENA, Placeholder.PlaceholderExecutor.ALL) {\n      @Override\n      public String getValue(Player player, IPluginArena arena) {\n        Arena pluginArena = getArenaRegistry().getArena(arena.getId());\n        if(pluginArena == null) {\n          return null;\n        }\n\n        IUser user = getUserManager().getUser(player);\n        return NumberUtils.round(((double) pluginArena.getContributorValue(Role.MURDERER, user) / (double) pluginArena.getTotalRoleChances(Role.MURDERER)) * 100.0, 0) + \"%\";\n      }\n    });\n\n    getPlaceholderManager().registerPlaceholder(new Placeholder(\"detective_chance\", Placeholder.PlaceholderType.ARENA, Placeholder.PlaceholderExecutor.ALL) {\n      @Override\n      public String getValue(Player player, IPluginArena arena) {\n        Arena pluginArena = getArenaRegistry().getArena(arena.getId());\n        if(pluginArena == null) {\n          return null;\n        }\n\n        IUser user = getUserManager().getUser(player);\n        return NumberUtils.round(((double) pluginArena.getContributorValue(Role.DETECTIVE, user) / (double) pluginArena.getTotalRoleChances(Role.DETECTIVE)) * 100.0, 0) + \"%\";\n      }\n    });\n\n    getPlaceholderManager().registerPlaceholder(new Placeholder(\"detective_status\", Placeholder.PlaceholderType.ARENA, Placeholder.PlaceholderExecutor.ALL) {\n      @Override\n      public String getValue(Player player, IPluginArena arena) {\n        Arena pluginArena = getArenaRegistry().getArena(arena.getId());\n        if(pluginArena == null) {\n          return null;\n        }\n\n        if(pluginArena.isDetectiveDead()) {\n          if(!pluginArena.isCharacterSet(Arena.CharacterType.FAKE_DETECTIVE)) {\n            return new MessageBuilder(\"SCOREBOARD_DETECTIVE_BOW_DROPPED\").asKey().build();\n          } else {\n            return new MessageBuilder(\"SCOREBOARD_DETECTIVE_BOW_PICKED\").asKey().build();\n          }\n        } else {\n          return new MessageBuilder(\"SCOREBOARD_DETECTIVE_ALIVE\").asKey().build();\n        }\n      }\n    });\n\n    getPlaceholderManager().registerPlaceholder(new Placeholder(\"innocent_size\", Placeholder.PlaceholderType.ARENA, Placeholder.PlaceholderExecutor.ALL) {\n      @Override\n      public String getValue(Player player, IPluginArena arena) {\n        Arena pluginArena = getArenaRegistry().getArena(arena.getId());\n        if(pluginArena == null) {\n          return null;\n        }\n        int innocents = 0;\n        for(Player p : arena.getPlayersLeft()) {\n          if(!Role.isRole(Role.MURDERER, getUserManager().getUser(p))) {\n            innocents++;\n          }\n        }\n        return Integer.toString(innocents);\n      }\n    });\n\n    getPlaceholderManager().registerPlaceholder(new Placeholder(\"player_role\", Placeholder.PlaceholderType.ARENA, Placeholder.PlaceholderExecutor.ALL) {\n      @Override\n      public String getValue(Player player, IPluginArena arena) {\n        Arena pluginArena = getArenaRegistry().getArena(arena.getId());\n        if(pluginArena == null) {\n          return null;\n        }\n        IUser user = getUserManager().getUser(player);\n        String role;\n        if(pluginArena.isDeathPlayer(player)) {\n          role = new MessageBuilder(\"SCOREBOARD_ROLES_DEAD\").asKey().build();\n        } else if(Role.isRole(Role.MURDERER, user, arena)) {\n          role = new MessageBuilder(\"SCOREBOARD_ROLES_MURDERER\").asKey().build();\n        } else if(Role.isRole(Role.ANY_DETECTIVE, user, arena)) {\n          role = new MessageBuilder(\"SCOREBOARD_ROLES_DETECTIVE\").asKey().build();\n        } else {\n          role = new MessageBuilder(\"SCOREBOARD_ROLES_INNOCENT\").asKey().build();\n        }\n        return role;\n      }\n    });\n\n    getPlaceholderManager().registerPlaceholder(new Placeholder(\"summary_player\", Placeholder.PlaceholderType.ARENA, Placeholder.PlaceholderExecutor.ALL) {\n      @Override\n      public String getValue(Player player, IPluginArena arena) {\n        return getSummary(player, arena);\n      }\n\n      @Nullable\n      private String getSummary(Player player, IPluginArena arena) {\n        Arena pluginArena = getArenaRegistry().getArena(arena.getId());\n        if(pluginArena == null) {\n          return null;\n        }\n        String summaryEnding;\n\n        if(pluginArena.getMurdererList().containsAll(pluginArena.getPlayersLeft())\n            && pluginArena.getMurdererList().contains(player)) {\n          summaryEnding = new MessageBuilder(\"IN_GAME_MESSAGES_GAME_END_PLACEHOLDERS_WIN\").asKey().arena(pluginArena).build();\n        } else if(!pluginArena.getMurdererList().containsAll(pluginArena.getPlayersLeft())\n            && !pluginArena.getMurdererList().contains(player)) {\n          summaryEnding = new MessageBuilder(\"IN_GAME_MESSAGES_GAME_END_PLACEHOLDERS_WIN\").asKey().arena(pluginArena).build();\n        } else {\n          summaryEnding = new MessageBuilder(\"IN_GAME_MESSAGES_GAME_END_PLACEHOLDERS_LOSE\").asKey().arena(pluginArena).build();\n        }\n        return summaryEnding;\n      }\n    });\n    getPlaceholderManager().registerPlaceholder(new Placeholder(\"summary\", Placeholder.PlaceholderType.ARENA, Placeholder.PlaceholderExecutor.ALL) {\n      @Override\n      public String getValue(Player player, IPluginArena arena) {\n        return getSummary(arena);\n      }\n\n      @Override\n      public String getValue(IPluginArena arena) {\n        return getSummary(arena);\n      }\n\n      @Nullable\n      private String getSummary(IPluginArena arena) {\n        Arena pluginArena = getArenaRegistry().getArena(arena.getId());\n        if(pluginArena == null) {\n          return null;\n        }\n        String summaryEnding;\n\n        if(pluginArena.getMurdererList().containsAll(pluginArena.getPlayersLeft())) {\n          summaryEnding = new MessageBuilder(\"IN_GAME_MESSAGES_GAME_END_PLACEHOLDERS_MURDERER_KILLED_ALL\").asKey().arena(pluginArena).build();\n        } else {\n          summaryEnding = new MessageBuilder(\"IN_GAME_MESSAGES_GAME_END_PLACEHOLDERS_MURDERER_STOPPED\").asKey().arena(pluginArena).build();\n        }\n        return summaryEnding;\n      }\n    });\n  }\n\n  private PlaceholderManager getPlaceholderManager() {\n    return plugin.getPlaceholderManager();\n  }\n\n  private ArenaRegistry getArenaRegistry() {\n    return plugin.getArenaRegistry();\n  }\n\n  private IUserManager getUserManager() {\n    return plugin.getUserManager();\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/commands/arguments/ArgumentsRegistry.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.commands.arguments;\n\nimport plugily.projects.minigamesbox.classic.commands.arguments.PluginArgumentsRegistry;\nimport plugily.projects.murdermystery.Main;\nimport plugily.projects.murdermystery.commands.arguments.admin.RolePassArgument;\nimport plugily.projects.murdermystery.commands.arguments.admin.arena.SpecialBlockRemoverArgument;\nimport plugily.projects.murdermystery.commands.arguments.game.RoleSelectorArgument;\n\n/**\n * @author Plajer\n * <p>\n * Created at 11.01.2019\n */\npublic class ArgumentsRegistry extends PluginArgumentsRegistry {\n\n  public ArgumentsRegistry(Main plugin) {\n    super(plugin);\n    //register basic arugments\n    new RoleSelectorArgument(this);\n\n    //register admin related arguments\n    new SpecialBlockRemoverArgument(this);\n    new RolePassArgument(this);\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/commands/arguments/admin/RolePassArgument.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.commands.arguments.admin;\n\nimport org.bukkit.Bukkit;\nimport org.bukkit.ChatColor;\nimport org.bukkit.command.CommandSender;\nimport org.bukkit.entity.Player;\nimport plugily.projects.minigamesbox.api.user.IUser;\nimport plugily.projects.minigamesbox.classic.commands.arguments.data.CommandArgument;\nimport plugily.projects.minigamesbox.classic.commands.arguments.data.LabelData;\nimport plugily.projects.minigamesbox.classic.commands.arguments.data.LabeledCommandArgument;\nimport plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;\nimport plugily.projects.minigamesbox.number.NumberUtils;\nimport plugily.projects.murdermystery.arena.role.Role;\nimport plugily.projects.murdermystery.commands.arguments.ArgumentsRegistry;\n\n/**\n * @author Tigerpanzer_02\n * <p>\n * Created at 13.06.2021\n */\npublic class RolePassArgument {\n\n  public RolePassArgument(ArgumentsRegistry registry) {\n    registry.mapArgument(\"murdermysteryadmin\", new LabeledCommandArgument(\"rolepass\", \"murdermystery.admin.rolepass\", CommandArgument.ExecutorType.BOTH,\n        new LabelData(\"/mma rolepass <add/set/remove> <role> <amount> [player]\", \"/mma rolepass <add/remove> <amount> [player] \", \"&7Add or remove rolepass\\n&6Permission: &7murdermystery.admin.rolepass\")) {\n      @Override\n      public void execute(CommandSender sender, String[] args) {\n        if(args.length < 4) {\n          sender.sendMessage(ChatColor.RED + \"Command: /mma rolepass <add/set/remove> <role> <amount> [player]\");\n          return;\n        }\n        //add/remove\n        String addOrRemove = args[1];\n        if(!addOrRemove.equalsIgnoreCase(\"add\") && !addOrRemove.equalsIgnoreCase(\"remove\") && !addOrRemove.equalsIgnoreCase(\"set\")) {\n          sender.sendMessage(ChatColor.RED + \"Command: /mma rolepass <add/set/remove> <role> <amount> [player]\");\n          return;\n        }\n        String roleArg = args[2];\n        Role role = Role.MURDERER;\n        try {\n          role = Role.valueOf(roleArg.toUpperCase());\n        } catch(IllegalArgumentException exception) {\n          sender.sendMessage(ChatColor.RED + \"Command: /mma rolepass <add/set/remove> <role> <amount> [player]\");\n          return;\n        }\n        if(role != Role.MURDERER && role != Role.DETECTIVE) {\n          sender.sendMessage(ChatColor.RED + \"Command: /mma rolepass <add/set/remove> <role> <amount> [player]\");\n          return;\n        }\n        java.util.Optional<Integer> opt = NumberUtils.parseInt(args[3]);\n        if(!opt.isPresent()) {\n          sender.sendMessage(ChatColor.RED + \"Command: /mma rolepass <add/set/remove> <role> <amount> [player]\");\n          return;\n        }\n        int amount = opt.orElse(0);\n        //player\n        Player player = args.length == 5 ? Bukkit.getPlayerExact(args[4]) : (Player) sender;\n        if(player == null) {\n          new MessageBuilder(\"COMMANDS_PLAYER_NOT_FOUND\").asKey().send(sender);\n          return;\n        }\n        IUser user = registry.getPlugin().getUserManager().getUser(player);\n        switch(addOrRemove.toLowerCase()) {\n          case \"add\":\n            if(role == Role.MURDERER) {\n              user.adjustStatistic(\"PASS_MURDERER\", amount);\n            } else {\n              user.adjustStatistic(\"PASS_DETECTIVE\", amount);\n            }\n            break;\n          case \"remove\":\n            if(role == Role.MURDERER) {\n              user.adjustStatistic(\"PASS_MURDERER\", -amount);\n            } else {\n              user.adjustStatistic(\"PASS_DETECTIVE\", -amount);\n            }\n            break;\n          case \"set\":\n            if(role == Role.MURDERER) {\n              user.setStatistic(\"PASS_MURDERER\", amount);\n            } else {\n              user.setStatistic(\"PASS_DETECTIVE\", amount);\n            }\n            break;\n          default:\n            break;\n        }\n        if(role == Role.MURDERER) {\n          new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PASS_CHANGE\").asKey().player(player).integer(user.getStatistic(\"PASS_MURDERER\")).value(Role.MURDERER.name()).sendPlayer();\n        } else {\n          new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PASS_CHANGE\").asKey().player(player).integer(user.getStatistic(\"PASS_DETECTIVE\")).value(Role.DETECTIVE.name()).sendPlayer();\n        }\n      }\n    });\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/commands/arguments/admin/arena/SpecialBlockRemoverArgument.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.commands.arguments.admin.arena;\n\nimport org.bukkit.Material;\nimport org.bukkit.block.Block;\nimport org.bukkit.command.CommandSender;\nimport org.bukkit.configuration.file.FileConfiguration;\nimport org.bukkit.entity.Player;\nimport plugily.projects.minigamesbox.api.arena.IPluginArena;\nimport plugily.projects.minigamesbox.classic.commands.arguments.data.CommandArgument;\nimport plugily.projects.minigamesbox.classic.commands.arguments.data.LabelData;\nimport plugily.projects.minigamesbox.classic.commands.arguments.data.LabeledCommandArgument;\nimport plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;\nimport plugily.projects.minigamesbox.classic.utils.configuration.ConfigUtils;\nimport plugily.projects.minigamesbox.classic.utils.serialization.LocationSerializer;\nimport plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;\nimport plugily.projects.murdermystery.arena.Arena;\nimport plugily.projects.murdermystery.arena.special.SpecialBlock;\nimport plugily.projects.murdermystery.commands.arguments.ArgumentsRegistry;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n * @author Tigerpanzer_02\n * <p>Created at 22.10.2020\n */\npublic class SpecialBlockRemoverArgument {\n  public SpecialBlockRemoverArgument(ArgumentsRegistry registry) {\n    registry.mapArgument(\n      \"murdermysteryadmin\",\n      new LabeledCommandArgument(\n        \"removeblock\",\n        \"murdermystery.admin.removeblock\",\n        CommandArgument.ExecutorType.PLAYER,\n        new LabelData(\n          \"/mma removeblock\",\n          \"/mma removeblock\",\n          \"&7Removes the special block you are looking at \\n&6Permission: &7murdermystery.admin.removeblock\")) {\n        @Override\n        public void execute(CommandSender sender, String[] args) {\n          // no need for check as argument is only for players\n          Player player = (Player) sender;\n          Block targetBlock = player.getTargetBlock(null, 7);\n          if (targetBlock.getType() == Material.CAULDRON\n            || targetBlock.getType() == XMaterial.ENCHANTING_TABLE.parseMaterial()) {\n            for (IPluginArena arena : registry.getPlugin().getArenaRegistry().getArenas()) {\n\n              Arena pluginArena = (Arena) registry.getPlugin().getArenaRegistry().getArena(arena.getId());\n\n              // do not check arenas that could not be the case\n              if (pluginArena.getSpecialBlocks().isEmpty()) {\n                continue;\n              }\n              if (pluginArena.getPlayerSpawnPoints().get(0).getWorld() != player.getWorld()) {\n                continue;\n              }\n              // get all special blocks\n              for (SpecialBlock specialBlock : new ArrayList<>(pluginArena.getSpecialBlocks())) {\n                // check if targetBlock is specialblock\n                if (specialBlock.getLocation().getBlock().equals(targetBlock)) {\n                  // get special blocks from config\n                  FileConfiguration config =\n                    ConfigUtils.getConfig(registry.getPlugin(), \"arenas\");\n                  // remove special block from arena\n                  pluginArena.getSpecialBlocks().remove(specialBlock);\n                  // remove hologram\n                  if (specialBlock.getArmorStandHologram() != null) {\n                    specialBlock.getArmorStandHologram().delete();\n                  }\n                  // remove special block from arena file\n                  String path =\n                    targetBlock.getType() == Material.CAULDRON\n                      ? \".mystery-cauldrons\"\n                      : \".confessionals\";\n                  String serializedLoc =\n                    LocationSerializer.locationToString(specialBlock.getLocation());\n                  List<String> specialBlocksType =\n                    config.getStringList(\"instances.\" + arena.getId() + path);\n                  specialBlocksType.remove(serializedLoc);\n                  config.set(\"instances.\" + arena.getId() + path, specialBlocksType);\n                  // save arena config after removing special block\n                  ConfigUtils.saveConfig(registry.getPlugin(), config, \"arenas\");\n                  new MessageBuilder(\"&cRemoved special block at loc \"\n                    + serializedLoc\n                    + \" from arena \"\n                    + arena.getId()).player(player).sendPlayer();\n                  return;\n                }\n              }\n            }\n          }\n          new MessageBuilder(\"&cPlease target an special block to continue!\").player(player).sendPlayer();\n        }\n      });\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/commands/arguments/game/RoleSelectorArgument.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.commands.arguments.game;\n\nimport org.bukkit.command.CommandSender;\nimport org.bukkit.entity.Player;\nimport org.bukkit.event.Listener;\nimport plugily.projects.minigamesbox.api.user.IUser;\nimport plugily.projects.minigamesbox.classic.PluginMain;\nimport plugily.projects.minigamesbox.classic.commands.arguments.data.CommandArgument;\nimport plugily.projects.minigamesbox.classic.commands.arguments.data.LabelData;\nimport plugily.projects.minigamesbox.classic.commands.arguments.data.LabeledCommandArgument;\nimport plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;\nimport plugily.projects.minigamesbox.classic.utils.helper.ItemBuilder;\nimport plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;\nimport plugily.projects.minigamesbox.inventory.common.item.SimpleClickableItem;\nimport plugily.projects.minigamesbox.inventory.normal.NormalFastInv;\nimport plugily.projects.murdermystery.arena.role.Role;\nimport plugily.projects.murdermystery.commands.arguments.ArgumentsRegistry;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class RoleSelectorArgument implements Listener {\n\n  public RoleSelectorArgument(ArgumentsRegistry registry) {\n    registry.mapArgument(\"murdermystery\", new LabeledCommandArgument(\"roleselector\", \"murdermystery.command.roleselector\", CommandArgument.ExecutorType.PLAYER,\n      new LabelData(\"/mm roleselector\", \"/mm roleselector\", \"&7Select a role\\n&6Permission: &7murdermystery.command.roleselector\")) {\n      @Override\n      public void execute(CommandSender sender, String[] args) {\n        Player player = (Player) sender;\n\n        if(registry.getPlugin().getBukkitHelper().checkIsInGameInstance(player)) {\n          openRolePassMenu(player, registry.getPlugin());\n        }\n      }\n    });\n  }\n\n  public static void openRolePassMenu(Player player, PluginMain plugin) {\n    NormalFastInv gui = new NormalFastInv(plugin.getBukkitHelper().serializeInt(Role.values().length), new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PASS_NAME\").asKey().build());\n    List<String> descriptionMurderer = new ArrayList<>();\n    plugin.getLanguageManager().getLanguageListFromKey(\"IN_GAME_MESSAGES_ARENA_PASS_ROLE_MURDERER_LORE\").forEach(string -> descriptionMurderer.add(new MessageBuilder(string).integer(plugin.getUserManager().getUser(player).getStatistic(\"PASS_MURDERER\")).build()));\n    gui.addItem(new SimpleClickableItem(new ItemBuilder(XMaterial.IRON_SWORD.parseMaterial())\n      .name(new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PASS_ROLE_MURDERER_NAME\").asKey().build())\n      .lore(descriptionMurderer)\n      .build(), event -> {\n      IUser user = plugin.getUserManager().getUser(player);\n      if(user.getStatistic(\"PASS_MURDERER\") <= 0) {\n        new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PASS_FAIL\").asKey().player(player).value(Role.MURDERER.name()).sendPlayer();\n        return;\n      }\n      user.adjustStatistic(\"PASS_MURDERER\", -1);\n      user.adjustStatistic(\"CONTRIBUTION_MURDERER\", 999999999);\n      new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PASS_SUCCESS\").asKey().player(player).value(Role.MURDERER.name()).sendPlayer();\n    }));\n    List<String> descriptionDetective = new ArrayList<>();\n    plugin.getLanguageManager().getLanguageListFromKey(\"IN_GAME_MESSAGES_ARENA_PASS_ROLE_DETECTIVE_LORE\").forEach(string -> descriptionDetective.add(new MessageBuilder(string).integer(plugin.getUserManager().getUser(player).getStatistic(\"PASS_DETECTIVE\")).build()));\n    gui.addItem(new SimpleClickableItem(new ItemBuilder(XMaterial.BOW.parseMaterial())\n      .name(new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PASS_ROLE_DETECTIVE_NAME\").asKey().build())\n      .lore(descriptionDetective)\n      .build(), event -> {\n      IUser user = plugin.getUserManager().getUser(player);\n      if(user.getStatistic(\"PASS_DETECTIVE\") <= 0) {\n        new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PASS_FAIL\").asKey().player(player).value(Role.DETECTIVE.name()).sendPlayer();\n        return;\n      }\n      user.adjustStatistic(\"PASS_DETECTIVE\", -1);\n      user.adjustStatistic(\"CONTRIBUTION_DETECTIVE\", 999999999);\n      new MessageBuilder(\"IN_GAME_MESSAGES_ARENA_PASS_SUCCESS\").asKey().player(player).value(Role.DETECTIVE.name()).sendPlayer();\n    }));\n    gui.refresh();\n    gui.open(player);\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/events/PluginEvents.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.events;\n\nimport org.bukkit.Location;\nimport org.bukkit.entity.ArmorStand;\nimport org.bukkit.entity.EntityType;\nimport org.bukkit.entity.Player;\nimport org.bukkit.event.EventHandler;\nimport org.bukkit.event.EventPriority;\nimport org.bukkit.event.Listener;\nimport org.bukkit.event.block.Action;\nimport org.bukkit.event.block.BlockBreakEvent;\nimport org.bukkit.event.block.BlockPlaceEvent;\nimport org.bukkit.event.player.PlayerInteractEvent;\nimport org.bukkit.inventory.ItemStack;\nimport org.bukkit.scheduler.BukkitRunnable;\nimport org.bukkit.util.EulerAngle;\nimport org.bukkit.util.Vector;\nimport plugily.projects.minigamesbox.api.user.IUser;\nimport plugily.projects.minigamesbox.classic.utils.version.ServerVersion;\nimport plugily.projects.minigamesbox.classic.utils.version.VersionUtils;\nimport plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;\nimport plugily.projects.minigamesbox.classic.utils.version.xseries.XSound;\nimport plugily.projects.murdermystery.Main;\nimport plugily.projects.murdermystery.arena.Arena;\nimport plugily.projects.murdermystery.arena.ArenaUtils;\nimport plugily.projects.murdermystery.arena.role.Role;\n\n/**\n * @author Plajer\n * <p>Created at 05.08.2018\n */\npublic class PluginEvents implements Listener {\n\n  private final Main plugin;\n\n  public PluginEvents(Main plugin) {\n    this.plugin = plugin;\n    plugin.getServer().getPluginManager().registerEvents(this, plugin);\n  }\n\n  @EventHandler\n  public void onSwordThrow(PlayerInteractEvent event) {\n    if(event.getAction() == Action.LEFT_CLICK_AIR || event.getAction() == Action.LEFT_CLICK_BLOCK || event.getAction() == Action.PHYSICAL) {\n      return;\n    }\n    Player attacker = event.getPlayer();\n    Arena arena = plugin.getArenaRegistry().getArena(attacker);\n    if(arena == null) {\n      return;\n    }\n\n    IUser attackerUser = plugin.getUserManager().getUser(attacker);\n    if(!Role.isRole(Role.MURDERER, attackerUser, arena)) {\n      return;\n    }\n\n    ItemStack murdererSword = plugin.getSwordSkinManager().getMurdererSword(attacker);\n\n    if(murdererSword == null) {\n      return;\n    }\n\n    if(VersionUtils.getItemInHand(attacker).getType() != murdererSword.getType()) {\n      return;\n    }\n    if(attackerUser.getCooldown(\"sword_shoot\") > 0) {\n      return;\n    }\n    createFlyingSword(attacker, attackerUser);\n\n    int swordFlyCooldown = plugin.getConfig().getInt(\"Sword.Cooldown.Fly\", 5);\n    if(swordFlyCooldown <= 0) {\n      return;\n    }\n    attackerUser.setCooldown(\"sword_shoot\", swordFlyCooldown);\n    if(ServerVersion.Version.isCurrentLower(ServerVersion.Version.v1_11)) {\n      attackerUser.setCooldown(\"sword_attack\", (plugin.getConfig().getInt(\"Sword.Cooldown.Attack\", 1)));\n    } else {\n      VersionUtils.setMaterialCooldown(attacker ,plugin.getSwordSkinManager().getMurdererSword(attacker).getType(), 20 * (plugin.getConfig().getInt(\"Sword.Cooldown.Attack\", 1)));\n    }\n    plugin.getBukkitHelper().applyActionBarCooldown(attacker, swordFlyCooldown);\n  }\n\n  private void createFlyingSword(Player attacker, IUser attackerUser) {\n    Location loc = attacker.getLocation();\n    Vector vec = loc.getDirection();\n    vec.normalize().multiply(plugin.getConfig().getDouble(\"Sword.Speed\", 0.65));\n    Location standStart = plugin.getBukkitHelper().rotateAroundAxisY(new Vector(1.0D, 0.0D, 0.0D), loc.getYaw()).toLocation(attacker.getWorld()).add(loc);\n    standStart.setYaw(loc.getYaw());\n    ArmorStand stand = (ArmorStand) attacker.getWorld().spawnEntity(standStart, EntityType.ARMOR_STAND);\n    stand.setVisible(false);\n    if(ServerVersion.Version.isCurrentHigher(ServerVersion.Version.v1_8_8)) {\n      stand.setInvulnerable(true);\n      stand.setSilent(true);\n    }\n\n    VersionUtils.setItemInHand(stand, plugin.getSwordSkinManager().getMurdererSword(attacker));\n\n    stand.setRightArmPose(new EulerAngle(Math.toRadians(350.0), Math.toRadians(loc.getPitch() * -1.0), Math.toRadians(90.0)));\n    VersionUtils.setCollidable(stand, false);\n\n    stand.setGravity(false);\n    stand.setRemoveWhenFarAway(true);\n\n    if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_8_8)) {\n      stand.setMarker(true);\n    }\n\n    Location initialise = plugin.getBukkitHelper().rotateAroundAxisY(new Vector(-0.8D, 1.45D, 0.0D), loc.getYaw()).toLocation(attacker.getWorld()).add(standStart)\n      .add(plugin.getBukkitHelper().rotateAroundAxisY(plugin.getBukkitHelper().rotateAroundAxisX(new Vector(0.0D, 0.0D, 1.0D), loc.getPitch()), loc.getYaw()));\n    int maxRange = plugin.getConfig().getInt(\"Sword.Fly.Range\", 20);\n    double maxHitRange = plugin.getConfig().getDouble(\"Sword.Fly.Radius\", 0.5);\n    new BukkitRunnable() {\n      @Override\n      public void run() {\n        VersionUtils.teleport(stand, standStart.add(vec));\n        initialise.add(vec);\n        initialise.getWorld().getNearbyEntities(initialise, maxHitRange, maxHitRange, maxHitRange)\n          .forEach(entity -> {\n            if(entity instanceof Player) {\n              Player victim = (Player) entity;\n              Arena arena = plugin.getArenaRegistry().getArena(victim);\n              if(arena == null) {\n                return;\n              }\n              if(!plugin.getUserManager().getUser(victim).isSpectator() && !victim.equals(attacker)) {\n                killBySword(arena, attackerUser, victim);\n                cancel();\n                stand.remove();\n              }\n            }\n          });\n        if(loc.distance(initialise) > maxRange || initialise.getBlock().getType().isSolid()) {\n          cancel();\n          stand.remove();\n        }\n      }\n    }.runTaskTimer(plugin, 0, 1);\n  }\n\n  private void killBySword(Arena arena, IUser attackerUser, Player victim) {\n    Arena victimArena = plugin.getArenaRegistry().getArena(victim);\n    if(arena == null) {\n      return;\n    }\n    IUser user = plugin.getUserManager().getUser(victim);\n\n    // check if victim is murderer\n    if(Role.isRole(Role.MURDERER, user, victimArena)) {\n      return;\n    }\n    XSound.ENTITY_PLAYER_DEATH.play(victim.getLocation(), 50, 1);\n    victim.damage(100.0);\n    attackerUser.adjustStatistic(\"LOCAL_KILLS\", 1);\n    attackerUser.adjustStatistic(\"KILLS\", 1);\n    arena.adjustContributorValue(Role.DETECTIVE, user, plugin.getRandom().nextInt(2));\n    ArenaUtils.addScore(attackerUser, ArenaUtils.ScoreAction.KILL_PLAYER, 0);\n    if(Role.isRole(Role.ANY_DETECTIVE, user, victimArena) && arena.lastAliveDetective()) {\n      if(Role.isRole(Role.FAKE_DETECTIVE, user, victimArena)) {\n        arena.setCharacter(Arena.CharacterType.FAKE_DETECTIVE, null);\n      }\n      ArenaUtils.dropBowAndAnnounce(arena, victim);\n    }\n  }\n\n  @EventHandler(priority = EventPriority.HIGH)\n  // highest priority to fully protect our game\n  public void onBlockBreak(BlockBreakEvent event) {\n    Arena arena = plugin.getArenaRegistry().getArena(event.getPlayer());\n    if(arena == null) {\n      return;\n    }\n    event.setCancelled(true);\n    if(event.getBlock().getType() != XMaterial.ARMOR_STAND.parseMaterial()) {\n      return;\n    }\n    plugin.getHologramManager().getArmorStands().removeIf(armorStand -> {\n      boolean isSameType = armorStand.getLocation().getBlock().getType() == event.getBlock().getType();\n      if(isSameType) {\n        armorStand.remove();\n        armorStand.setCustomNameVisible(false);\n      }\n      return isSameType;\n    });\n  }\n\n  @EventHandler(priority = EventPriority.HIGH)\n  // highest priority to fully protect our game\n  public void onBuild(BlockPlaceEvent event) {\n    Arena arena = plugin.getArenaRegistry().getArena(event.getPlayer());\n    if(arena == null) {\n      return;\n    }\n    event.setCancelled(true);\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/handlers/CorpseHandler.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.handlers;\n\nimport org.bukkit.Bukkit;\nimport org.bukkit.entity.ArmorStand;\nimport org.bukkit.entity.Player;\nimport org.bukkit.event.EventHandler;\nimport org.bukkit.event.Listener;\nimport org.bukkit.inventory.ItemStack;\nimport org.bukkit.inventory.meta.SkullMeta;\nimport org.bukkit.util.EulerAngle;\nimport org.golde.bukkit.corpsereborn.CorpseAPI.CorpseAPI;\nimport org.golde.bukkit.corpsereborn.CorpseAPI.events.CorpseClickEvent;\nimport org.golde.bukkit.corpsereborn.CorpseAPI.events.CorpseSpawnEvent;\nimport org.golde.bukkit.corpsereborn.nms.Corpses;\n\nimport plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;\nimport plugily.projects.minigamesbox.classic.utils.hologram.ArmorStandHologram;\nimport plugily.projects.minigamesbox.classic.utils.version.ServerVersion;\nimport plugily.projects.minigamesbox.classic.utils.version.VersionUtils;\nimport plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;\nimport plugily.projects.murdermystery.Main;\nimport plugily.projects.murdermystery.api.events.game.MurderGameCorpseSpawnEvent;\nimport plugily.projects.murdermystery.arena.Arena;\nimport plugily.projects.murdermystery.HookManager;\nimport plugily.projects.murdermystery.arena.corpse.Corpse;\nimport plugily.projects.murdermystery.arena.corpse.Stand;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\n/**\n * @author Plajer\n * <p>\n * Created at 07.10.2018\n */\npublic class CorpseHandler implements Listener {\n\n  private final Main plugin;\n  private Corpses.CorpseData lastSpawnedCorpse;\n\n  private final Map<String, String> registeredLastWords = new HashMap<>();\n  private final ItemStack head = XMaterial.PLAYER_HEAD.parseItem();\n\n  public CorpseHandler(Main plugin) {\n    this.plugin = plugin;\n    //run bit later than hook manager to ensure it's not null\n    Bukkit.getScheduler().runTaskLater(plugin, () -> {\n      if(plugin.getHookManager().isFeatureEnabled(HookManager.HookFeature.CORPSES)) {\n        plugin.getServer().getPluginManager().registerEvents(this, plugin);\n      }\n    }, 20 * 7);\n  }\n\n  public void registerLastWord(String permission, String lastWord) {\n    registeredLastWords.put(permission, lastWord);\n  }\n\n  @SuppressWarnings(\"deprecation\")\n  public void spawnCorpse(Player player, Arena arena) {\n    MurderGameCorpseSpawnEvent murderGameCorpseSpawnEvent = new MurderGameCorpseSpawnEvent(arena, player.getPlayer(), player.getLocation());\n    Bukkit.getPluginManager().callEvent(murderGameCorpseSpawnEvent);\n    if(murderGameCorpseSpawnEvent.isCancelled()) {\n      return;\n    }\n    if(!plugin.getHookManager().isFeatureEnabled(HookManager.HookFeature.CORPSES)) {\n      ArmorStand stand = player.getLocation().getWorld().spawn(player.getLocation().add(0.0D, -1.25D, 0.0D), ArmorStand.class);\n      SkullMeta meta = (SkullMeta) head.getItemMeta();\n      meta = VersionUtils.setPlayerHead(player, meta);\n      head.setItemMeta(meta);\n\n      stand.setVisible(false);\n      if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_16)) {\n        stand.getEquipment().setHelmet(head);\n      } else {\n        stand.setHelmet(head);\n      }\n      stand.setGravity(false);\n      stand.setCustomNameVisible(false);\n      stand.setHeadPose(new EulerAngle(Math.toRadians(player.getLocation().getX()), Math.toRadians(player.getLocation().getPitch()), Math.toRadians(player.getLocation().getZ())));\n\n      plugin.getHologramManager().getArmorStands().add(stand);\n      ArmorStandHologram hologram = getLastWordsHologram(player);\n      arena.addHead(new Stand(hologram, stand));\n      Bukkit.getScheduler().runTaskLater(plugin, () -> {\n        hologram.delete();\n        plugin.getHologramManager().getArmorStands().remove(stand);\n        Bukkit.getScheduler().runTaskLater(plugin, stand::remove, 20 * 20);\n      }, 15 * 20);\n      return;\n    }\n    ArmorStandHologram hologram = getLastWordsHologram(player);\n    Corpses.CorpseData corpse = CorpseAPI.spawnCorpse(player, player.getLocation());\n    lastSpawnedCorpse = corpse;\n    //spawns 2 corpses - Corpses.CorpseData corpse = lastSpawnedCorpse = CorpseAPI.spawnCorpse(player, player.getLocation());\n    arena.addCorpse(new Corpse(hologram, corpse));\n    Bukkit.getScheduler().runTaskLater(plugin, () -> {\n      hologram.delete();\n      Bukkit.getScheduler().runTaskLater(plugin, corpse::destroyCorpseFromEveryone, 20 * 20);\n    }, 15 * 20);\n  }\n\n  private ArmorStandHologram getLastWordsHologram(Player player) {\n    ArmorStandHologram hologram = new ArmorStandHologram(player.getLocation());\n    hologram.appendLine(new MessageBuilder(plugin.getLastWordsManager().getHologramTitle()).player(player).build());\n    hologram.appendLine(plugin.getLastWordsManager().getRandomLastWord(player));\n    return hologram;\n  }\n\n  @EventHandler\n  public void onCorpseSpawn(CorpseSpawnEvent e) {\n    if(lastSpawnedCorpse == null) {\n      return;\n    }\n    if(plugin.getConfigPreferences().getOption(\"CORPSES_INTEGRATION_OVERWRITE\") && !lastSpawnedCorpse.equals(e.getCorpse())) {\n      e.setCancelled(true);\n    }\n  }\n\n  @EventHandler\n  public void onCorpseClick(CorpseClickEvent e) {\n    if(plugin.getArenaRegistry().isInArena(e.getClicker())) {\n      e.setCancelled(true);\n      e.getClicker().closeInventory();\n    }\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/handlers/lastwords/LastWord.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\npackage plugily.projects.murdermystery.handlers.lastwords;\n\n/**\n * @author 2Wild4You, Tigerpanzer_02\n * <p>\n * Created at 19.02.2021\n */\npublic class LastWord {\n\n  private final String message;\n  private final String permission;\n\n  public LastWord(String message, String permission) {\n    this.message = message;\n    this.permission = permission;\n  }\n\n  public String getMessage() {\n    return message;\n  }\n\n  public String getPermission() {\n    return permission;\n  }\n\n  public boolean hasPermission() {\n    return !permission.isEmpty();\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/handlers/lastwords/LastWordsManager.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\npackage plugily.projects.murdermystery.handlers.lastwords;\n\nimport org.bukkit.configuration.ConfigurationSection;\nimport org.bukkit.configuration.file.FileConfiguration;\nimport org.bukkit.entity.Player;\nimport plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;\nimport plugily.projects.minigamesbox.classic.utils.configuration.ConfigUtils;\nimport plugily.projects.murdermystery.Main;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.concurrent.ThreadLocalRandom;\nimport java.util.stream.Collectors;\n\n/**\n * @author 2Wild4You, Tigerpanzer_02\n * <p>\n * Created at 19.02.2021\n */\npublic class LastWordsManager {\n\n  private final List<LastWord> registeredLastWords = new ArrayList<>();\n\n  private String hologramTitle = \"\";\n\n  public LastWordsManager(Main plugin) {\n    registerLastWords(plugin);\n  }\n\n  public void registerLastWords(Main plugin) {\n    FileConfiguration config = ConfigUtils.getConfig(plugin, \"lastwords\");\n    hologramTitle = config.getString(\"Last-Words.Hologram.Title\", \"-\");\n    ConfigurationSection section = config.getConfigurationSection(\"Last-Words.Hologram.Content\");\n    String path = \"Last-Words.Hologram.Content.\";\n    for(String id : section.getKeys(false)) {\n      addLastWord(new LastWord(new MessageBuilder(config.getString(path + id + \".Message\")).build(), config.getString(path + id + \".Permission\", \"\")));\n    }\n  }\n\n  public List<LastWord> getRegisteredLastWords() {\n    return registeredLastWords;\n  }\n\n  public String getHologramTitle() {\n    return hologramTitle;\n  }\n\n  public void addLastWord(LastWord lastWord) {\n    registeredLastWords.add(lastWord);\n  }\n\n  public String getRandomLastWord(Player player) {\n    //check perms\n    List<LastWord> perms = registeredLastWords.stream().filter(lastWord -> player.hasPermission(lastWord.getPermission())).collect(Collectors.toList());\n    if(!perms.isEmpty()) {\n      return perms.get(ThreadLocalRandom.current().nextInt(perms.size())).getMessage();\n    }\n    //check default\n    List<LastWord> noPerms = registeredLastWords.stream().filter(lastWord -> !lastWord.hasPermission()).collect(Collectors.toList());\n    if(!noPerms.isEmpty()) {\n      return noPerms.get(ThreadLocalRandom.current().nextInt(noPerms.size())).getMessage();\n    }\n    //fallback\n    return registeredLastWords.get(0).getMessage();\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/handlers/setup/LocationCategory.java",
    "content": "/*\n *\n * MurderMystery\n * Copyright (C) 2021 Plugily Projects - maintained by Tigerpanzer_02, 2Wild4You and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\npackage plugily.projects.murdermystery.handlers.setup;\n\nimport plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;\nimport plugily.projects.minigamesbox.classic.handlers.setup.categories.PluginLocationCategory;\nimport plugily.projects.minigamesbox.classic.handlers.setup.categories.PluginSpecificCategory;\nimport plugily.projects.minigamesbox.classic.handlers.setup.items.category.CountItem;\nimport plugily.projects.minigamesbox.classic.handlers.setup.items.category.LocationItem;\nimport plugily.projects.minigamesbox.classic.handlers.setup.items.category.MultiLocationItem;\nimport plugily.projects.minigamesbox.classic.utils.helper.ItemBuilder;\nimport plugily.projects.minigamesbox.classic.utils.serialization.LocationSerializer;\nimport plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;\nimport plugily.projects.minigamesbox.inventory.normal.NormalFastInv;\n\n\n/**\n * @author Tigerpanzer_02\n * <p>\n * Created at 01.07.2022\n */\npublic class LocationCategory extends PluginLocationCategory {\n  @Override\n  public void addItems(NormalFastInv gui) {\n    super.addItems(gui);\n\n    MultiLocationItem starting = new MultiLocationItem(getSetupInventory(), new ItemBuilder(XMaterial.EMERALD_BLOCK.parseMaterial()), \"Player Spawn Points\", \"Location where players will be randomly teleported when the game starts\", \"playerspawnpoints\", 4, inventoryClickEvent -> {\n      LocationSerializer.saveLoc(getSetupInventory().getPlugin(), getSetupInventory().getConfig(), \"arenas\", \"instances.\" + getSetupInventory().getArenaKey() + \".\" + \"startlocation\", inventoryClickEvent.getWhoClicked().getLocation());\n    }, (emptyConsumer) -> {\n    }, true, true, true);\n    getItemList().add(starting);\n    gui.setItem((getInventoryLine() * 9) + 2, starting);\n  }\n\n}"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/handlers/setup/SetupCategoryManager.java",
    "content": "package plugily.projects.murdermystery.handlers.setup;\n\nimport plugily.projects.minigamesbox.classic.handlers.setup.SetupInventory;\nimport plugily.projects.minigamesbox.classic.handlers.setup.categories.PluginSetupCategoryManager;\nimport plugily.projects.minigamesbox.classic.handlers.setup.categories.SetupCategory;\n\n/**\n * @author Tigerpanzer_02\n * <p>\n * Created at 01.07.2022\n */\npublic class SetupCategoryManager extends PluginSetupCategoryManager {\n\n  public SetupCategoryManager(SetupInventory setupInventory) {\n    super(setupInventory);\n    getCategoryHandler().put(SetupCategory.LOCATIONS, new LocationCategory());\n    getCategoryHandler().put(SetupCategory.SPECIFIC, new SpecificCategory());\n    getCategoryHandler().put(SetupCategory.SWITCH, new SwitchCategory());\n    super.init();\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/handlers/setup/SpecificCategory.java",
    "content": "/*\n *\n * MurderMystery\n * Copyright (C) 2021 Plugily Projects - maintained by Tigerpanzer_02, 2Wild4You and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\npackage plugily.projects.murdermystery.handlers.setup;\n\nimport org.bukkit.Material;\nimport plugily.projects.minigamesbox.classic.handlers.setup.categories.PluginSpecificCategory;\nimport plugily.projects.minigamesbox.classic.handlers.setup.items.category.CountItem;\nimport plugily.projects.minigamesbox.classic.handlers.setup.items.category.MaterialLocationItem;\nimport plugily.projects.minigamesbox.classic.handlers.setup.items.category.MaterialMultiLocationItem;\nimport plugily.projects.minigamesbox.classic.handlers.setup.items.category.MultiLocationItem;\nimport plugily.projects.minigamesbox.classic.utils.helper.ItemBuilder;\nimport plugily.projects.minigamesbox.classic.utils.helper.MaterialUtils;\nimport plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;\nimport plugily.projects.minigamesbox.inventory.normal.NormalFastInv;\n\nimport java.util.Collections;\n\n\n/**\n * @author Tigerpanzer_02\n * <p>\n * Created at 01.07.2022\n */\npublic class SpecificCategory extends PluginSpecificCategory {\n  @Override\n  public void addItems(NormalFastInv gui) {\n    super.addItems(gui);\n\n    CountItem spawnGoldTime = new CountItem(getSetupInventory(), new ItemBuilder(XMaterial.REDSTONE_TORCH.parseMaterial()), \"Gold Spawn Time (Seconds)\", \"How much gold should be spawned? \\nThat means 1 gold spawned every ... seconds\\nDefault: 5\\nEvery 5 seconds it will spawn 1 gold\", \"spawngoldtime\");\n    gui.setItem((getInventoryLine() * 9) + 1, spawnGoldTime);\n    getItemList().add(spawnGoldTime);\n\n    CountItem playerMurderer = new CountItem(getSetupInventory(), new ItemBuilder(XMaterial.IRON_SWORD.parseMaterial()), \"Player Per Murderer\", \"How many murderer should be ingame? This means \\none murderer for that amount of players. Default: \\n5 players are 1 murderer, that means if we have \\n14 Players it will calculate 2 murderer! \\nSet it to 1 if you want only one murderer \", \"playerpermurderer\");\n    gui.setItem((getInventoryLine() * 9) + 2, playerMurderer);\n    getItemList().add(playerMurderer);\n\n    CountItem playerDetective = new CountItem(getSetupInventory(), new ItemBuilder(XMaterial.IRON_SWORD.parseMaterial()), \"Player Per Murderer\", \"How many detectives should be ingame? This means \\none detective for that amount of players. Default: \\n7 players are 1 detective, that means if we have \\n18 Players it will calculate 2 detectives! \\nSet it to 1 if you want only one detective \", \"playerperdetective\");\n    gui.setItem((getInventoryLine() * 9) + 3, playerDetective);\n    getItemList().add(playerDetective);\n\n    MultiLocationItem goldSpawn = new MultiLocationItem(getSetupInventory(), new ItemBuilder(XMaterial.GOLD_INGOT.parseMaterial()), \"Gold Spawn\", \"Add new gold spawn \\n on the place you're standing at.\", \"goldspawnpoints\", 4);\n    gui.setItem((getInventoryLine() * 9) + 4, goldSpawn);\n    getItemList().add(goldSpawn);\n\n    MaterialMultiLocationItem mysteryCauldron = new MaterialMultiLocationItem(getSetupInventory(), new ItemBuilder(XMaterial.CAULDRON.parseMaterial()), \"Mystery Cauldron\", \"Target a cauldron and add it to the game\\nit will cost 1 gold per potion!\\nConfigure cauldron potions \\nin special_blocks.yml file!\", \"mystery-cauldrons\", Collections.singleton(Material.CAULDRON), false, 0);\n    gui.setItem((getInventoryLine() * 9) + 5, mysteryCauldron);\n    getItemList().add(mysteryCauldron);\n\n    MaterialMultiLocationItem confessional = new MaterialMultiLocationItem(getSetupInventory(), new ItemBuilder(XMaterial.ENCHANTING_TABLE.parseMaterial()), \"Confessional\", \"Target enchanting table and\\nadd praise to the developer\\nconfessional, gift for\\nthe developer costs 1 gold!\\nAdd some levers in radius\\nof 3 blocks near the enchant table\\nto allow users to pray there!\\nYou can either get gifts\\nor curses from prayer!\", \"confessionals\", Collections.singleton(XMaterial.ENCHANTING_TABLE.parseMaterial()), false, 0);\n    gui.setItem((getInventoryLine() * 9) + 6, confessional);\n    getItemList().add(confessional);\n\n  }\n\n}"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/handlers/setup/SwitchCategory.java",
    "content": "package plugily.projects.murdermystery.handlers.setup;\n\nimport org.bukkit.plugin.java.JavaPlugin;\nimport plugily.projects.minigamesbox.classic.PluginMain;\nimport plugily.projects.minigamesbox.classic.handlers.setup.categories.PluginSwitchCategory;\nimport plugily.projects.minigamesbox.classic.handlers.setup.items.category.BooleanItem;\nimport plugily.projects.minigamesbox.classic.handlers.setup.items.category.SwitchItem;\nimport plugily.projects.minigamesbox.classic.utils.helper.ItemBuilder;\nimport plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;\nimport plugily.projects.minigamesbox.inventory.normal.NormalFastInv;\nimport plugily.projects.murdermystery.Main;\n\nimport java.util.Arrays;\n\n/**\n * @author Tigerpanzer_02\n * <p>\n * Created at 01.07.2022\n */\npublic class SwitchCategory extends PluginSwitchCategory {\n  @Override\n  public void addItems(NormalFastInv gui) {\n    super.addItems(gui);\n    BooleanItem goldVisuals = new BooleanItem(getSetupInventory(), new ItemBuilder(XMaterial.REDSTONE.parseMaterial()), \"Gold Visuals\", \"Enables gold visuals to spawn\\nsome particle effects above gold locations\", \"goldvisuals\");\n    gui.setItem((getInventoryLine() * 9) + 1, goldVisuals);\n    getItemList().add(goldVisuals);\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/handlers/skins/sword/SwordSkin.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\npackage plugily.projects.murdermystery.handlers.skins.sword;\n\nimport org.bukkit.inventory.ItemStack;\n\n/**\n * @author Tigerpanzer_02\n * <p>\n * Created at 03.04.2022\n */\npublic class SwordSkin {\n\n  private final ItemStack itemStack;\n  private final String permission;\n\n  public SwordSkin(ItemStack itemStack, String permission) {\n    this.itemStack = itemStack;\n    this.permission = permission;\n  }\n\n  public ItemStack getItemStack() {\n    return itemStack;\n  }\n\n  public String getPermission() {\n    return permission;\n  }\n\n  public boolean hasPermission() {\n    return !permission.isEmpty();\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/handlers/skins/sword/SwordSkinManager.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\npackage plugily.projects.murdermystery.handlers.skins.sword;\n\nimport org.bukkit.configuration.ConfigurationSection;\nimport org.bukkit.configuration.file.FileConfiguration;\nimport org.bukkit.entity.Player;\nimport org.bukkit.inventory.ItemStack;\nimport plugily.projects.minigamesbox.classic.utils.configuration.ConfigUtils;\nimport plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;\nimport plugily.projects.murdermystery.Main;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.concurrent.ThreadLocalRandom;\nimport java.util.stream.Collectors;\n\n/**\n * @author 2Wild4You, Tigerpanzer_02\n *     <p>Created at 19.02.2021\n */\npublic class SwordSkinManager {\n\n  private final List<SwordSkin> registeredSwordSkins = new ArrayList<>();\n  private final Map<Player, ItemStack> murdererSwords = new HashMap<>();\n\n  public SwordSkinManager(Main plugin) {\n    registerSwordSkins(plugin);\n  }\n\n  public void registerSwordSkins(Main plugin) {\n    FileConfiguration config = ConfigUtils.getConfig(plugin, \"skins\");\n    ConfigurationSection section = config.getConfigurationSection(\"Skins.Sword\");\n    String path = \"Skins.Sword.\";\n    for (String id : section.getKeys(false)) {\n      addSwordSkin(\n          new SwordSkin(\n              XMaterial.matchXMaterial(config.getString(path + id + \".Material\", \"BEDROCK\"))\n                  .orElse(XMaterial.BEDROCK)\n                  .parseItem(),\n              config.getString(path + id + \".Permission\", \"\")));\n    }\n  }\n\n  public List<SwordSkin> getRegisteredSwordSkins() {\n    return registeredSwordSkins;\n  }\n\n  public void addSwordSkin(SwordSkin lastWord) {\n    registeredSwordSkins.add(lastWord);\n  }\n\n  public ItemStack getRandomSwordSkin(Player player) {\n    // check perms\n    List<SwordSkin> perms =\n        registeredSwordSkins.stream()\n            .filter(swordSkin -> player.hasPermission(swordSkin.getPermission()))\n            .collect(Collectors.toList());\n    if (!perms.isEmpty()) {\n      ItemStack itemStack =\n          perms.get(ThreadLocalRandom.current().nextInt(perms.size())).getItemStack();\n      murdererSwords.put(player, itemStack);\n      return itemStack;\n    }\n    // check default\n    List<SwordSkin> noPerms =\n        registeredSwordSkins.stream()\n            .filter(swordSkin -> !swordSkin.hasPermission())\n            .collect(Collectors.toList());\n    if (!noPerms.isEmpty()) {\n      ItemStack itemStack =\n          noPerms.get(ThreadLocalRandom.current().nextInt(noPerms.size())).getItemStack();\n      murdererSwords.put(player, itemStack);\n      return itemStack;\n    }\n    // fallback\n    ItemStack itemStack = registeredSwordSkins.get(0).getItemStack();\n    murdererSwords.put(player, itemStack);\n    return itemStack;\n  }\n\n  public void removeMurdererSword(Player player) {\n    murdererSwords.remove(player);\n  }\n\n  public ItemStack getMurdererSword(Player player) {\n    return murdererSwords.get(player);\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/handlers/trails/BowTrailsHandler.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.handlers.trails;\n\nimport org.bukkit.entity.Arrow;\nimport org.bukkit.entity.Entity;\nimport org.bukkit.entity.Player;\nimport org.bukkit.event.EventHandler;\nimport org.bukkit.event.Listener;\nimport org.bukkit.event.entity.EntityShootBowEvent;\nimport org.bukkit.scheduler.BukkitRunnable;\nimport plugily.projects.minigamesbox.classic.utils.version.VersionUtils;\nimport plugily.projects.murdermystery.Main;\n\n\n/**\n * @author 2Wild4You, Tigerpanzer_02\n * <p>\n * Created at 19.02.2021\n */\npublic class BowTrailsHandler implements Listener {\n\n  private final Main plugin;\n\n  public BowTrailsHandler(Main plugin) {\n    this.plugin = plugin;\n    plugin.getServer().getPluginManager().registerEvents(this, plugin);\n  }\n\n  @EventHandler\n  public void onArrowShoot(EntityShootBowEvent event) {\n    if(!(event.getEntity() instanceof Player && event.getProjectile() instanceof Arrow)) {\n      return;\n    }\n\n    Entity projectile = event.getProjectile();\n\n    if(projectile.isDead() || projectile.isOnGround()) {\n      return;\n    }\n\n    Player player = (Player) event.getEntity();\n\n    if(!plugin.getArenaRegistry().isInArena(player) || !plugin.getTrailsManager().gotAnyTrails(player)) {\n      return;\n    }\n\n    Trail trail = plugin.getTrailsManager().getRandomTrail(player);\n    plugin.getDebugger().debug(\"Spawning particle with perm {0} for player {1}\", trail.getPermission(), player.getName());\n    new BukkitRunnable() {\n      @Override\n      public void run() {\n        if(projectile.isDead() || projectile.isOnGround()) {\n          plugin.getDebugger().debug(\"Stopped spawning particle with perm {0} for player {1}\", trail.getPermission(), player.getName());\n          cancel();\n        }\n        try {\n          VersionUtils.sendParticles(trail.getName(), player, projectile.getLocation(), 3);\n        }catch(Exception ignored) {}\n      }\n    }.runTaskTimer(plugin, 0, 0);\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/handlers/trails/Trail.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\npackage plugily.projects.murdermystery.handlers.trails;\n\n/**\n * @author 2Wild4You, Tigerpanzer_02\n * <p>\n * Created at 19.02.2021\n */\npublic class Trail {\n\n  private final String name;\n  private final String permission;\n\n  public Trail(String message, String permission) {\n    this.name = message;\n    this.permission = permission;\n  }\n\n  public String getName() {\n    return name;\n  }\n\n  public String getPermission() {\n    return permission;\n  }\n\n  public boolean hasPermission() {\n    return !permission.isEmpty();\n  }\n\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/handlers/trails/TrailsManager.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\npackage plugily.projects.murdermystery.handlers.trails;\n\nimport org.bukkit.configuration.file.FileConfiguration;\nimport org.bukkit.entity.Player;\n\nimport plugily.projects.minigamesbox.classic.utils.configuration.ConfigUtils;\nimport plugily.projects.minigamesbox.classic.utils.version.VersionUtils;\nimport plugily.projects.murdermystery.Main;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.concurrent.ThreadLocalRandom;\nimport java.util.stream.Collectors;\n\n/**\n * @author Tigerpanzer_02\n * <p>\n * Created at 19.02.2021\n */\npublic class TrailsManager {\n\n  private final List<Trail> registeredTrails = new ArrayList<>();\n\n  private final List<String> blacklistedTrails;\n\n  public TrailsManager(Main plugin) {\n    FileConfiguration config = ConfigUtils.getConfig(plugin, \"trails\");\n    blacklistedTrails = config.getStringList(\"Blacklisted-Trails\");\n    registerTrails();\n  }\n\n  public void registerTrails() {\n    for (String particle : VersionUtils.getParticleValues()) {\n      if (blacklistedTrails.contains(particle.toLowerCase())) {\n        continue;\n      }\n      addTrail(new Trail(particle, \"murdermystery.trails.\" + particle.toLowerCase()));\n    }\n  }\n\n  public List<Trail> getRegisteredTrails() {\n    return registeredTrails;\n  }\n\n  public void addTrail(Trail lastWord) {\n    registeredTrails.add(lastWord);\n  }\n\n  public boolean gotAnyTrails(Player player) {\n    return registeredTrails.stream().anyMatch(trail -> player.hasPermission(trail.getPermission()));\n  }\n\n  public Trail getRandomTrail(Player player) {\n    // check perms\n    List<Trail> perms =\n        registeredTrails.stream()\n            .filter(trail -> player.hasPermission(trail.getPermission()))\n            .collect(Collectors.toList());\n    if (!perms.isEmpty()) {\n      return perms.get(perms.size() == 1 ? 0 : ThreadLocalRandom.current().nextInt(perms.size()));\n    }\n    // fallback\n    return registeredTrails.get(0);\n  }\n}\n"
  },
  {
    "path": "src/main/java/plugily/projects/murdermystery/utils/ItemPosition.java",
    "content": "/*\n * MurderMystery - Find the murderer, kill him and survive!\n * Copyright (c) 2022  Plugily Projects - maintained by Tigerpanzer_02 and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage plugily.projects.murdermystery.utils;\n\nimport org.bukkit.inventory.Inventory;\nimport org.bukkit.inventory.ItemStack;\nimport plugily.projects.minigamesbox.api.user.IUser;\nimport plugily.projects.murdermystery.arena.role.Role;\n\n/**\n * @author Plajer\n * <p>\n * Created at 17.10.2018\n */\npublic enum ItemPosition {\n\n  ARROWS(2, 2), BOW(0, 1), BOW_LOCATOR(4, 4), MURDERER_SWORD(1, 1), INNOCENTS_LOCATOR(4, 4), INFINITE_ARROWS(9, 9), GOLD_INGOTS(8, 8),\n  POTION(3, 3);\n\n  private final int murdererItemPosition;\n  private final int otherRolesItemPosition;\n\n  ItemPosition(int murdererItemPosition, int otherRolesItemPosition) {\n    this.murdererItemPosition = murdererItemPosition;\n    this.otherRolesItemPosition = otherRolesItemPosition;\n  }\n\n  /**\n   * Adds target item to specified hotbar position sorta different for each role.\n   * Item will be added if there is already set or will be set when no item is set in the position.\n   *\n   * @param user         player to add item to\n   * @param itemPosition position of item to set/add\n   * @param itemStack    itemstack to be added at itemPostion or set at itemPosition\n   */\n  public static void addItem(IUser user, ItemPosition itemPosition, ItemStack itemStack) {\n    int itemPos = Role.isRole(Role.MURDERER, user) ? itemPosition.getMurdererItemPosition()\n      : itemPosition.getOtherRolesItemPosition();\n\n    if(itemPos < 0) {\n      return;\n    }\n\n    Inventory inv = user.getPlayer().getInventory();\n    ItemStack item = inv.getItem(itemPos);\n\n    if(item != null) {\n      item.setAmount(item.getAmount() + itemStack.getAmount());\n      return;\n    }\n\n    inv.setItem(itemPos, itemStack);\n  }\n\n  /**\n   * Sets target item in specified hotbar position sorta different for each role.\n   * If item there is already set it will be incremented by itemStack amount if possible.\n   *\n   * @param user         player to set item to\n   * @param itemPosition position of item to set\n   * @param itemStack    itemstack to set at itemPosition\n   */\n  public static void setItem(IUser user, ItemPosition itemPosition, ItemStack itemStack) {\n    if(Role.isRole(Role.MURDERER, user)) {\n      user.getPlayer().getInventory().setItem(itemPosition.getMurdererItemPosition(), itemStack);\n    } else {\n      user.getPlayer().getInventory().setItem(itemPosition.getOtherRolesItemPosition(), itemStack);\n    }\n  }\n\n  public static void removeItem(IUser user, ItemStack itemStack) {\n    user.getPlayer().getInventory().removeItem(itemStack);\n  }\n\n\n  public int getMurdererItemPosition() {\n    return murdererItemPosition;\n  }\n\n  public int getOtherRolesItemPosition() {\n    return otherRolesItemPosition;\n  }\n\n}\n"
  },
  {
    "path": "src/main/resources/arena_selector.yml",
    "content": "# Don't edit it. But who's stopping you? It's your server!\n# Really, don't edit ;p\n# You edited it, huh? Next time hurt yourself!\nDo-Not-Edit:\n  File-Version: 1\n  Core-Version: 1"
  },
  {
    "path": "src/main/resources/arenas.yml",
    "content": "instances:\n  default:\n    lobbylocation: world,364.0,63.0,-72.0,0.0,0.0\n    startlocation: world,364.0,63.0,-72.0,0.0,0.0\n    endlocation: world,364.0,63.0,-72.0,0.0,0.0\n    minimumplayers: 2\n    maximumplayers: 10\n    mapname: mapname\n    world: worldname\n    signs: [ ]\n    isdone: false\n    playerspawnpoints:\n      - world,364.0,63.0,-72.0,0.0,0.0\n    goldspawnpoints:\n      - world,364.0,63.0,-72.0,0.0,0.0\n    mystery-cauldrons:\n      - world,364.0,63.0,-72.0,0.0,0.0\n    playerpermurderer: 5\n    playerperdetective: 7\n    goldvisuals: false\n\n# Don't edit it. But who's stopping you? It's your server!\n# Really, don't edit ;p\n# You edited it, huh? Next time hurt yourself!\nDo-Not-Edit:\n  File-Version: 1\n  Core-Version: 1"
  },
  {
    "path": "src/main/resources/bungee.yml",
    "content": "# Configuration for Bungeecord support.\n# Remember to enable it in config.yml (Bungee-Mode: true)\n\n# Your bungeecord server name where players will be teleported after game (main lobby with signs etc.)\nHub: lobby\n\n# Should game server be closed after game?\nShutdown-When-Game-Ends: true\n\n# Should the player connect to hub (e.g. Leave-Item)\nConnect-To-Hub: true\n\n# Should the End Location be the hub? (Players will be connected to hub at the End)\nEnd-Location-Hub: true\n\n# This is useful for bungee game systems.\n# %state% - Game state will be visible at MOTD.\nMOTD:\n  Manager: false\n  Message: \"The actual game state of the minigame is %state%\"\n  Game-States:\n    Inactive: \"&lInactive...\"\n    In-Game: \"&lIn-game\"\n    Starting: \"&e&lStarting\"\n    Full-Game: \"&4&lFULL\"\n    Ending: \"&lEnding\"\n    Restarting: \"&c&lRestarting\"\n\n# Don't edit it. But who's stopping you? It's your server!\n# Really, don't edit ;p\n# You edited it, huh? Next time hurt yourself!\nDo-Not-Edit:\n  File-Version: 1\n  Core-Version: 1"
  },
  {
    "path": "src/main/resources/config.yml",
    "content": "## Thanks for using our plugins! ~Tigerpanzer_02 from Plugily Projects\n#      murdermystery configuration file\n#\n#    You can edit here the basic things of murdermystery\n#      Please read everything CAREFULLY!\n#   You don't want to break anything, do you?\n#\n\n\n# Select locale of MurderMystery, default it's English.\n# Available locales:\n#    default - English language. Uses 'language.yml'.\n#    See https://github.com/Plugily-Projects/locale_storage/tree/master/plugins/minecraft/murdermystery\n#    Help us translate the project -> https://translate.plugily.xyz\n#    Use filename of the language e.g. de_DE.yml -> locale: de_DE\nlocale: default\n\n\n# Should we display a boss bar with additional arena information?\nBossbar:\n  Display: true\n  # Interval in seconds between messages\n  Interval: 10\n\n\n# Should we hook into bungeecord? (If you wanna use arena per server option)\n# This option will let you access bungee.yml and its options.\n# You STILL need to use external addon for HUB server game signs\n# Check here for more info: https://wiki.plugily.xyz/\nBungee-Mode: false\n\n\n# Enable Inventory Manager for your games? (VERY USEFUL feature for MULTI ARENA)\n# This saves inventory of players and restores it after player leaves arena.\n# Saved elements: max health, health, food, experience, full inventory, armor contents, fire ticks, active potions\nInventory-Manager: true\n\n\nCommands:\n  # Commands which can be used in game, remove all of them to disable (only works if Block.In-Game.Commands = true)\n  Whitelist:\n    - me\n    - help\n  # Enable and Disable predefined shortened commands or add your own\n  Shorter:\n    '1':\n      Short: \"start\"\n      Executes: \"murdermysteryadmin forcestart\"\n      Enabled: true\n    '2':\n      Short: \"leave\"\n      Executes: \"murdermystery leave\"\n      Enabled: true\n    '3':\n      Short: \"stats\"\n      Executes: \"murdermystery stats\"\n      Enabled: false\n    '4':\n      Short: \"top\"\n      Executes: \"murdermystery top\"\n      Enabled: true\n\n\n# Block some functions of your players\nBlock:\n  In-Game:\n    # Should we block every not plugin associated commands in game?\n    Commands: true\n    # Should the leave command be blocked inside arena?\n    Leave: false\n    # Cancels Item Movement into player crafting, enchantment tables, anvils ...\n    Item-Move: true\n    ArmorStand:\n      # Should we block armor stand destroy with double click?\n      Destroy: true\n      # Should we block armor stand interaction?\n      Interact: true\n      # Should these only be blocked while ingame and arena state is in_game? (e.g. Lobby and Ending is blocked)\n      # Setting it to false means on all stages of the game the event will be cancelled.\n      # Setting it to true means only while IN_GAME the event will be cancelled.\n      Check: true\n    # Should all interactions with interactive materials such as doors / buttons / fences / redstone be blocked during ingame\n    # Full list see https://github.com/CryptoMorin/XSeries/blob/e84000a2bead7367d893cf8661f8d5432116adaa/core/src/main/java/com/cryptomorin/xseries/XTag.java#L2793\n    Interact: false\n\n\n# Enable this option when you're using MySQL, otherwise it won't work.\n# Be careful when changing this because there is NO migrator between\n# flat file and MySQL for player stats.\n# If this option is disabled it means all stats will be saved as flat file!\nDatabase: false\n\n\n# Should we enable in game rewards? See rewards.yml for more...\n# You should also check out our script engine tutorial for rewards! https://tutorial.plugily.xyz\nRewards: false\n\n\nChat:\n  # Enable in game (eg. '[KIT][LEVEL] Tigerpanzer_02: hey') special formatting?\n  # Formatting is configurable in language.yml\n  # You can use PlaceholderAPI placeholders in chat format!\n  Format: true\n  Separate:\n    # Should we enable a separate arena chat for players inside a arena\n    # Useful on multi arena servers that don't want the same chat for all players on the server\n    Arena: true\n    # Should spectators only write with other spectators\n    Spectators: true\n\n\n# Should we fire some cool fireworks at locations of every player at special events such as the game end?\nFirework: true\n\n\n# Should blocks behind game signs change their color based on game state?\n# They will change color to:\n# - white (waiting for players) stained glass\n# - yellow (starting) stained glass\n# - orange (in game) stained glass\n# - gray (ending) stained glass\n# - black (restarting) stained glass\n# or define your own at signs.yml!\nSign-Block-States: true\n\n\n# Should holiday events for the plugin be enabled?\n# Eg. 4 days before and 4 days after Halloween special effects\n# for death, spooky! There are more holiday events! Check wiki!\n# Wiki: -\nHolidays: true\n\n\n# Should the plugin enable special powerups which can be found in powerups.yml\nPowerups: false\n\n\n# Should we create leaderboards out of the stats?\nLeaderboard: true\n\n\nParties:\n  # Should we try to hook into your current party plugin? (Supports well know party plugins, see wiki!)\n  # It will group up all players with the party leader. The party leader can join with the whole party!\n  External: true\n  # Should we enable our own party system that can be only used for this plugin?\n  # Check the wiki for commands\n  Own: false\n\n\nDamage:\n  # Should players get fall damage?\n  Fall: false\n  # Should players get drowning damage?\n  Drowning: false\n  # Should players get fire damage?\n  Fire: false\n  # Should players lose food ingame & get damage?\n  Hunger: false\n\n\nOption:\n  Player:\n    # Disable player drops ingame?\n    Drop: true\n\n\nCycle:\n  # Should we make permanent clear weather on all worlds where our arenas are?\n  Weather: false\n  # Should the time on the world your arenas are modified to stay at the same time?\n  Daylight:\n    Enable: false\n    Time: 10000\n\n\n# How many seconds game should take to start.\nTime-Manager:\n  Waiting: 20\n  Starting: 60\n  Shorten-Waiting-Full: 15\n  Shorten-Waiting-Force: 5\n  In-Game: 270\n  Ending: 10\n  Restarting: 5\n\n\n# Allow spectators on arena instances\nSpectators: true\n\n\nUpdate-Notifier:\n  # Should we check for updates on plugin start/after admin join?\n  # You REALLY should have this true!\n  Enabled: true\n  # Should we inform you when beta version is out?\n  # BETA IS NOT ALWAYS AS STABLE AS NORMAL RELEASE!\n  Notify-Beta-Versions: true\n\nCorpses:\n  # Should we override corpses spawn from CorpsesReborn plugin?\n  # When player will die outside game corpse won't be spawned!\n  # Disable this if you don't want this!\n  # WARNING: If disabled, two corpses will be spawned when player in-game dies\n  Integration-Overwrite: true\n\n\nGold:\n  #Should we change spawner mode to spawn on all spawners instant of random one\n  Spawner-Mode: false\n  #Should we disable the gold spawn limit (It does not spawn more gold than spawner locations)\n  Limiter: false\n  #Should we spawn more than 1 gold at a spawner at the same time\n  Multiple: false\n  Amount:\n    #How much gold should a player need to get a bow\n    Bow: 10\n    #How much arrows should the player get? (Cause: Bow because enough gold collected)\n    Arrows: 3\n    #How much arrows should a player with bow gets when he pick up a gold ingot?\n    Pick-Up: 1\n\n\nBow:\n  #Should Detectives be killed if they kill a innocent?\n  Kill-Detective: true\n  Amount:\n    Arrows:\n      #How much arrows should the detective gets on game start or when a player get a bow?\n      Detective: 10\n      #How much arrows should the fake detective get? (Cause: Player pick up bow after detective died)\n      Fake: 3\n      #How much arrows should the player get when the prayer gives a bow to him?\n      Prayer: 2\n      #How much arrows should the player get after x picked up gold\n      Gold: 3\n  #How long should be the bow shoot cooldown in seconds?\n  Cooldown: 5\n\n\nHide:\n  # Should we disable death messages, so the player dies without other recognizes it\n  # It will not broadcast the death message to all ;)\n  Death: false\n  # Should players' name tags in game be hidden?\n  Nametags: true\n\n\nMurderer:\n  # Should the murderer get speed effect?\n  # Enter a multiplier (min 2, max 10, 1 is normal speed)\n  Speed: 3\n  # Should the Murderer get a locator with Innocent location information\n  # gets the locator if arena time lower 30 and only one innocent left\n  Locator: true\n\n\nSword:\n  # How many blocks per tick sword thrown by murderer should fly\n  # Please avoid high values as it might look like the sword is\n  # blinking each tick\n  Speed: 0.65\n  Fly:\n    # How many blocks should the sword fly\n    Range: 20\n    # In what radius should we hit the players\n    Radius: 0.5\n  Cooldown:\n    #How long should be the sword attack after throw cooldown in seconds?\n    #Its normal lower than Murderer-Sword-Fly-Cooldown!\n    Attack: 1\n    #How long should be the sword fly cooldown in seconds?\n    Fly: 5\n\n# Don't edit it. But who's stopping you? It's your server!\n# Really, don't edit ;p\n# You edited it, huh? Next time hurt yourself!\nDo-Not-Edit:\n  File-Version: 2\n  Core-Version: 6"
  },
  {
    "path": "src/main/resources/internal/data.yml",
    "content": "###############################[IMPORTANT]###############################\n#\n#   Leave this file as it is! It is kinda an internal file!\n#\n### !!!Do not change anything here!!!\n#\n### THIS FILE AUTOMATICALLY REGENERATES ON SERVER RESTART\n#\n###############################[IMPORTANT]###############################\nPlugin:\n  Name:\n    Short: mm\n    Long: murdermystery\n  Id:\n    Spigot: 66614\n    BStats: 3038\n  Compatibility:\n    Spigot:\n      - \"1.8\"\n      - \"1.9\"\n      - \"1.10\"\n      - \"1.11\"\n      - \"1.12\"\n      - \"1.13\"\n      - \"1.14\"\n      - \"1.15\"\n      - \"1.16\"\n      - \"1.17\"\n      - \"1.18\""
  },
  {
    "path": "src/main/resources/internal/leaderboards_data.yml",
    "content": "holograms: {}"
  },
  {
    "path": "src/main/resources/language.yml",
    "content": "#    You can translate MurderMystery messages here.\n#             Color codes (&) supported.\n#\n#             Use \\n to make new line\n#             Some messages like item\n#        descriptions don't support new lines\n# they are wrapped every 40 characters automatically\n#\n#     Some messages support their own placeholders\n#            like %player%, %kit% etc.\n\n#\n# Color scheme\n#\nColor:\n  Placeholder:\n    Value: \"&4\"\n    Number: \"&4\"\n    Player: \"&b\"\n    Other: \"&4\"\n  Chat:\n    Issue: \"&c\"\n    Messages: \"&7\"\n    Special-Char:\n      Contains: \"[,],(,),{,},■,/,|,▸\"\n      Before: \"&8\"\n\n\n#\n# Command messages\n#\nCommands:\n  Did-You-Mean: \"%plugin_prefix% Did you mean /%value%?\"\n  Command-Executed: \"%plugin_prefix% Command successfully executed!\"\n  Teleported-To-Lobby: \"%plugin_prefix% Teleported to lobby!\"\n  Removed-Game-Instance: \"%color_chat_issue%%plugin_prefix% Successfully removed game instance!\"\n  No-Arena-Like-That: \"%color_chat_issue%%plugin_prefix% No arena with that ID!\"\n  Look-At-Sign: \"%color_chat_issue%%plugin_prefix% You have to look at a sign to perform this command!\"\n  Type-Arena-Name: \"%color_chat_issue%%plugin_prefix% Please type arena ID!\"\n  Hold-Any-Item: \"%color_chat_issue%%plugin_prefix% You must hold any item!\"\n  No-Free-Arenas: \"%color_chat_issue%%plugin_prefix% There are no free arenas!\"\n  Only-By-Player: \"%color_chat_issue%%plugin_prefix% You can execute this command only as player!\"\n  Not-Playing: \"%color_chat_issue%%plugin_prefix% You must play to execute this command!\"\n  No-Permission: \"%color_chat_issue%%plugin_prefix% You don't have permission to use this command!\"\n  Player-Not-Found: \"%color_chat_issue%%plugin_prefix% Target player %player% doesn't exist!\"\n  Invalid-Location-Teleport: \"%color_chat_issue%%plugin_prefix% Location to teleport is invalid!\"\n  Wrong-Usage: \"%color_chat_issue%%plugin_prefix% Wrong usage. Do %value%\"\n  Admin:\n    Adjust-Statistic: \"%plugin_prefix% Statistic %value% of %player% is now %number%!\"\n    Reload-Success: \"%plugin_prefix% Arenas reloaded!\"\n    List:\n      Header: \"%plugin_name% arenas: Name State Players\"\n      Format: \"%arena_name% %arena_state_placeholder% %arena_players_size%/%arena_max_players%\"\n      No-Arenas: \"%color_chat_issue%%plugin_prefix% There are no game instances!\"\n    Spychat:\n      Toggled: \"%plugin_prefix% Game spy chat toggled to %value%\"\n  Main:\n    Header: \"&6----------------{%plugin_name% commands}----------\"\n    Description:\n      - \"&aGame commands:\"\n      - \"&b/%plugin_short_command% stats: Shows your stats!\"\n      - \"&b/%plugin_short_command% leave: Quits current arena!\"\n      - \"&b/%plugin_short_command% join <arena>: Joins specified arena!\"\n      - \"&b/%plugin_short_command% top <statistic>: Shows top 10 players!\"\n      - \"&b/%plugin_short_command% randomjoin: Join random arena!\"\n    Admin-Bonus-Description: \"&b/%plugin_short_command%: Shows all the admin commands\"\n    Footer: \"&6-------------------------------------------------\"\n\n\n#\n# In-Game scoreboard messages\n#\n# Please do not use more chars than the scoreboard can handle!\n# Scoreboard supports up to 122 chars for 1.14+ and 48 chars for 1.13- (COLOR CODES INCLUDED.)\n# Placeholders:\n# https://wiki.plugily.xyz/REPLACEWITHPROJECTNAME/placeholders/language\nScoreboard:\n  Title: \"&a&l%plugin_name%\"\n  Roles:\n    Detective: \"&bDetective\"\n    Murderer: \"&cMurderer\"\n    Innocent: \"&eInnocent\"\n    Dead: \"Dead\"\n  Detective:\n    Alive: \"Detective &aAlive\"\n    Bow:\n      Dropped: \"%color_chat_issue%Bow Dropped\"\n      Picked: \"Bow Not Dropped\"\n  Content:\n    Waiting:\n      - \"\"\n      - \"■ Players | %arena_players_size%\"\n      - \"\"\n      - \"■ Minimum Players | %arena_min_players%\"\n      - \"\"\n      - \"   www.plugily.xyz\"\n    Starting:\n      - \"\"\n      - \"■ Starting In | %arena_time%\"\n      - \"\"\n      - \"■ Players | %arena_players_size%\"\n      - \"\"\n      - \"■ Minimum Players | %arena_min_players%\"\n      - \"\"\n      - \"   www.plugily.xyz\"\n    # Contents of scoreboard while ingame\n    In-Game:\n      - \"\"\n      - \"■ Role | %arena_player_role%\"\n      - \"&f\"\n      - \"■ Innocents | %arena_innocent_size%\"\n      - \"&f\"\n      - \"■ Time | %arena_time%\"\n      - \"\"\n      - \"■ %arena_detective_status%\"\n      - \"\"\n      - \"■ Score | %user_statistic_local_score%\"\n      - \"\"\n      - \"   www.plugily.xyz\"\n    In-Game-Murderer:\n      - \"\"\n      - \"■ Role | %arena_player_role%\"\n      - \"&f\"\n      - \"■ Innocents | %arena_innocent_size%\"\n      - \"&f\"\n      - \"■ Time | %arena_time%\"\n      - \"\"\n      - \"■ %arena_detective_status%\"\n      - \"\"\n      - \"■ Kills | %user_statistic_local_kills%\"\n      - \"\"\n      - \"■ Score | %user_statistic_local_score%\"\n      - \"\"\n      - \"   www.plugily.xyz\"\n    # Contents of scoreboard while state is ending\n    Ending:\n      - \"&f\"\n      - \"&f\"\n      - \"&cGAME ENDED\"\n      - \"\"\n      - \"&f\"\n      - \"&f\"\n      - \"\"\n      - \"   www.plugily.xyz\"\n    # Contents of scoreboard while state is restarting\n    Restarting:\n      - \"&f\"\n      - \"&f\"\n      - \"&cRESTARTING GAME\"\n      - \"\"\n      - \"&f\"\n      - \"&f\"\n      - \"\"\n      - \"   www.plugily.xyz\"\n\n#\n# Bossbar messages\n#\n# Bossbar needs to be enabled on config.yml\nBossbar:\n  Title: \"%plugin_name% - www.plugily.xyz\"\n  Content:\n    Waiting:\n      - \"Waiting for more players...\"\n    Starting:\n      - \"Starting in: %arena_time%\"\n    In-Game:\n      - \"Playing %plugin_name_uppercase% on PLUGILY.XYZ\"\n      - \"Check the plugin creator out on PLUGILY.XYZ\"\n      - \"Your role %arena_player_role%\"\n    Ending:\n      - \"Game has ended! You were playing on PLUGILY.XYZ\"\n    Restarting:\n      - \"Restarting the arena. You will be moved soon!\"\n\n#\n# In-Game Messages\n#\nIn-Game:\n  #Used in most game messages.\n  Plugin-Prefix: \"(%plugin_name%)\"\n  Game-Chat-Format: \"[%user_statistic_level%] %player% | %message%\"\n  You-Leveled-Up: \"%plugin_prefix% You leveled up! You're now level %number%!\"\n  Commands-Blocked: \"%color_chat_issue%%plugin_prefix% You have to leave the game first to perform commands. The only command that works is /%plugin_short_command% leave!\"\n  Join:\n    Already-Playing: \"%color_chat_issue%%plugin_prefix% You are already queued for a game! You can leave a game with /%plugin_short_command% leave.\"\n    No-Permission: \"%color_chat_issue%%plugin_prefix% You don't have %value% permission to join this arena!\"\n    Full-Game: \"%color_chat_issue%%plugin_prefix% You don't have the permission to join full games!\"\n    No-Slots-For-Premium: \"%color_chat_issue%%plugin_prefix% This game is already full of premium players! Sorry\"\n    # Join cancelled via external plugin that uses the API of our plugin.\n    Cancelled-Via-API: \"%color_chat_issue%%plugin_prefix% You can't join this game!\"\n    As-Party-Member: \"%color_chat_issue%%plugin_prefix% You joined %arena_name% because the party leader joined it!\"\n    Arena-Not-Configured: \"%color_chat_issue%%plugin_prefix% Arena is not configured yet! Contact your server's staff!\"\n    Title: \"20,30,20;%arena_name%;%arena_players_size%/%arena_max_players%\"\n  Death:\n    Tag: \"&8Dead\"\n    Screen: \"%color_chat_issue%You died!\"\n  Spectator:\n    Blocked: \"%color_chat_issue%%plugin_prefix% Spectators are disabled for this arena\"\n    You-Are-Spectator: \"%plugin_prefix% You're now a spectator! You can fly now!\"\n    Spectator-Menu-Name: \"%color_chat_issue%Alive players list\"\n    Target-Player-Health: \"%color_chat_issue%Health: %number% | Role: %arena_player_role%\"\n    Spectator-Warning: \"%plugin_prefix% You are a spectator!\"\n    Teleport: \"%plugin_prefix% Teleported to %player%\"\n    Menu:\n      Settings:\n        Status:\n          Enabled: \"Enabled\"\n          Disabled: \"Disabled\"\n        Changed-Speed: \"Changed Speed to %number%\"\n        Auto-Teleport: \"%value% auto teleport\"\n        Target-Player:\n          Action-Bar: \"%number% blocks away | Target %player%\"\n        Night-Vision: \"%value% night vision\"\n        First-Person-Mode:\n          Action-Bar: \"&eSNEAK &cto leave! | Target %player%\"\n          Title: \"&eSNEAK &cto leave!\"\n        Visibility: \"%value% other spectator players\"\n  Messages:\n    Join: \"%plugin_prefix% %player% joined the game (%arena_players_size%/%arena_max_players%)!\"\n    Leave: \"%plugin_prefix% %player% left the game (%arena_players_size%/%arena_max_players%)!\"\n    Death: \"%plugin_prefix% %player% died!\"\n    Lobby:\n      Start-In: \"%plugin_prefix% The game starts in %arena_time% seconds!\"\n      Waiting-For-Players: \"%plugin_prefix% Waiting for players... We need at least %arena_min_players% players to start.\"\n      Enough-Players-To-Start: \"%plugin_prefix% We now have enough players. The game is starting soon!\"\n      Reduced-Time: \"%plugin_prefix% The time got reduced to %number% seconds\"\n      Max-Players: \"%plugin_prefix% We reached max players for this round. Let's shorten the time!\"\n      Game-Started: \"%plugin_prefix% The game has started!\"\n      Kicked-For-Premium-Slot: \"%color_chat_issue%%plugin_prefix% %player% got removed from the game to make a place for premium players!\"\n      You-Were-Kicked-For-Premium-Slot: \"%color_chat_issue%%plugin_prefix% You got kicked out of the game to make a place for a premium player!\"\n      Not-Enough-Space-For-Party: \"%color_chat_issue%%plugin_prefix% Your party is bigger than free places on the arena %arena_name%\"\n    Game-End:\n      Summary:\n        - \"&a&m--------------------------------------------------\"\n        - \"%plugin_name%\"\n        - \"\"\n        - \"%arena_summary%\"\n        - \"%arena_summary_player%\"\n        - \"\"\n        - \"&7Detective: %arena_detective_list%\"\n        - \"&7Murderer: %arena_murderer_list% (%arena_murderer_kills%)\"\n        - \"&7Hero: %arena_hero%\"\n        - \"\"\n        - \"&a&m--------------------------------------------------\"\n      Placeholders:\n        Win: \"&aYou won the game\"\n        Lose: \"%color_chat_issue%You lost the game\"\n        Players: \"&cThere are not enough players anymore. Arena got force stopped!\"\n        Murderer:\n          Stopped: \"The Murderer has been stopped!\"\n          Killed:\n            You: \"The murderer killed you!\"\n            All: \"The Murderer has killed everyone.\"\n        Innocent:\n          Killed:\n            You: \"A player killed you with a Bow!\"\n            Wrongly: \"You killed an innocent player!\"\n        Nobody: \"Nobody\"\n    Admin:\n      Set-Starting-In-To-0: \"%plugin_prefix% An admin set waiting time to 0. The game starts now!\"\n    Arena:\n      Chances:\n        Action-Bar: \"&cMurderer Chance: %arena_murderer_chance% &a- &bDetective Chance: %arena_detective_chance%\"\n      Cooldown: \"&8&l[%value%&8&l] &6%number% seconds\"\n      Locator:\n        Bow: \"Bow locator\"\n        Innocent: \"Innocent locator\"\n        Watch-Out: \"5,20,5;Watch out!;The Murderer can now find survivors easily\"\n      Pass:\n        Name: \"Role pass menu\"\n        Role:\n          Murderer:\n            Name: \"&cBe murderer\"\n            Lore:\n              - \"Cost 1 murderer pass\"\n              - \"You got %number%\"\n          Detective:\n            Name: \"&bBe detective\"\n            Lore:\n              - \"Cost 1 detective pass\"\n              - \"You got %number%\"\n        Fail: \"%plugin_prefix% You do not got enough passes for %value% role\"\n        Success: \"%plugin_prefix% You will be %value% next round!\"\n        Change: \"%plugin_prefix% You now got %number% %value% passes!\"\n      Playing:\n        Time-Left: \"5,20,5;%arena_time% seconds left!;After %arena_time%s the Murderer will lose\"\n        Role:\n          Change: \"5,20,5;Previous %arena_player_role% has left!\"\n          Murderer: \"5,20,5;ROLE | MURDERER; Kill all players!\"\n          Detective: \"5,20,5;ROLE | DETECTIVE;Find and kill the murderer!\"\n          Innocent: \"5,20,5;ROLE | INNOCENT;Stay alive as long as possible!\"\n        Score:\n          Bonus: \"+%number% score (%value%)\"\n          Gold: \"Picked up gold!\"\n          Action:\n            Kill:\n              Player: \"for killing players\"\n              Murderer: \"for killing murderer\"\n              Innocent: \"for killing innocent\"\n            Pickup:\n              Gold: \"for gold pickup\"\n            Surviving:\n              Time: \"for surviving 30 seconds\"\n              End: \"for surviving till end\"\n            Win: \"for winning the game\"\n            Detective: \"for %number% innocents survived\"\n        Sword:\n          Soon: \"The Murderer gets their sword in %number% seconds!\"\n        Special-Blocks:\n          Cauldron:\n            Potion: \"Please drink your current potion!\"\n            Hologram: \"Mystery Potion - &e1 Gold\"\n          Not-Enough-Gold: \"You need %number% gold for this!\"\n          Pray:\n            Hologram: \"Click to give gift;Pull lever to pray\"\n            Chat: \"You prayed to the developer! Hope he will hear that!\"\n            Pay: \"%color_chat_issue%Pay to pray!\"\n            Praise:\n              Heard:\n                - \"\"\n                - \"&7Developer hears your prayer.\"\n                - \"%feeling%\"\n                - \"%praise%\"\n              Feeling:\n                Blessed: \"&aYou feel blessed.\"\n                Cursed: \"&cYou feel cursed.\"\n              Gifts:\n                Detective-Revelation: \"&aYou know that &bCurrent detective &ais %detective%\"\n                Gold-Rush: \"&aYou received power of ancients. For each gold you collect, you will receive 3 gold now.\"\n                Single-Compensation: \"&aDeveloper is proud of you! He rewarded you with 5 gold ingots!\"\n                Bow: \"&aYou received bow from pleased developer!\"\n              Curses:\n                Slowness: \"%color_chat_issue%Your legs are much heavier than before.\"\n                Blindness: \"%color_chat_issue%Your eyes can't see that well anymore.\"\n                Gold: \"%color_chat_issue%Developer cursed you with gold ban! You cannot longer pickup any gold!\"\n                Death: \"%color_chat_issue%You feel overpowering force of death. You know that you'll be dead in a minute!\"\n        Bow:\n          Dropped: \"5,20,5;The Bow has been dropped!;Find the Bow for a chance to kill the Murderer.\"\n          Pickup: \"A player has picked up the Bow!\"\n          Shot:\n            Gold: \"&a+1 Bow Shot!\"\n            Title: \"5,20,5;;You collected 10 gold and got an arrow!\"\n\n\n\n\n\n\n\n#\n# Sign messages\n#\nSigns:\n  Please-Type-Arena-Name: \"%color_chat_issue%%plugin_prefix% Please type arena name in second line!\"\n  Arena-Doesnt-Exists: \"%color_chat_issue%%plugin_prefix% Arena with that name doesn't exists!\"\n  Created: \"%plugin_prefix% Sign created successfully!\"\n  Removed: \"%plugin_prefix% Sign successfully removed!\"\n  Lines:\n    - \"%plugin_prefix%\"\n    - \"%arena_state_placeholder%\"\n    - \"%arena_name%\"\n    - \"[%arena_players_size%/%arena_max_players%]\"\n\n\n#\n# Arena Selector messages\n#\nArena-Selector:\n  Inventory-Title: \"%plugin_short_command% ▸ Arena selector\"\n  Item:\n    Name: \"%arena_name%\"\n    Lore:\n      - \"%plugin_name% - %arena_name%\"\n      - \" \"\n      - \" \"\n      - \"  Online: %arena_players_size%/%arena_max_players%\"\n      - \"  State: %arena_state_placeholder%\"\n      - \" \"\n      - \" \"\n      - \"&aClick to join this arena\"\n\n#\n# Validator messages\n#\nValidator:\n  Invalid-Arena-Configuration: \"Arena %arena_name% has invalid configuration! Missing node: %value%\"\n  Instance-Started: \"Arena %arena_name% instance successfully started!\"\n  No-Instances-Created: \"There are no arena instances created in configuration!\"\n\n\n#\n# Placeholder messages inside plugin\n#\nPlaceholders:\n  Game-States:\n    Waiting: \"&lWaiting for players...\"\n    Starting: \"&e&lStarting\"\n    Full-Game: \"&4&lFULL\"\n    In-Game: \"&lIn-game\"\n    Ending: \"&lEnding\"\n    Restarting: \"&c&lRestarting\"\n  Motd:\n    Waiting: \"&lYou can join this game...\"\n    Starting: \"&e&lStarting\"\n    Full-Game: \"&4&lFULL | Use another Server\"\n    In-Game: \"&lIn-game | Click to spectate\"\n    Ending: \"&lEnding | Server is closing\"\n    Restarting: \"&c&lRestarting\"\n\n\n#\n# Leaderboard messages\n#\n# Hologram function need to be enabled on config.yml\nLeaderboard:\n  Type:\n    Hologram:\n      Header: \"&6&lTop %number% in %value%\"\n      Format: \"&e%number%. %player% (%value%)\"\n      Empty-Format: \"&e%number%. Empty (0)\"\n    Chat:\n      Header: \"&8+-------+ &a&lYOUR STATS &8+-------+\"\n      Header-Other: \"&8+---------+ &aSTATS FOR &b%player% &8+---------+\"\n      Footer: \"&8+-----------------------------+\"\n      Format: \"%value% ▸ &a%number%\"\n      Top:\n        Type-Name: \"%color_chat_issue%Please type statistic name to view!\"\n        Header: \"&8&m+----------------+ [&6 Top 10 &8&m] +----------------+\"\n        Format: \"&e#%number% %player% - %value% %user_statistic%\"\n  Statistics:\n    Wins: \"Wins ▸ %number%\"\n    Loses: \"Loses ▸ %number%\"\n    Games-Played: \"Games Played ▸ %number%\"\n    Level: \"Level ▸ %number%\"\n    Exp: \"Experience ▸ %number%\"\n    Next-Level-Exp: \"Exp to Level Up ▸ %number%\"\n    Kills: \"Kills ▸ %number%\"\n    Deaths: \"Deaths ▸ %number%\"\n    Highest-Score: \"Highest score ▸ %number%\"\n    Murderer-Pass: \"Murderer passes ▸ %number%\"\n    Detective-Pass: \"Detective passes ▸ %number%\"\n    Murderer-Contribution: \"Murderer contribution ▸ %number%\"\n    Detective-Contribution: \"Detective contribution ▸ %number%\"\n  Invalid-Name: \"%color_chat_issue%Name of statistic is invalid! Type: %value%\"\n  Unknown-Player: \"%color_chat_issue%Unknown Player\"\n\n\n# Don't edit it. But who's stopping you? It's your server!\n# Really, don't edit ;p\n# You edited it, huh? Next time hurt yourself!\nDo-Not-Edit:\n  File-Version: 1\n  Core-Version: 2\n"
  },
  {
    "path": "src/main/resources/lastwords.yml",
    "content": "Last-Words:\n  Hologram:\n    Title: \"%player%'s last words:\"\n    Content:\n      'default':\n        Message: \"&fPlease respawn :(\"\n      'meme':\n        Message: \"&fDespacito 2 is confirmed by God\"\n        Permission: \"murdermystery.lastwords.meme\"\n      'rage':\n        Message: \"&fWHY YOU KILLED ME?!!?\"\n        Permission: \"murdermystery.lastwords.rage\"\n      'pro':\n        Message: \"&fIt was lagging...\"\n        Permission: \"murdermystery.lastwords.pro\"\n      'hacker':\n        Message: \"Turn off your hacks...\"\n        Permission: \"murdermystery.lastwords.hacker\""
  },
  {
    "path": "src/main/resources/leaderboards.yml",
    "content": "# Don't edit it. But who's stopping you? It's your server!\n# Really, don't edit ;p\n# You edited it, huh? Next time hurt yourself!\nDo-Not-Edit:\n  File-Version: 1\n  Core-Version: 1"
  },
  {
    "path": "src/main/resources/locales/language_default.yml",
    "content": "###############################[IMPORTANT]###############################\n#\n#   Leave this file as it is! It is kinda an internal backup file!\n#\n### !!!Do not change anything here!!!\n#\n### THIS FILE AUTOMATICALLY REGENERATES ON SERVER RESTART\n#\n#   Needed when the external api isn't working\n#\n###############################[IMPORTANT]###############################\n#    You can translate MurderMystery messages here.\n#             Color codes (&) supported.\n#\n#             Use \\n to make new line\n#             Some messages like item\n#        descriptions don't support new lines\n# they are wrapped every 40 characters automatically\n#\n#     Some messages support their own placeholders\n#            like %player%, %kit% etc.\n\n#\n# Color scheme\n#\nColor:\n  Placeholder:\n    Value: \"&4\"\n    Number: \"&4\"\n    Player: \"&b\"\n    Other: \"&4\"\n  Chat:\n    Issue: \"&c\"\n    Messages: \"&7\"\n    Special-Char:\n      Contains: \"[,],(,),{,},■,/,|,▸\"\n      Before: \"&8\"\n\n\n#\n# Command messages\n#\nCommands:\n  Did-You-Mean: \"%plugin_prefix% Did you mean /%value%?\"\n  Command-Executed: \"%plugin_prefix% Command successfully executed!\"\n  Teleported-To-Lobby: \"%plugin_prefix% Teleported to lobby!\"\n  Removed-Game-Instance: \"%color_chat_issue%%plugin_prefix% Successfully removed game instance!\"\n  No-Arena-Like-That: \"%color_chat_issue%%plugin_prefix% No arena with that ID!\"\n  Look-At-Sign: \"%color_chat_issue%%plugin_prefix% You have to look at a sign to perform this command!\"\n  Type-Arena-Name: \"%color_chat_issue%%plugin_prefix% Please type arena ID!\"\n  Hold-Any-Item: \"%color_chat_issue%%plugin_prefix% You must hold any item!\"\n  No-Free-Arenas: \"%color_chat_issue%%plugin_prefix% There are no free arenas!\"\n  Only-By-Player: \"%color_chat_issue%%plugin_prefix% You can execute this command only as player!\"\n  Not-Playing: \"%color_chat_issue%%plugin_prefix% You must play to execute this command!\"\n  No-Permission: \"%color_chat_issue%%plugin_prefix% You don't have permission to use this command!\"\n  Player-Not-Found: \"%color_chat_issue%%plugin_prefix% Target player %player% doesn't exist!\"\n  Invalid-Location-Teleport: \"%color_chat_issue%%plugin_prefix% Location to teleport is invalid!\"\n  Wrong-Usage: \"%color_chat_issue%%plugin_prefix% Wrong usage. Do %value%\"\n  Admin:\n    Adjust-Statistic: \"%plugin_prefix% Statistic %value% of %player% is now %number%!\"\n    Reload-Success: \"%plugin_prefix% Arenas reloaded!\"\n    List:\n      Header: \"%plugin_name% arenas: Name State Players\"\n      Format: \"%arena_name% %arena_state_placeholder% %arena_players_size%/%arena_max_players%\"\n      No-Arenas: \"%color_chat_issue%%plugin_prefix% There are no game instances!\"\n    Spychat:\n      Toggled: \"%plugin_prefix% Game spy chat toggled to %value%\"\n  Main:\n    Header: \"&6----------------{%plugin_name% commands}----------\"\n    Description:\n      - \"&aGame commands:\"\n      - \"&b/%plugin_short_command% stats: Shows your stats!\"\n      - \"&b/%plugin_short_command% leave: Quits current arena!\"\n      - \"&b/%plugin_short_command% join <arena>: Joins specified arena!\"\n      - \"&b/%plugin_short_command% top <statistic>: Shows top 10 players!\"\n      - \"&b/%plugin_short_command% randomjoin: Join random arena!\"\n    Admin-Bonus-Description: \"&b/%plugin_short_command%: Shows all the admin commands\"\n    Footer: \"&6-------------------------------------------------\"\n\n\n#\n# In-Game scoreboard messages\n#\n# Please do not use more chars than the scoreboard can handle!\n# Scoreboard supports up to 122 chars for 1.14+ and 48 chars for 1.13- (COLOR CODES INCLUDED.)\n# Placeholders:\n# https://wiki.plugily.xyz/REPLACEWITHPROJECTNAME/placeholders/language\nScoreboard:\n  Title: \"&a&l%plugin_name%\"\n  Roles:\n    Detective: \"&bDetective\"\n    Murderer: \"&cMurderer\"\n    Innocent: \"&eInnocent\"\n    Dead: \"Dead\"\n  Detective:\n    Alive: \"Detective &aAlive\"\n    Bow:\n      Dropped: \"%color_chat_issue%Bow Dropped\"\n      Picked: \"Bow Not Dropped\"\n  Content:\n    Waiting:\n      - \"\"\n      - \"■ Players | %arena_players_size%\"\n      - \"\"\n      - \"■ Minimum Players | %arena_min_players%\"\n      - \"\"\n      - \"   www.plugily.xyz\"\n    Starting:\n      - \"\"\n      - \"■ Starting In | %arena_time%\"\n      - \"\"\n      - \"■ Players | %arena_players_size%\"\n      - \"\"\n      - \"■ Minimum Players | %arena_min_players%\"\n      - \"\"\n      - \"   www.plugily.xyz\"\n    # Contents of scoreboard while ingame\n    In-Game:\n      - \"\"\n      - \"■ Role | %arena_player_role%\"\n      - \"&f\"\n      - \"■ Innocents | %arena_innocent_size%\"\n      - \"&f\"\n      - \"■ Time | %arena_time%\"\n      - \"\"\n      - \"■ %arena_detective_status%\"\n      - \"\"\n      - \"■ Score | %user_statistic_local_score%\"\n      - \"\"\n      - \"   www.plugily.xyz\"\n    In-Game-Murderer:\n      - \"\"\n      - \"■ Role | %arena_player_role%\"\n      - \"&f\"\n      - \"■ Innocents | %arena_innocent_size%\"\n      - \"&f\"\n      - \"■ Time | %arena_time%\"\n      - \"\"\n      - \"■ %arena_detective_status%\"\n      - \"\"\n      - \"■ Kills | %user_statistic_local_kills%\"\n      - \"\"\n      - \"■ Score | %user_statistic_local_score%\"\n      - \"\"\n      - \"   www.plugily.xyz\"\n    # Contents of scoreboard while state is ending\n    Ending:\n      - \"&f\"\n      - \"&f\"\n      - \"&cGAME ENDED\"\n      - \"\"\n      - \"&f\"\n      - \"&f\"\n      - \"\"\n      - \"   www.plugily.xyz\"\n    # Contents of scoreboard while state is restarting\n    Restarting:\n      - \"&f\"\n      - \"&f\"\n      - \"&cRESTARTING GAME\"\n      - \"\"\n      - \"&f\"\n      - \"&f\"\n      - \"\"\n      - \"   www.plugily.xyz\"\n\n#\n# Bossbar messages\n#\n# Bossbar needs to be enabled on config.yml\nBossbar:\n  Title: \"%plugin_name% - www.plugily.xyz\"\n  Content:\n    Waiting:\n      - \"Waiting for more players...\"\n    Starting:\n      - \"Starting in: %arena_time%\"\n    In-Game:\n      - \"Playing %plugin_name_uppercase% on PLUGILY.XYZ\"\n      - \"Check the plugin creator out on PLUGILY.XYZ\"\n      - \"Your role %arena_player_role%\"\n    Ending:\n      - \"Game has ended! You were playing on PLUGILY.XYZ\"\n    Restarting:\n      - \"Restarting the arena. You will be moved soon!\"\n\n#\n# In-Game Messages\n#\nIn-Game:\n  #Used in most game messages.\n  Plugin-Prefix: \"(%plugin_name%)\"\n  Game-Chat-Format: \"[%user_statistic_level%] %player% | %message%\"\n  You-Leveled-Up: \"%plugin_prefix% You leveled up! You're now level %number%!\"\n  Commands-Blocked: \"%color_chat_issue%%plugin_prefix% You have to leave the game first to perform commands. The only command that works is /%plugin_short_command% leave!\"\n  Join:\n    Already-Playing: \"%color_chat_issue%%plugin_prefix% You are already queued for a game! You can leave a game with /%plugin_short_command% leave.\"\n    No-Permission: \"%color_chat_issue%%plugin_prefix% You don't have %value% permission to join this arena!\"\n    Full-Game: \"%color_chat_issue%%plugin_prefix% You don't have the permission to join full games!\"\n    No-Slots-For-Premium: \"%color_chat_issue%%plugin_prefix% This game is already full of premium players! Sorry\"\n    # Join cancelled via external plugin that uses the API of our plugin.\n    Cancelled-Via-API: \"%color_chat_issue%%plugin_prefix% You can't join this game!\"\n    As-Party-Member: \"%color_chat_issue%%plugin_prefix% You joined %arena_name% because the party leader joined it!\"\n    Arena-Not-Configured: \"%color_chat_issue%%plugin_prefix% Arena is not configured yet! Contact your server's staff!\"\n    Title: \"20,30,20;%arena_name%;%arena_players_size%/%arena_max_players%\"\n  Death:\n    Tag: \"&8Dead\"\n    Screen: \"%color_chat_issue%You died!\"\n  Spectator:\n    Blocked: \"%color_chat_issue%%plugin_prefix% Spectators are disabled for this arena\"\n    You-Are-Spectator: \"%plugin_prefix% You're now a spectator! You can fly now!\"\n    Spectator-Menu-Name: \"%color_chat_issue%Alive players list\"\n    Target-Player-Health: \"%color_chat_issue%Health: %number% | Role: %arena_player_role%\"\n    Spectator-Warning: \"%plugin_prefix% You are a spectator!\"\n    Teleport: \"%plugin_prefix% Teleported to %player%\"\n    Menu:\n      Settings:\n        Status:\n          Enabled: \"Enabled\"\n          Disabled: \"Disabled\"\n        Changed-Speed: \"Changed Speed to %number%\"\n        Auto-Teleport: \"%value% auto teleport\"\n        Target-Player:\n          Action-Bar: \"%number% blocks away | Target %player%\"\n        Night-Vision: \"%value% night vision\"\n        First-Person-Mode:\n          Action-Bar: \"&eSNEAK &cto leave! | Target %player%\"\n          Title: \"&eSNEAK &cto leave!\"\n        Visibility: \"%value% other spectator players\"\n  Messages:\n    Join: \"%plugin_prefix% %player% joined the game (%arena_players_size%/%arena_max_players%)!\"\n    Leave: \"%plugin_prefix% %player% left the game (%arena_players_size%/%arena_max_players%)!\"\n    Death: \"%plugin_prefix% %player% died!\"\n    Lobby:\n      Start-In: \"%plugin_prefix% The game starts in %arena_time% seconds!\"\n      Waiting-For-Players: \"%plugin_prefix% Waiting for players... We need at least %arena_min_players% players to start.\"\n      Enough-Players-To-Start: \"%plugin_prefix% We now have enough players. The game is starting soon!\"\n      Reduced-Time: \"%plugin_prefix% The time got reduced to %number% seconds\"\n      Max-Players: \"%plugin_prefix% We reached max players for this round. Let's shorten the time!\"\n      Game-Started: \"%plugin_prefix% The game has started!\"\n      Kicked-For-Premium-Slot: \"%color_chat_issue%%plugin_prefix% %player% got removed from the game to make a place for premium players!\"\n      You-Were-Kicked-For-Premium-Slot: \"%color_chat_issue%%plugin_prefix% You got kicked out of the game to make a place for a premium player!\"\n      Not-Enough-Space-For-Party: \"%color_chat_issue%%plugin_prefix% Your party is bigger than free places on the arena %arena_name%\"\n    Game-End:\n      Summary:\n        - \"&a&m--------------------------------------------------\"\n        - \"%plugin_name%\"\n        - \"\"\n        - \"%arena_summary%\"\n        - \"%arena_summary_player%\"\n        - \"\"\n        - \"&7Detective: %arena_detective_list%\"\n        - \"&7Murderer: %arena_murderer_list% (%arena_murderer_kills%)\"\n        - \"&7Hero: %arena_hero%\"\n        - \"\"\n        - \"&a&m--------------------------------------------------\"\n      Placeholders:\n        Win: \"&aYou won the game\"\n        Lose: \"%color_chat_issue%You lost the game\"\n        Players: \"&cThere are not enough players anymore. Arena got force stopped!\"\n        Murderer:\n          Stopped: \"The Murderer has been stopped!\"\n          Killed:\n            You: \"The murderer killed you!\"\n            All: \"The Murderer has killed everyone.\"\n        Innocent:\n          Killed:\n            You: \"A player killed you with a Bow!\"\n            Wrongly: \"You killed an innocent player!\"\n        Nobody: \"Nobody\"\n    Admin:\n      Set-Starting-In-To-0: \"%plugin_prefix% An admin set waiting time to 0. The game starts now!\"\n    Arena:\n      Chances:\n        Action-Bar: \"&cMurderer Chance: %arena_murderer_chance% &a- &bDetective Chance: %arena_detective_chance%\"\n      Cooldown: \"&8&l[%value%&8&l] &6%number% seconds\"\n      Locator:\n        Bow: \"Bow locator\"\n        Innocent: \"Innocent locator\"\n        Watch-Out: \"5,20,5;Watch out!;The Murderer can now find survivors easily\"\n      Pass:\n        Name: \"Role pass menu\"\n        Role:\n          Murderer:\n            Name: \"&cBe murderer\"\n            Lore:\n              - \"Cost 1 murderer pass\"\n              - \"You got %number%\"\n          Detective:\n            Name: \"&bBe detective\"\n            Lore:\n              - \"Cost 1 detective pass\"\n              - \"You got %number%\"\n        Fail: \"You do not got enough passes for %value% role\"\n        Success: \"You will be %value% next round!\"\n        Change: \"You now got %number% %value% passes!\"\n      Playing:\n        Time-Left: \"5,20,5;%arena_time% seconds left!;After %arena_time%s the Murderer will lose\"\n        Role:\n          Change: \"5,20,5;Previous %arena_player_role% has left!\"\n          Murderer: \"5,20,5;ROLE | MURDERER; Kill all players!\"\n          Detective: \"5,20,5;ROLE | DETECTIVE;Find and kill the murderer!\"\n          Innocent: \"5,20,5;ROLE | INNOCENT;Stay alive as long as possible!\"\n        Score:\n          Bonus: \"+%number% score (%value%)\"\n          Gold: \"Picked up gold!\"\n          Action:\n            Kill:\n              Player: \"for killing players\"\n              Murderer: \"for killing murderer\"\n              Innocent: \"for killing innocent\"\n            Pickup:\n              Gold: \"for gold pickup\"\n            Surviving:\n              Time: \"for surviving 30 seconds\"\n              End: \"for surviving till end\"\n            Win: \"for winning the game\"\n            Detective: \"for %number% innocents survived\"\n        Sword:\n          Soon: \"The Murderer gets their sword in %number% seconds!\"\n        Special-Blocks:\n          Cauldron:\n            Potion: \"Please drink your current potion!\"\n            Hologram: \"Mystery Potion - &e1 Gold\"\n          Not-Enough-Gold: \"You need %number% gold for this!\"\n          Pray:\n            Hologram: \"Click to give gift;Pull lever to pray\"\n            Chat: \"You prayed to the developer! Hope he will hear that!\"\n            Pay: \"%color_chat_issue%Pay to pray!\"\n            Praise:\n              Heard:\n                - \"\"\n                - \"&7Developer hears your prayer.\"\n                - \"%feeling%\"\n                - \"%praise%\"\n              Feeling:\n                Blessed: \"&aYou feel blessed.\"\n                Cursed: \"&cYou feel cursed.\"\n              Gifts:\n                Detective-Revelation: \"&aYou know that &bCurrent detective &ais %detective%\"\n                Gold-Rush: \"&aYou received power of ancients. For each gold you collect, you will receive 3 gold now.\"\n                Single-Compensation: \"&aDeveloper is proud of you! He rewarded you with 5 gold ingots!\"\n                Bow: \"&aYou received bow from pleased developer!\"\n              Curses:\n                Slowness: \"%color_chat_issue%Your legs are much heavier than before.\"\n                Blindness: \"%color_chat_issue%Your eyes can't see that well anymore.\"\n                Gold: \"%color_chat_issue%Developer cursed you with gold ban! You cannot longer pickup any gold!\"\n                Death: \"%color_chat_issue%You feel overpowering force of death. You know that you'll be dead in a minute!\"\n        Bow:\n          Dropped: \"5,20,5;The Bow has been dropped!;Find the Bow for a chance to kill the Murderer.\"\n          Pickup: \"A player has picked up the Bow!\"\n          Shot:\n            Gold: \"&a+1 Bow Shot!\"\n            Title: \"5,20,5;;You collected 10 gold and got an arrow!\"\n\n\n\n\n\n\n\n#\n# Sign messages\n#\nSigns:\n  Please-Type-Arena-Name: \"%color_chat_issue%%plugin_prefix% Please type arena name in second line!\"\n  Arena-Doesnt-Exists: \"%color_chat_issue%%plugin_prefix% Arena with that name doesn't exists!\"\n  Created: \"%plugin_prefix% Sign created successfully!\"\n  Removed: \"%plugin_prefix% Sign successfully removed!\"\n  Lines:\n    - \"%plugin_prefix%\"\n    - \"%arena_state_placeholder%\"\n    - \"%arena_name%\"\n    - \"[%arena_players_size%/%arena_max_players%]\"\n\n\n#\n# Arena Selector messages\n#\nArena-Selector:\n  Inventory-Title: \"%plugin_short_command% ▸ Arena selector\"\n  Item:\n    Name: \"%arena_name%\"\n    Lore:\n      - \"%plugin_name% - %arena_name%\"\n      - \" \"\n      - \" \"\n      - \"  Online: %arena_players_size%/%arena_max_players%\"\n      - \"  State: %arena_state_placeholder%\"\n      - \" \"\n      - \" \"\n      - \"&aClick to join this arena\"\n\n#\n# Validator messages\n#\nValidator:\n  Invalid-Arena-Configuration: \"Arena %arena_name% has invalid configuration! Missing node: %value%\"\n  Instance-Started: \"Arena %arena_name% instance successfully started!\"\n  No-Instances-Created: \"There are no arena instances created in configuration!\"\n\n\n#\n# Placeholder messages inside plugin\n#\nPlaceholders:\n  Game-States:\n    Waiting: \"&lWaiting for players...\"\n    Starting: \"&e&lStarting\"\n    Full-Game: \"&4&lFULL\"\n    In-Game: \"&lIn-game\"\n    Ending: \"&lEnding\"\n    Restarting: \"&c&lRestarting\"\n  Motd:\n    Waiting: \"&lYou can join this game...\"\n    Starting: \"&e&lStarting\"\n    Full-Game: \"&4&lFULL | Use another Server\"\n    In-Game: \"&lIn-game | Click to spectate\"\n    Ending: \"&lEnding | Server is closing\"\n    Restarting: \"&c&lRestarting\"\n\n\n#\n# Leaderboard messages\n#\n# Hologram function need to be enabled on config.yml\nLeaderboard:\n  Type:\n    Hologram:\n      Header: \"&6&lTop %number% in %value%\"\n      Format: \"&e%number%. %player% (%value%)\"\n      Empty-Format: \"&e%number%. Empty (0)\"\n    Chat:\n      Header: \"&8+-------+ &a&lYOUR STATS &8+-------+\"\n      Header-Other: \"&8+---------+ &aSTATS FOR &b%player% &8+---------+\"\n      Footer: \"&8+-----------------------------+\"\n      Format: \"%value% ▸ &a%number%\"\n      Top:\n        Type-Name: \"%color_chat_issue%Please type statistic name to view!\"\n        Header: \"&8&m+----------------+ [&6 Top 10 &8&m] +----------------+\"\n        Format: \"&e#%number% %player% - %value% %user_statistic%\"\n  Statistics:\n    Wins: \"Wins ▸ %number%\"\n    Loses: \"Loses ▸ %number%\"\n    Games-Played: \"Games Played ▸ %number%\"\n    Level: \"Level ▸ %number%\"\n    Exp: \"Experience ▸ %number%\"\n    Next-Level-Exp: \"Exp to Level Up ▸ %number%\"\n    Kills: \"Kills ▸ %number%\"\n    Deaths: \"Deaths ▸ %number%\"\n    Highest-Score: \"Highest score ▸ %number%\"\n    Murderer-Pass: \"Murderer passes ▸ %number%\"\n    Detective-Pass: \"Detective passes ▸ %number%\"\n    Murderer-Contribution: \"Murderer contribution ▸ %number%\"\n    Detective-Contribution: \"Detective contribution ▸ %number%\"\n  Invalid-Name: \"%color_chat_issue%Name of statistic is invalid! Type: %value%\"\n  Unknown-Player: \"%color_chat_issue%Unknown Player\"\n\n\n# Don't edit it. But who's stopping you? It's your server!\n# Really, don't edit ;p\n# You edited it, huh? Next time hurt yourself!\nDo-Not-Edit:\n  File-Version: 1\n  Core-Version: 1\n"
  },
  {
    "path": "src/main/resources/mysql.yml",
    "content": "# MySQL database configuration, you don't need to touch this unless you enabled MySQL support.\n# To enable MySQL support go to > config.yml and set 'Database' to true\n\n# Replace <databasename> with your database\naddress: jdbc:mysql://localhost:3306/<databasename>?useSSL=false&autoReConnect=true\n\n# MySQL user name\nuser: <user>\n\n# MySQL user password\npassword: <password>\n\n# MySQL tablename\ntable: mm_playerstats\n\n# Maximum life time for HikariCP database.\n# For documentation, see https://github.com/brettwooldridge/HikariCP#frequently-used\n# Default 1800000 = 30 minute\nmaxLifeTime: 1800000\n\n# Don't edit it. But who's stopping you? It's your server!\n# Really, don't edit ;p\n# You edited it, huh? Next time hurt yourself!\nDo-Not-Edit:\n  File-Version: 1\n  Core-Version: 1"
  },
  {
    "path": "src/main/resources/permissions.yml",
    "content": "# You can create custom players permissions here.\n# Player with your custom permission will get int\n\n# All chances include murderer and detective\nChances-Boost:\n  # Do not use dots (.), they won't work.\n  # Increase chance by 10 times\n  chances-boost-5: 10\n  chances-boost-50: 50\n  # Increase chance by 100 times\n  admin-boost: 100\n\n\nMurderer-Boost:\n  # Do not use dots (.), they won't work.\n  # Increase murderer chance by 10\n  murderer-boost-5: 10\n  murderer-boost-50: 50\n  # Increase murderer chance by 100\n  admin-boost: 100\n\n\nDetective-Boost:\n  # Do not use dots (.), they won't work.\n  # Increase detective chance by 10\n  detective-boost-5: 10\n  detective-boost-50: 50\n  # Increase detective chance by 100\n  admin-boost: 100\n\n\n# Create custom exp boost permissions\nExp-Boost:\n  # Do not use dots (.), they won't work.\n  # Increase exp by 10 percent\n  exp-boost-10: 10\n  exp-boost-50: 50\n  # Increase exp by 300 percent\n  admin-boost: 300\n\n# Basic permissions for game, permissions explained here: https://wiki.plugily.xyz/\nBasic:\n  Full-Games: \"plugilyprojects.fullgames\"\n  # <arena> represents arena name (NOT MAP NAME!), for example: 'plugilyprojects.join.ARENAnice'\n  # use 'plugilyprojects.join.*' to enable access to all arenas\n  Join: \"plugilyprojects.join.<arena>\"\n  Forcestart: \"plugilyprojects.admin.forcestart\"\n\n# Don't edit it. But who's stopping you? It's your server!\n# Really, don't edit ;p\n# You edited it, huh? Next time hurt yourself!\nDo-Not-Edit:\n  File-Version: 1\n  Core-Version: 1"
  },
  {
    "path": "src/main/resources/plugin.yml",
    "content": "name: MurderMystery\nmain: plugily.projects.murdermystery.Main\nauthors: [ PlugilyProjects, Tigerpanzer_02 ]\nversion: ${project.version}\nsoftdepend: [CorpseReborn, PlaceholderAPI, Parties, Spigot-Party-API-PAF, PartyAndFriends, ViaVersion, ProtocolSupport]\napi-version: 1.13\n\ncommands:\n  MurderMystery:\n    description: MurderMystery Commands\n    usage: \"\\u00A76Correct usage: /murdermystery [option]\"\n    aliases: [mm, murder]\n  MurderMysteryAdmin:\n    description: MurderMysteryAdmin commands\n    usage: \"\\u00A76Correct usage: /murdermysterya [option]\"\n    aliases: [mma, murderadmin]\n\npermissions:\n  murdermystery.admin.*:\n    default: op\n    children:\n      murdermystery.updatenotify: true\n      murdermystery.admin: true\n      murdermystery.admin.setup: true\n      murdermystery.admin.delete: true\n      murdermystery.admin.list: true\n      murdermystery.admin.spychat: true\n      murdermystery.admin.stopgame: true\n      murdermystery.admin.forcestart: true\n      murdermystery.admin.addsign: true\n      murdermystery.admin.clear: true\n      murdermystery.admin.sign.create: true\n      murdermystery.admin.sign.break: true\n      murdermystery.admin.reload: true\n      murdermystery.command.override: true"
  },
  {
    "path": "src/main/resources/powerups.yml",
    "content": "## Murder Mystery powerups.yml\n#\nPowerups:\n  Pickup:\n    Chat: \"&a%player% picked the &4Powerup %value% up\"\n  Ended:\n    Title: \"&4Powerup %value% from %player%\"\n    Subtitle: \"&chas ended\"\n    Chat: \"&4Powerup %value% from %player% has ended%\"\n  Drop:\n    Chance: 1\n  Content:\n    Speed:\n      active: true\n      name: \"&a&lSPEED BOOSTER\"\n      description: \"&7Double speed for %number% seconds!\"\n      material: FEATHER\n      # Add as many potion effects as you want\n      # Format: PotionName, Duration, Amplifier\n      potion-effect:\n        - \"SPEED, 15, 1\"\n      # PLAYER for pickup player | ALL for all arena players\n      potion-type: PLAYER\n      # like rewards\n      execute:\n        - \"\"\n    Speed-All:\n      active: true\n      name: \"&a&lSPEED BOOSTER FOR ALL\"\n      description: \"&7Double speed for all players in the next %number% seconds!\"\n      material: FEATHER\n      # Add as many potion effects as you want\n      # Format: PotionName, Duration, Amplifier\n      potion-effect:\n        - \"SPEED, 15, 1\"\n      # PLAYER for pickup player | ALL for all arena players\n      potion-type: ALL\n      # like rewards\n      execute:\n        - \"\"\n\n# Don't edit it. But who's stopping you? It's your server!\n# Really, don't edit ;p\n# You edited it, huh? Next time hurt yourself!\nDo-Not-Edit:\n  File-Version: 1\n  Core-Version: 1"
  },
  {
    "path": "src/main/resources/rewards.yml",
    "content": "#\n#           Plugily Projects rewards configuration\n#\n#                          Placeholders list:\n#             https://wiki.plugily.xyz/minigame/placeholders\n#\n#        Commands are executed by default BY CONSOLE, use \"p:\" to preform command by player\n#  You can use chance to execute command adding \"chance(NUMBER):\" (ex chance(10):) at the beginning of command\n#\n#  Commands examples:\n#    - p:say Hello everyone in %arena_name%!     # Player will say \"Hello everyone in <map name here>\"\n#    - broadcast Game %arena_name% has ended!   # Will broadcast \"Game <arena name here> has ended\" message\n#    - chance(1):p:say I was very lucky!              # Player has 1% chance to say \"I was very lucky!\"\n#    - p:chance(99):spawn                             # Player has 99% chance to teleport to spawn\n#       ^ YOU CAN EVEN SWAP CHANCE WITH PLAYER!\n#    - chance(50):eco give %player% 10                # Console has 10% chance to give player 10$\n#\n#  Performed rewards:\n#  game-end\n#\n#   You can unlock full potential of rewards using our script engine! (since 4.0.0)\n#    Just add example reward:\n#    - script:player.sendMessage(\"oh, hi %player%\");      # It will send \"oh, hi <player name>\" to player! 100% plain java!\n#    - script:server.broadcastMessage(\"hello everyone\");  # Broadcasts \"hello everyone\" to whole server\n#    - script:player.getInventory().addItem(new org.bukkit.inventory.ItemStack(org.bukkit.Material.DIRT));\n#         ^ Gives player dirt item (you must always use direct package names for not provided objects)\n#\n#                               All script provided objects:\n#            player - Player object (API methods https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Player.html)\n#    arena - Plugin arena (API methods https://jd.plugily.xyz/apidocs/minecraft/PLUGILYPROJECTS/plugily/projects/PLUGILYPROJECTS/arena/Arena.html)\n#            server - Bukkit server object (API methods https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Server.html)\n#\n#                            Whole documentation of scripts soon!\n\n# Rewards must be enabled via config.yml first!\nrewards:\n  # Commands performed when game is started\n  game-start:\n    - say %arena_name% has started\n    - say Ooh and there are playing %arena_players_size% players\n  # Commands performed when game is finished\n  game-end:\n    - say %arena_name% has ended\n    - say Ooh and there were playing %arena_players_size% players\n  # Commands executed when detective is killed\n  detective-kill:\n    - eco give %player% 2\n    - chance(10):eco give %player% 8\n  # Commands executed when murderer is killed\n  murderer-kill:\n    - eco give %player% 2\n    - chance(10):eco give %player% 8\n  # Commands executed when player wins the game\n  win:\n    - say I won the game!\n  # Commands executed when player loses the game\n  lose:\n    - say I lost the game!\n  player-death:\n    - say I died!\n  gold-pickup:\n    - say You picked up gold!\n\n# Don't edit it. But who's stopping you? It's your server!\n# Really, don't edit ;p\n# You edited it, huh? Next time hurt yourself!\nDo-Not-Edit:\n  File-Version: 2\n  Core-Version: 1"
  },
  {
    "path": "src/main/resources/signs.yml",
    "content": "# Don't edit it. But who's stopping you? It's your server!\n# Really, don't edit ;p\n# You edited it, huh? Next time hurt yourself!\nDo-Not-Edit:\n  File-Version: 1\n  Core-Version: 1"
  },
  {
    "path": "src/main/resources/skins.yml",
    "content": "Skins:\n  Sword:\n    'default':\n      Material: IRON_SWORD\n    'Stone':\n      Material: STONE_SWORD\n      Permission: \"murdermystery.skins.sword.stone\""
  },
  {
    "path": "src/main/resources/special_blocks.yml",
    "content": "#\n#             Murder Mystery special blocks configuration\n#\nSpecial-Blocks:\n  Cauldron-Potions:\n    Speed-I:\n      # Uppercased potion effect type (https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/potion/PotionEffectType.html)\n      Type: SPEED\n      # Duration of potion effect\n      Duration: 10\n      # Amplifier of potion effect\n      Amplifier: 1\n      # Name of potion\n      Name: \"&bSpeed Potion &7(10 sec)\"\n      # Subtitle message when you drink potion\n      Subtitle: \"&a10S of Speed\"\n    Mystery-I:\n      Type: JUMP\n      Duration: 20\n      Amplifier: 1\n      Name: \"&7Mystery potion &8(???)\"\n      Subtitle: \"&a20S of Jump Boost\"\n    Mystery-II:\n      Type: SLOW\n      Duration: 10\n      Amplifier: 1\n      # Beware that we use '&f' at the end to make it different from above!\n      # Otherwise, it will count as Mystery-I potion!\n      Name: \"&7Mystery potion &8(???)&f\"\n      Subtitle: \"&c10S of Slowness\"\n    Mystery-III:\n      Type: INVISIBILITY\n      Duration: 10\n      Amplifier: 1\n      # Beware that we use '&a' at the end to make it different from above!\n      # Otherwise, it will count as Mystery-I potion!\n      Name: \"&7Mystery potion &8(???)&a\"\n      Subtitle: \"&a10S of Invisibility\"\n    Mystery-IV:\n      Type: BLINDNESS\n      Duration: 5\n      Amplifier: 1\n      Name: \"&7Mystery potion &8(???)&b\"\n      Subtitle: \"&c5S of Blindness\"\n    Mystery-V:\n      Type: NIGHT_VISION\n      Duration: 25\n      Amplifier: 1\n      Name: \"&7Mystery potion &8(???)&c\"\n      Subtitle: \"&a25S of Night Vision\""
  },
  {
    "path": "src/main/resources/special_items.yml",
    "content": "# Custom special items.\n# You can also add your own special items!\n#\n# Stage: SERVER_JOIN, WAITING_FOR_PLAYERS, ENOUGH_PLAYERS_TO_START, LOBBY, IN_GAME, SPECTATOR, ENDING\n#\n# Please don't modify 'Kit-Menu', 'Leave-Lobby', 'Leave-Spectator', 'Player-List' and 'Spectator-Options', 'Forcestart'\n# nodes as they are hardcoded in code!\n#\n# Also see the wiki for further reference!\n\nRole-Pass:\n  permission: \"\"\n  execute:\n    - \"p:mm roleselector\"\n  displayname: \"&c&lClick to open role pass menu &7(Right Click)\"\n  lore:\n    - \"&7Enjoy one round of guaranteed role with pass\"\n  material: CHEST\n  slot: 4\n  stage: lobby\n  force: true\n  move: false\n\n# Uses bungee.yml configuration - if enabled it tries to connect to your hub\nLobby-Leave:\n  permission: \"\"\n  execute:\n    - \"\"\n  displayname: \"&c&lReturn to Lobby &7(Right Click)\"\n  lore:\n    - \"&7Right-click to leave to the lobby\"\n  material: BED\n  slot: 8\n  stage: LOBBY\n  force: true\n  move: false\n\n# Uses bungee.yml configuration - if enabled it tries to connect to your hub\nSpectator-Leave:\n  permission: \"\"\n  execute:\n    - \"\"\n  displayname: \"&c&lLeave the Game &7(Right Click)\"\n  lore:\n    - \"&7Right-click to leave to the lobby\"\n  material: BED\n  slot: 8\n  stage: SPECTATOR\n  force: true\n  move: false\n\nPlayer-List:\n  permission: \"\"\n  execute:\n    - \"\"\n  displayname: \"&a&lAlive Players &7(Right Click)\"\n  lore:\n    - \"&7Right-click to see alive players list\"\n  material: PLAYER_HEAD\n  slot: 0\n  stage: SPECTATOR\n  force: true\n  move: false\n\nSpectator-Settings:\n  permission: \"\"\n  execute:\n    - \"\"\n  displayname: \"&b&lSpectator Settings &7(Right Click)\"\n  lore:\n    - \"&7Right-click to adjust spectator settings\"\n  material: COMPASS\n  slot: 4\n  stage: SPECTATOR\n  force: true\n  move: false\n\nForcestart:\n  permission: \"plugily.projects.forcestart\"\n  execute:\n    - \"\"\n  displayname: \"&c&lStart the game &7(Right Click)\"\n  lore:\n    - \"&7You need the following permission for it\"\n    - \"&7plugily.projects.forcestart\"\n  material: EMERALD\n  slot: 2\n  stage: ENOUGH_PLAYERS_TO_START\n  force: true\n  move: false\n\nArena-Selector:\n  disabled: true # disabled by default\n  permission: \"\"\n  execute:\n    - \"p:mm arenas\"\n  displayname: \"&c&lArena selector &7(Right Click)\"\n  lore:\n    - \"&7Right-click to see all arenas\"\n  material: CHEST\n  slot: 4\n  stage: SERVER_JOIN\n  force: false\n  move: false\n\nStats:\n  disabled: true # disabled by default\n  permission: \"\"\n  execute:\n    - \"p:mm stats\"\n  displayname: \"&c&lStats &7(Right Click)\"\n  lore:\n    - \"&7Right-click to see your Stats\"\n  material: PLAYER_HEAD\n  slot: 0\n  stage: SERVER_JOIN\n  force: false\n  move: false\n\n# Uses bungee.yml configuration - if enabled it tries to connect to your hub\nBack-To-Hub:\n  disabled: true # disabled by default\n  permission: \"\"\n  execute:\n    - \"p:hub\"\n  displayname: \"&c&lBack to Hub &7(Right Click)\"\n  lore:\n    - \"&7Right-click to return to lobby\"\n  material: Bed\n  slot: 8\n  stage: SERVER_JOIN\n  force: false\n  move: false\n\n# Don't edit it. But who's stopping you? It's your server!\n# Really, don't edit ;p\n# You edited it, huh? Next time hurt yourself!\nDo-Not-Edit:\n  File-Version: 1\n  Core-Version: 1"
  },
  {
    "path": "src/main/resources/spectator.yml",
    "content": "# Make sure to read the wiki for further reference!\n# section keys with DEFAULT_SPEED, SPEED1, SPEED2, SPEED3, SPEED4, AUTO_TELEPORT, NIGHT_VISION, FIRST_PERSON_MODE, SPECTATORS_VISIBILITY have a defined function\n\nSettings-Menu:\n  Inventory-name: \"&7Spectator settings\"\n  Content:\n    'DEFAULT_SPEED':\n      material: LEATHER_BOOTS\n      # slot at the inventory, 0 is first slot\n      slot: 11\n      name: \"Default Speed\"\n      description:\n        - \"Sets the default minecraft speed\"\n      permission: \"\"\n      execute:\n        # You could also add a potion effect by console command\n        - \"\"\n    'SPEED1':\n      material: CHAINMAIL_BOOTS\n      slot: 12\n      name: \"Speed I\"\n      description:\n        - \"Adds a speed 1 potion\"\n      permission: \"\"\n      execute:\n        - \"\"\n    'SPEED2':\n      material: IRON_BOOTS\n      slot: 13\n      name: \"Speed II\"\n      description:\n        - \"Adds a speed 2 potion\"\n      permission: \"\"\n      execute:\n        - \"\"\n    'SPEED3':\n      material: GOLDEN_BOOTS\n      slot: 14\n      name: \"Speed III\"\n      description:\n        - \"Adds a speed 3 potion\"\n      permission: \"\"\n      execute:\n        - \"\"\n    'SPEED4':\n      material: DIAMOND_BOOTS\n      slot: 15\n      name: \"Speed IV\"\n      description:\n        - \"Adds a speed 4 potion\"\n      permission: \"\"\n      execute:\n        - \"\"\n    'AUTO_TELEPORT':\n      material: COMPASS\n      slot: 20\n      name: \"Automatically teleport\"\n      description:\n        - \"Automatically teleports you to your targeted player\"\n      permission: \"\"\n      execute:\n        - \"\"\n    'NIGHT_VISION':\n      material: ENDER_PEARL\n      slot: 21\n      name: \"Night vision\"\n      description:\n        - \"With nigh vision you will be able to see ghosts\"\n      permission: \"\"\n      execute:\n        - \"\"\n    'FIRST_PERSON_MODE':\n      material: CLOCK\n      slot: 23\n      name: \"First person mode\"\n      description:\n        - \"When in first person mode you will spectate like you would play yourself\"\n      permission: \"\"\n      execute:\n        - \"\"\n    'SPECTATORS_VISIBILITY':\n      material: REDSTONE\n      slot: 24\n      name: \"Spectators visibility\"\n      description:\n        - \"Its a good choice if you hate other players\"\n      permission: \"\"\n      execute:\n        - \"\"\n\n\n# Don't edit it. But who's stopping you? It's your server!\n# Really, don't edit ;p\n# You edited it, huh? Next time hurt yourself!\nDo-Not-Edit:\n  File-Version: 1\n  Core-Version: 1"
  },
  {
    "path": "src/main/resources/stats.yml",
    "content": "data-version: 1"
  },
  {
    "path": "src/main/resources/trails.yml",
    "content": "#Add trails that you want to blacklist from all trails(particles)\nBlacklisted-Trails:\n  - \"elder_guardian\"\n  - \"block_crack\"\n  - \"item_crack\"\n  - \"block_dust\"\n"
  }
]