Pinned Permission system

We've posted an important announcement regarding the current situation and the future of the game: Announcement

  • Permission system

    Since version 0.6.3, most settings (to determine what a player is allowed to do and what not) are handled by the new permission system. You can setup individual permissions for certain "groups", which will apply to all members of this group.

    Basically there is always a fixed permission, called "default.permission", which can be found in the permissions subfolder in your server directory. These are the default basic permissions, which will apply to all players. Now you can create individual group permissions (you put them into the groups subfolder), which will inherit the default permissions, but overwrite all keys you specified in your group permission. In other words: If you created a long list with forbidden items in the default.permission, you can - for example - just allow the pickaxe in your group permission, resulting in the player being unable to use any items, with the exception of the pickaxe. It's up to you how much you go into detail, of course you can also suspend all restriction of the default.permission if desired.

    You can create as many groups as you want and assign as many players to a particular group.

    The data format of all permission files is YAML. Here is an example for the "default.permissions":
    Example "default.permissions"

    Source Code

    1. chatcolor: 0xffffff
    2. shownametag: true
    3. nametagprefix: Guest
    4. commands:
    5. allow:
    6. - itemgive
    7. - settime
    8. deny:
    9. - *
    10. world:
    11. deny:
    12. - destroyblocks
    13. - destroyobjects
    14. - destroyconstructions
    15. blueprints:
    16. create: false
    17. use: true
    18. customimages:
    19. enabled: false
    20. items:
    21. crafting:
    22. deny:
    23. - tnt
    24. - repeater
    25. drop:
    26. general:
    27. deny:
    28. - tnt
    29. - musket
    Display All

    Note: This are by far not all permissions; if you don't specify a permission, the default value is used. For example: If you have a group "admins", and you don't specify a particular permission, the game will look in the "default.permissions" if the permission is specified there and takes it value. If this permission is also missing in the "default.permissions", the default server permission is used. You find an overview of all permissions and the according default value at the bottom of this topic.


    Let's get back to the example above: The first "info" permissions are just some "visual" things, chatcolor determines the color of the player's text when he sends a chat message (0xffffff equals white), "shownametag" determines if the nametag (the player's name above his head) should be visible, and "nametagprefix" specifies a prefix for the nametag.
    Now it's getting more interesting: All "commands" permission are generally split into an "allow" and "deny" key. Every command you put into the "allow" list will be allowed for the groupmembers (i.e. the player is able to use it), every command you put into the deny list will be disabled. You can use the wildcard character "*" as a replacement for "all commands".

    Note: The permissions are parsed from top to bottom, so the example above makes no sense, since the server would allow the two commands first, but then disable all commands. It would make more sense if you put the "deny" block above the "allow" block in this case (so the server would disable all commands first, but then allow the two commands listed under "allow") :!:

    The next block - the "world" permissions - have the same structure. In this case a member of this group would not be able to break any blocks or destroy any objects or constructions.

    The "blueprints" part does not have the typical "allow-deny" structure, it's just "key: value" in this case. In this case, the "use" permission (players can use existing blueprints) would be granted, but they are unable to create new blueprints (i.e. copy buildings on your server).
    The same applies to the "customimages" block (in this particular case, setting "enabled" to false just disables this feature).

    Finally we're coming to an interesting part: The "items" permissions. Here you're able to disable particular items. You can set the permissions for "crafting" (i.e. the player would no longer be able to craft this item), "pickup" (player is no longer able to pickup this item) and "drop" (player is not able to drop this item). Furthermore the "pickup" and "drop" blocks are splitted into "general" (affecting items in the world, e.g. when an item lays on the ground), "chest" (i.e. player is unable to pickup/drop an item from/into chests) and "body" (same as chests, just referring to dead bodies - for example to prevent players from looting dead bodies).

    Apart from the permissions, there is still the "admin" entry in the file. These "admins" are not affected by permissions, so they can use all commands and items. If you don't want that, you can set settings_admins_allpermissions to false in the file. Only the serverowner and all trustworthy persons should be an "admin" in the file btw. For all other team members, it's recommendable to create a separate "admin" group instead (and/or maybe a "moderator" group etc).

    To assign a player to a particular group, you can use the setplayergroup command (use: setplayergroup playername groupname, specify null as groupname to remove the player from his group).

    It's also possible to specify a "default group" for new players. Just open the file, look for the "settings_default_newplayer_group" key, and specify the desired group name (the filename without file ending).

    Btw: There is a way to check your current permissions ingame: Just press ESC to get into the ingame menu (do not return to main menu!) and hit the "Permissions" button.

    One final note: You cannot change the permission files during runtime yet. In other words: You have to restart the server once you have done some changes to any of the permission files :!:

    The post was edited 2 times, last by red51 ().

  • Overview of all permissions (name, category, description, defaultvalue)




    Source Code

    1. commands:
    2. allow:
    3. - *
    4. deny:
    5. - shutdown

    Info (visual)

    groupThe text in the "group" field in the playerlist
    groupcolorThe color of the "group" field text[#FFFFFF]
    chatcolorChatcolor (text)[#FFFFFF]
    chatnamecolorColor of the playername in chat[#FFFFFF]
    chatprefixPrefix for the playername in chat
    chatsuffixSuffix for the playername in chat
    chatprefixcolorColor for the chat name prefix[#FFFFFF]
    chatsuffixcolorColor for the chat name suffix[#FFFFFF]
    shownametagDetermines if the nametag of this player should be visibletrue
    nametagcolorColor of the player's nametag[#FFFFFF]
    nametagprefixPrefix for the player's nametag
    nametagsuffixSuffix for the player's nametag
    nametagprefixcolorColor for the nametag prefix[#FFFFFF]
    nametagsuffixcolorColor for the nametag suffix[#FFFFFF]
    showadmintagDetermines if the small red "[Admin]" should be visible next to the playername in the playerlistfalse


    Source Code

    1. group: Guest
    2. chatsuffix: (Guest)
    3. shownametag: true

    General permissions

    flygeneralDetermines if player is allowed to use flymode (F2)true
    fixedspawngeneralDetermines if player is "forced" to respawn at the default server spawn (if set to true, player cannot change his spawn position by sleeping in a bed/tent)false
    pvpgeneralDetermines if player is allowed to attack other playerstrue
    pvegeneralDetermines if player is allowed to attack animals/npctrue
    invulnerablegeneralDetermines if player is invulnerablefalse
    nofalldamagegeneralDetermines if player is immune to fall damagefalse
    debuglightgeneralDetermines if player is allowed to use the current debug light (L)true
    nohungerthirstgeneralDetermines if player has to eat/drinkfalse
    notemperaturegeneralDetermines if temperature has an impact on the playerfalse
    keepinventorygeneralDetermines if player keeps inventory upon deathfalse
    ridemountgeneralDetermines if player is allowed to use mountstrue
    ridevehiclegeneralDetermines if player is allowed to use vehicles (e.g. boats)true
    staminageneralDetermines if stamina is enabled for this playertrue


    Source Code

    1. general:
    2. fly: false
    3. pvp: false
    4. pve: true

    World permissions

    destroyterrainworldDetermines if player is allowed to destroy terrain (digging)true
    placeterrainworldDetermines if player is allowed to fill up terraintrue
    destroygrassworldDetermines if the player is allowed to cut grasstrue
    placegrassworldDetermines if the player is allowed to replant grasstrue
    destroyblocksworldDetermines if the player is allowed to destroy blockstrue
    placeblocksworldDetermines if the player is allowed to place blockstrue
    destroyvegetationsworldDetermines if the player is allowed to destroy plants (cut trees, for example)true
    placevegetationsworldDetermines if the player is allowed to replant plantstrue
    pickupvegetationsworldDetermines if the player is allowed to pickup plants (e.g. flowers)true
    destroyobjectsworldDetermines if the player is allowed to destroy objects (e.g. furniture)true
    placeobjectsworldDetermines if the player is allowed to place objectstrue
    pickupobjectsworldDetermines if the player is allowed to pickup objectstrue
    destroyconstructionsworldDetermines if the player is allowed to destroy constructions (e.g. wooden planks)true
    placeconstructionsworldDetermines if the player is allowed to place construction elementstrue


    Source Code

    1. world:
    2. deny:
    3. - *

    Creativemode permissions

    defaultcreativeThe "default" creative mode, often named "semi-creative mode" (instant digging and godmode)false
    flycreativeDetermines if fly mode is allowed for this player in creativemodetrue
    freecraftingcreativeDetermines if a player in creativemode can craft items for freetrue
    freescalingcreativeDetermines if a player in creativemode can use the "size" commandfalse
    allrecipescreativeDetermines if a player should be able to access all recipes in creativemodetrue
    infiniteitemscreativeDetermines if a player in creativemode has infinite items or nottrue
    nohungerthirstcreativeDetermines if hunger/thirst is disabled in creative modetrue
    terraintoolscreativeGrants access to the terraforming tools (F5)false
    placementtoolscreativeGrants access to placement tools (F6)false
    removaltoolscreativeGrants access to removal tools (F7)false
    questtoolscreativeN/A (wow that's going to be awesome!)false


    Source Code

    1. creative:
    2. allow:
    3. - default
    4. - freecrafting
    5. deny:
    6. - infiniteitems

    Custom image permissions

    enabledcustomimagesDetermines if custom images are allowed at alltrue
    maxuploadcustomimagesThe max amount of images a player is allowed to upload10
    dimensioncustomimagesThe max dimension of an image (e.g. 256x256, 512x512 etc.)512


    Source Code

    1. customimages:
    2. enabled: true
    3. maxupload: 10
    4. dimension: 256

    Blueprint permissions

    createblueprintsDetermines if player is allowed to create new blueprintsfalse
    useblueprintsDetermines if player is allowed to place his existing blueprintsfalse
    placeterrainblueprintsDetermines if player is allowed to place terrain and water via blueprintstrue
    undotimeblueprintsAmount of seconds a player can use the "undo" command to remove the blueprint300


    Source Code

    1. blueprints:
    2. create: false
    3. use: true

    The post was edited 4 times, last by red51: Updated permissions overview ( ().

  • Users Online 1

    1 Guest