2022-01-09 12:12:55 +01:00
# Permission Signs
2022-01-22 23:40:47 +01:00
This is a plugin loosely based on the permission signs plugin created by _ForgeUser7294733. As the previous plugin does
not offer source code and has a restrictive license, this plugin is written from scratch, but trying to somewhat imitate
the original plugin's behavior. It's not possible to load previous permission signs as they are stored without any
2022-01-17 13:55:01 +01:00
coordinates.
Basically permission signs is a plugin that allows for the sale of permissions using signs as the interface. A sign is
2022-08-05 13:38:55 +02:00
created with a displayed name, a description, a set of permissions, a time limit (can be infinite) and a cost (can be
zero). If a player uses the sign to buy the permission, they will be granted the permission for the defined duration.
Vault is used to set permissions. Permanent permissions are set normally through Vault, but permissions with a duration
set as not "0" are treated as transient permissions to avoid any problems (such as the player having been granted the
permission permanently by another cause) when they expire.
2022-01-17 13:55:01 +01:00
## Commands
2022-11-14 02:17:06 +01:00
| Command | Permission | Description |
|------------|------------------------------|-----------------------------------------------------------------|
| /ps about | None | Displays information about the plugin |
| /ps create | permissionsigns.admin.create | Used for creating a new permission sign |
2022-01-22 20:59:07 +01:00
| /ps cancel | permissionsigns.admin.create | Used for manually cancelling a permission sign creation request |
2022-11-14 02:17:06 +01:00
| /ps reload | permissionsigns.admin.reload | Used for reloading data and config values from disk |
2022-01-22 20:59:07 +01:00
### The create command
2024-01-03 19:21:40 +01:00
/ps create \<name> \<description> \<permission,permission> \<cost> \<duration> - Creates a new permission sign. The name
is
2022-07-10 14:47:12 +02:00
used to describe what the permission sign does, and is displayed on the sign. The description is used to describe what
2022-08-05 12:41:25 +02:00
the permission sign does, but without any limit on the length (use "_" between words, like: This_is_a_sentence). To use
2024-01-04 09:59:06 +01:00
actual underscores, escape them like "\_". The permission,permission is the list of comma-separated permissions the
2022-08-05 12:41:25 +02:00
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.
2022-01-22 20:59:07 +01:00
#### The create command permission list
The simplest way of using the permission field is to just specify one permission such as `essentials.gamemode.creative` ,
but you can put any number of comma-separated permissions in the field such
as: `essentials.gamemode.creatice,essentials.gamemode.survival,essentials.gamemode.spectator` .
This plugin also supports per-world permissions. By default, permissions are set for all worlds. You can change a
setting in the config to only grant the permission for the world the clicked sign belongs to. In addition to this, you
can override the default behavior by specifying the world before each permission node. *Any* specifies that a permission
should be given regardless of world, and *World_Name* specifies that a permission should only be set for the given
world. *World_Name* can also be specified as a different world that the one the permission sign belongs to.
The syntax for specifying the world is: `world:permission` , so for a list of permissions, it would be like
this: `world:essentials.gamemode.creatice,any:essentials.gamemode.survival,world_nether:essentials.gamemode.spectator`
2022-01-17 13:55:01 +01:00
## Permissions
2022-11-14 02:17:06 +01:00
| Node | Description |
|----------------------------------|---------------------------------------------------------------------------|
| permissionsigns.* | Grants all permissions |
| --permissionsigns.use | Allows the usage of permission signs |
| --permissionsigns.admin | Allows the creation of permission signs and access to the /reload command |
| ----permissionsigns.admin.reload | Allows the usage of the /reload command |
| ----permissionsigns.admin.create | Allows the creation of permission signs |
2022-01-22 15:03:57 +01:00
## Configuration options
2022-11-14 02:17:06 +01:00
| Option | Description |
|-------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| language | The language used for the plugin (en, nb-no) |
| perWorldPermissions | Sets permissions for the current world instead of setting them globally |
2022-01-22 20:59:07 +01:00
| removePermissionSignIfMissing | If enabled, permission signs that have lost their physical sign will be removed during startup. This prevents permission signs from staying in a broken state until the sign is replaced. |
2022-11-14 02:17:06 +01:00
| enableIndirectSignProtection | Protects permission signs against indirect sources such as pistons and explosions. Only disable this if your permission signs are protected by another plugin. |
2022-01-22 20:59:07 +01:00
| 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. |
2022-01-22 15:03:57 +01:00
## 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.
2022-03-11 17:21:37 +01:00
Remember to change the language code to whichever you use for your custom language.
## License
PermissionSigns is licensed under the GNU Public License Version 3.0. This includes every source and resource file. See
the HEADER file for a more detailed license description.