LayerAfterLayer
| Part of a series on |
| Civ+ Mechanics |
|---|
| Core |
| Common |
| Minor |
LayerAfterLayer is Civ+'s group management plugin. It is the successor to CivCraft's Namelayer.
The plugin adds Groups to the server. Just like a Discord server, groups can have a number of players as Members, and each Member can have a number of optional Roles. A player can also have zero roles, in which case they get the permissions defined by the @everyone pseudo-role. Roles are a named bundle of permissions. For example, you could have a Moderator role that allows kicking players from the group.
Permissions are used by a few plugins: Citadel to control the usage and creation of reinforced blocks, Sanctuary for the usage of Sanctuaries and Bastions, ReCivChat for talking in group chats, and Snitches for managing who sends alerts and who receives them.
Mechanics
Membership & Roles
A player can be added to a group using the Invite Player button in the Members List. When added, a player is automatically given the @everyone role and it can't be revoked. Other roles can be given at the same time, or at a later date.
Unlike Namelayer, members can have multiple roles at the same time. For example, you can have a Chat Moderator role that gives permission to delete messages in chat, and a Builder role that gives permission to reinforce blocks. A player with both Chat Moderator and Builder will be able to reinforce and delete chat messages.
Expiration
When you give a player a role, you can set a date when it will expire, and be automatically removed from the player. Similarly, when you invite a player you can set their entire membership to expire, and they will be automatically removed from the group after that date.
Privlege Escalation Prevention
In addition to a set of permissions they grant, roles also have a position in the list of roles. The position of a role determines its power in relation to other roles.
Most significantly about this, if you have permission to add roles to players you can only give people roles below the highest positioned role you have been granted.
Additionally, if you have permission to edit roles' permissions, you can't edit your own highest role (unless you have the highest role) and you can't give a role a permission you don't already have.
Having the highest role in a group bypasses all protections.
Blacklisting
You can blacklist a player from a group using the Blacklist Player button in the Edit Members screen. Blacklisting a player will remove them from the group if they are currently a member and prevent them from rejoining using the Join Group screen. They will also lose any permissions they would get from @not-blacklisted as a non-member.
Linking
LayerAfterLayer supports linking groups together. Group linking is directional: The relationship between linked groups are split between Taker Groups and Donor Groups. When Taker is linked to Donor, all the members on Donor are also members of Taker. Ingame, this is typically phrased as "takes members from," "gives members to," and "also has members from."
When groups are linked, all members of the Donor Group are also members of the Taker Group. Members who are inherited are automatically given the @players-from(GroupName) role.
To link a group to another, open the Edit Group dialog for the Taker Group. Then click "This group doesn't take members from any other groups" and then select the group you wish to be the Donor Group. Then click Preview and Apply.
Linking properly handles cycles, so a group can be both Donors and Takers with another group. In this double-linked circumstance, all members are shared between the two groups.
Subgroups
Subgroups are intended as a tool to help manage reinforcements for different structures. For example, you can reinforce on Agora.Farms for farms and Agora.Roads for roads, and manage them separately (move to different groups once done building, etc).
You can create a subgroup using either the Create a Subgroup button in the Group Details screen, or by attempting to use the subgroup in a command like /ctr MainGroup.NonexistentSubgroup. Subgroups can be nested, and used in commands using the syntax /ctr Group.Subgroup.Subsubgroup.
Currently a subgroup is only a bucket for reinforcements, but they are going to eventually support membership and permission overrides compared to the main group. In the current version of LayerAfterLayer, players have the exact same membership and permissions in a subgroup as the main group.
Subgroups can be merged with eachother and into a main group by browsing to their Group Details screen by clicking the "This group has N subgroups" text and then clicking Merge. A subgroup can also be moved to be under another subgroup or another main group by clicking the "Parent: Group" text in their Edit Group Details screen and then selecting the group you want to move it to.
Permissions Resolution
When determining if a player has a given permission, the plugin starts at the bottom of the list of roles, defaulting to allowing the permission if the player is a member and denying the permission if the player is not a member. If the player is a member of the group it checks the @everyone role's setting for that permission. If the player is not a member and also not on the group's Blacklist, it checks @not-blacklisted. If the player is an inherited member, it checks @players-from(GroupInheritedFrom). Then, it goes up the list of roles the player has.
Each role can have one of three settings for a permission. If the setting is Allow, the state of the permission being checked is set to Allow. A setting of Defer will check the permission's superpermissions; If the superpermissions are unset it will not change the state, otherwise it'll set the state to the superpermission's setting, and a setting of Deny will set the checked state to Deny.
These properties mean that a permission's allow/deny state is controled by the player's highest role that has the permission set to Allow or Deny.
For example, if the @everyone role has the Send Chat Messages permission set to Allow, the Citizen role also has it set to Allow, and the Muted role has permission set to Deny: When the Citizen role is higher than Muted, a player with both Citizen and Muted will have Send Chat Messages. However, when the Muted role is higher than Citizen, a player with both Citizen and Muted will not be able to send chat messages.
Merging
A group can be merged with another group by opening the Edit Group dialog for the group you want to be deleted and clicking the Merge button. The Members, Invites, Blacklist, Subgroups, Webhooks, Reinforcements, and any external plugin information (like snitches) are moved to the group that isn't deleted. All other information like Roles, Linking relationships, and Description are deleted. Members that are added to another group through merging will have no roles, unless they were already added to the group with roles before merging.
Webhooks
A group can have a number of Discord Webhooks added to it. Whenever a change is made to the group, the webhook is sent a message.
Group Descriptions
A group can have a description in multiple languages. Only the first line of the description in the language you have Minecraft set to is displayed in the Group Details screen, however hovering over it will show the full description in all languages.
In addition to natural languages, conlang descriptions are also supported.
Passwords
Groups can be configured to have a password that players can use to join the group. Additionally, groups can also be configured to be joinable without the need of a password; In which case players join by leaving the password field blank.
Special Groups
Personal Group
When you join the server for the first time, the plugin creates a group with the same name as you. This is your personal group. You can use it for anything. You can add nobody to it, or add your friends. It's useful for things that are only your's, but if you plan on sharing something you should probably create a group for that thing. At least make a subgroup of your personal group so you can fix things later.
Default Group
when you do /cto to stop reinforcing on a group, the game sets your Active Reinforcement Group to this group. By default that's your personal group, but you can set it to anything using the Mark as Default Group button in the Group Details screen.
When you join the game for the first time, this is set to your Personal Group.
Global Chat
! is another group that you are added to when you first join the server. It's intended for the players of the server to use it for speaking in. If you break the rules of the server, you might be removed and blacklisted from this group.
If you leave, you can join it using the Join a group using a password button in the Group List.
Interface
Group List
All of the groups a player is a member of is listed here, including groups the player is an inherited member of. If the player is invited to a group, it is also shown here.
You can open this dialog by pressing Quick Actions (defaults to G) and then clicking Groups. It can also be opened using the commands /layerafterlayer, /lal, or /nl.
Create Group
A new group can be created using the Create New Group button in the Groups List. You select a name for the group (up to 150 pixels long), and then select a template for the group. Templates are premade sets of roles and permissions created by the admins.
| Name | Description | Roles |
|---|---|---|
| No Template | The simplest possible group. The owner of the group has all permissions. @everyone has no permissions.
Use this group type if you want to create the entire structure of your group from scratch. |
Owner |
You can create 5 groups upon joining the server, and each day you spend ingame increases your group creation limit by 1. Unlike Namelayer, transferring a group to another player does not remove its contribution to your group creation limit. Only deleting a group created by you does.
Join Group
Groups can be configured to be joinable using a passsword. Type the group name into the group name box, and the password into the password box. If the group has no password, leave the password box empty.
Group Info
You can view a group by clicking its line in the Group List, or using the command /layerafterlayer [GroupName]. Most properties of a group are clickable; Clicking shows more details about the property. Hovering over a property shows some details about it. For example, hovering over the members count will show the first 10 members of the group.
Edit Group
To edit a group, click the Edit button in the Group Details screen. Then, click the property you want to edit. Properties that are unset show up in red.
Once you are finished editing the group, click Preview. The Preview Changes screen details exactly what will be changed about you group. Clicking Apply will apply the changes, and clicking Back will go back to the Edit Group screen. If you have changes queued up, the plugin will ask you if you want to discard your changes if you try to exit the Edit Group screen.
Roles
Clicking a role's name will view/edit the role's permissions. The up/down arrows are used to move the role up or down in the list, and clicking the nametag icon will rename the role.
Editing Permissions
You can click the ✓ or X buttons next to a permission to set it to Allow or Deny. The / sets it to Defer, which means that other roles or the permission's superpermission controls the role.
Clicking the ▶ glyph will show all subpermissions of that permission. Setting the permission will also set all of its subpermissions, unless the subpermission is set to something different.
Members
A player can be invited, removed, roled, or blacklisted from this screen. Hovering a player's name will show details about their membership, and clicking their name will show options to edit their membership. The Edit Roles button on the Edit Member screen allows toggling a member's roles by clicking the role, and adding expiration dates to their roles by clicking the clock icon on an enabled role. The Edit Membership Expiration will allow setting an expiration date on the player's membership of a group, removing them after the date has passed.
Setting Expirations
Expiration dates are defined as a duration into the future. For example, typing 3m will have the player's membership expiring 3 minutes from the time you press the Set Expiration button. If you had 3m as the duration, and then waited 2 minutes before clicking the Preview & Apply buttons on the Edit Group screen then the player's role/membership will expire 1 minute afterwards.
Settings
| Setting | Default | What it does |
|---|---|---|
| Sort groups by number of members | On | When enabled, groups are sorted in the Group List by how many players are in that group. If there is a tie, the groups are sorted alphabetically.
When disabled, groups are sorted alphabetically. |
| Show group creation and modification metadata | Off | Displays the date a group was created, who created it, and when it was last modified |
| Maximum lines in hover text | 10 | When you hover over a group's properties in the Group Details screen, the hover text is capped to this many lines to prevent it from overflowing past the edges of your screen. |
| Automatically accept group invites | Off | When you're invited to a group, it is automatically accepted if you are online.
If you are offline the invite will be accepted when you log in. In either case you are notified in chat. If disabled you are still notified, but you will have to accept the invite manually. |
| Notifications when groups you are in are modified | Off | If a group is changed in any way, you are sent a message in chat |
References