# Functions The functions section outlines unique (new) QOL functions and features added by the SWPM mod. # Role Permission Keys
This function is currently **in development** and is being expanded - not all features are implemented.
SWPM keys are not substitute for a rank mod that limits use of Minecraft commands, or the commands of other mods.
**Note:** These permissions and restrictions are primarily being developed for use in official SWE servers, but are included in the mod for others needing similar functions for server management. The keys determined reflect the roles within our community and staff team, but have been adapted to generic role names for easy application on other servers. **Note:** Role Permission Keys are by default only useful for multiplayer servers. This wiki page will assume multiplayer use. --- #### **Getting Started** Keys permit a user to access a specific set of commands relevant to the role (key). Currently non-configurable. The list of commands accessible to each Key is listed below under the Key name. ##### To begin using the Keys: A server manager with console access will need to run this command to assign the Owner Key. `/swpm assign keyThe Owner Key should not be given to anyone who is not absolutely necessary. The Owner Key grants access to assigning/revoking any Key to/from any player.
##### Why is the Owner Key required when normally all access is given via OP? This mod is made to run on multiplayer servers which assumes the use of rankings, staff, and protections of dangerous permissions from undesirable uses. Some mods require OP access to be given to players to do tasks below the Mod/Admin level (e.g. World Edit and volunteer/paid Builders). It was deemed unsafe to make OP access default as any lower level staff with OP for tasks like building, could then assign/revoke any Key from anyone. --- #### **Key Rankings** Each set of commands is exclusive to the Key, regardless of ranking, meaning multiple keys will be required to run commands from different 'sets'. This Key system is based on hierarchy logic which assumes that an Admin will most likely need to be a Mod first before being promoted, therefore an Admin will already have the Mod Key and its permissions. ##### Ranks The Keys are ordered by rank. More dangerous permissions are given to higher level ranks, like Mod or Admin. Currently Active Keys (highest rank to lowest) with Assigned Minecraft Colors: 1. Owner (Blue) 2. Admin (Yellow) 3. Mod (Gold) Assigned/revoked by Admin Key and higher ranking. Technically not within Rankings. Other: 1. Blacklist Bypass (Black) --- #### Default AccessThere is currently no Key needed to run these commands.
This is intended in future to have these permissions transferred to the Player Key, requiring a permission system to obtain the Player Key. e.g. SWPM would automatically assign the Player Key once the player has agreed to the rules, to then gain access to the server.N/A | Give a player the Player key. |
**Available commands** | |
`/swpm fly` | Toggles creative flight within a permitted area. See [Gamemode Locks](https://wiki.swequestrian.com/books/swplus-mod/page/gamemode-locks). |
`/swpm key list` | Lists all keys assigned to your player. |
`/swpm onDuty list` | Lists all the staff members currently on duty. See |
More commands will be available only if the player has additional Keys assigned, regardless of rank. |
`/swpm key assign [playername] swpm:mod` | Give a player the Mod key. |
**Available commands** | |
`/swpm key list | Lists all Keys assigned to a specific player other than oneself. |
`/swpm onDuty | Marks oneself as On/Off Duty. |
`/swpm thru` | Teleports the player through an obstacles. |
More commands will be available only if the player has additional Keys assigned, regardless of rank. |
`/swpm key assign [playername] swpm:admin` | Give a player the Admin key. |
**Available commands** | |
`/swpm gamemode list` | List gamemode locks for current dimension +/- TP to center point. |
`/swpm gamemode remove [dimension] [true/false]` | Removes a gamemode lock in the current region/dimension you are standing in. |
`/swpm gamemode [gamemode] set [@/player] dimension [true/false]` | Add a new gamemode lock in the current dimension. |
`/swpm gamemode [gamemode] set [@/player] name | Add a new gamemode lock between the set coordinates (cube). |
`/swpm key | Assigns/Revokes any lower ranking key to/from another player(s). |
More commands will be available only if the player has additional Keys assigned, regardless of rank. |
`/swpm key assign | Give a player the Owner key. |
**Available commands** | |
`/swpm key | Assign/Revoke any lower ranking key to/from another player(s). |
More commands will be available only if the player has additional Keys assigned, regardless of rank. |
This is not a complete list of version changes / fixes. It is a changelog of relevant wiki-related version information.
**MC Version** | **Release** | **Notes** |
1.18.2 | 1.18.2-2.1.0 | New feature - added permissions keys. |
Gamemode Locks can only be viewed/edited by players with the Admin Key (SWPM) and within the applicable dimension.
`/swpm gamemode list` List all gamemode locks in the current dimension. --- #### Create a Gamemode Lock (Basic)Gamemode Locks can only be set by players with the Admin Key (SWPM).
`/swpm gamemode [gamemode] [@/player] dimensionTeams need to be set up separately (Minecraft feature) and players manually added to the team. Read more **[here](https://minecraft.fandom.com/wiki/Commands/team).**
--- #### Options (Explained) **Gamemode**[**Adventure**](https://minecraft.fandom.com/wiki/Adventure) | The player is mortal (can be killed), can explore the world but cannot place or destroy blocks. |
**[Survival](https://minecraft.fandom.com/wiki/Survival)** | The player is mortal (can be killed) and may explore the world, place and destroy blocks. |
**[Creative](https://minecraft.fandom.com/wiki/Creative)** | The player is immortal, has free access to any block in the game, instant destruction of blocks, creative flight. |
**[Spectator](https://minecraft.fandom.com/wiki/Spectator)** | The player is immortal, can fly through objects or the world, cannot interact with any items or entities. |
[**Target Selector**](https://minecraft.fandom.com/wiki/Target_selectors) | A selector such as @a (all players) |
**Player UN** | A specific player's username |
**Player [UUID](https://minecraft.fandom.com/wiki/UUID)** | A specific player's user ID (UUID) |
**Dimension** | A selector such as @a (all players) |
[**Block Position**](https://minecraft.fandom.com/wiki/Argument_types#block_pos) | Determine a cube selection of the desired area (selection) including **height** and **depth**. Specify the coordinates of two opposing corner blocks. |
Gamemode Locks can only be removed by players with the Admin Key (SWPM) who are located within the region/dimension Lock.
`/swpm gamemode removeThis is not a complete list of version changes / fixes. It is a changelog of relevant wiki-related version information.
**MC Version** | **Release** | **Notes** |
1.18.2 | 1.18.2-2.1.0 | New feature - added **/gamemode** command |
All command should always begin with **/swpm**
```Text gamemode list ``` Lists the dimension game mode lock and any region locks, including a clickable text to teleport to the center of the region. ``` gamemode remove gamemode remove dimension ``` Removes the region game mode lock you are standing in or the dimension wide game mode lock if *dimension* version is called. ``` gamemodeCommand | Trigger | Result |
any | the arguments are not specified correctly | Unparseable |
/... remove | not standing in a region | Failed |
any | Otherwise | Successful |
**Java Edition** | |
**2.1.0** | Added **/gamemode** command |
Check and adjust the config prior to applying to or updating servers - blacklisted inventory items will be permanently lost.
The below is our default entry for SWE server modpack and restrictions. ``` #List of item ids to blacklist from being mapped. #Format: modid:itemid #Example: minecraft:stone blacklist_item_ids = ["minecraft:bedrock"] #List of entity ids to blacklist from being mapped. #Format: modid:entityid #Example Entry: minecraft:iron_golem #Example List: ["minecraft:iron_golem", "minecraft:villager", "minecraft:wither", "minecraft:mooshroom"] blacklist_entity_ids = [] ``` **This says:** Specify which items (by ID) that will be removed from a player once acquired, and which entities (by ID) that will be prevented from spawning. The below is our default entry for SWE server modpack and restrictions. ``` #List of item ids to blacklist from being mapped. #Format: modid:itemid #Example: minecraft:stone blacklist_item_ids = ["minecraft:bedrock", "minecraft:barrier", "minecraft:elytra", "minecraft:ender_chest", "minecraft:obsidian", "minecraft:ender_eye", "minecraft:end_crystal", "minecraft:wither_skeleton_skull", "minecraft:nether_star", "minecraft:chorus_fruit", "minecraft:budding_amethyst", "minecraft:tnt"] #List of entity ids to blacklist from being mapped. #Format: modid:entityid #Example Entry: minecraft:iron_golem #Example List: ["minecraft:iron_golem", "minecraft:villager", "minecraft:wither", "minecraft:mooshroom"] blacklist_entity_ids = ["minecraft:iron_golem", "minecraft:villager", "minecraft:wither", "minecraft:mooshroom"] ``` **This says:** Specify which items (by ID) that will be removed from a player once acquired, and which entities (by ID) that will be prevented from spawning. --- #### Commands `/swpm blacklist add modid:itemid` Adds an item (by ID) to the blacklist. `/swpm blacklist remove modid:itemid` Removes an item (by ID) from the blacklist. `/swpm blacklist list` Lists all currently blacklisted items (allows blacklist removal via the list).Blacklisted entities cannot be listed, added, or removed via commands. It is only possible through config.
--- #### Exemption All users are subject to blacklist item confiscation except for anyone with the [Blacklist Bypass key](https://wiki.swequestrian.com/books/swplus-mod/page/role-permission-keys#bkmrk-blacklist-bypass-key). When an item is confiscated, the following message will display:  # Command Functions **Note:** These permissions and restrictions are primarily being developed for use in official SWE servers, but are included in the mod for others needing similar functions for server management. We are aware other mods might have added their own version of these commands, however to limit our modpack, we internalized the the ones we deemed most necessary. --- #### Creative Flight (Gamemode Locks) [Gamemode Locks](https://wiki.swequestrian.com/books/swplus-mod/page/gamemode-locks) can allow creative flight to be activated within them. Upon set up, choose true (flight yes) or false (flight no). To toggle flight, `/swpm fly`. Access to this command does not require a Key.This was primarily used for players building within their plot zones. We Gamemode Locked the dimension Plot dimensions to Adventure Mode, built premade plots, put Survival Gamemode Locks (regional) over the plots, then used FTBChunks for players to have access to edit their plot.
--- #### Thru To teleport through an obstacle, `/swpm thru`. Access to this command is given with the Mod Key.This was primarily used for ease when building or access to staff only rooms in community service buildings as these buildings often didn't have doors to make illegal entry impossible.
--- #### OnDuty OnDuty is a command to make it clear which staff are available and actively working on their tasks. Staff members that are on duty will have their chat messages in the relating color to their highest Key ranking and their name in that bolded color in the Online Player List (when pressing TAB). To list staff currently on duty, `/swpm onDuty list`. Access to this command does not require a Key. To go on/off duty, `/swpm onDutyOur staff were permitted and encouraged to play the server but struggled to find peace to play because of the players' constant wants and needs. Creating the onDuty system assisted in enforcing player respect of the staff's off duty hours while also tracking their on duty work hours.