From 7913bc7fd05db993b5ba3bc4107238ca36d3da27 Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Sat, 22 Jan 2022 15:03:57 +0100 Subject: [PATCH] Adds information about config options and language customization to the README --- README.md | 37 ++++++++++++++++++++++++++--------- src/main/resources/config.yml | 2 +- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index f774134..7ab4b52 100644 --- a/README.md +++ b/README.md @@ -14,18 +14,37 @@ permanently by another cause, when they expire. ## Commands -* /ps about - Displays information about the plugin -* /ps create - Creates a new permission sign. The name is used to +- /ps about - Displays information about the plugin +- /ps create - Creates a new permission sign. The name is used to describe what the permission sign does. The permission,permission is the list of comma-separated permissions the permission sign will grant to the using player. The cost is the cost to use the permission sign. The duration is the number of seconds the player should keep the permission for. Use 0 for permanent. -* /ps cancel - Used to manually cancel the creation of a permission sign (it will also time out after 60 seconds) -* /ps reload - Used to reload all data and config settings from disk +- /ps cancel - Used to manually cancel the creation of a permission sign (it will also time out after 60 seconds) +- /ps reload - Used to reload all data and config settings from disk ## Permissions -* permissionsigns.* - Grants all PermissionSigns permissions -* permissionsigns.use - Allows players to use the permission signs -* permissionsigns.admin - Allows all administrative tasks such as creating permission signs and reloading -* permissionsigns.admin.reload - Allows the usage of the /reload command -* permissionsigns.admin.create - Allows players to create/destroy permissionsigns \ No newline at end of file +- permissionsigns.* - Grants all PermissionSigns permissions +- permissionsigns.use - Allows players to use the permission signs +- permissionsigns.admin - Allows all administrative tasks such as creating permission signs and reloading +- permissionsigns.admin.reload - Allows the usage of the /reload command +- permissionsigns.admin.create - Allows players to create/destroy permissionsigns + +## Configuration options + +- language - The language used for the plugin (en, nb-no) +- perWorldPermissions - Sets permissions for the current world instead of setting them globally +- enableExtensiveSignProtection - Whether to protect signs on "unstable" blocks such as sand or anvils. Does not protect + signs on "lag pyramids" or similar, but protects signs on top of, or attached to a pillar of sand. + +## Language customization + +All strings, even time units, are customizable. If you place a strings.yml file in the plugin folder, it will take +priority over built-in languages. If you want to change strings, look at PermissionSigns/src/main/resources/strings.yml +for the proper keys. All strings have the format: ENUM: "Displayed string". The enum must be identical as it defines +which string you have changed. All strings belonging to a language are beneath the language code and indented with two +spaces. + +The easiest way to add a new language is to copy an existing language and paste it into your custom strings.yml and +change strings as necessary. If you don't include all strings, the remaining will use the built-in English translation. +Remember to change the language code to whichever you use for your custom language. \ No newline at end of file diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 627c777..3e7e18a 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1,4 +1,4 @@ -# The language to use for the plugin +# The language to use for the plugin (en, nb-no) language: en # Whether to only give permissions for a single world, instead of granting permissions for all worlds