Skip to content

Instantly share code, notes, and snippets.

@zml2008
Last active August 29, 2015 14:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zml2008/ccce01406e9ee048f80e to your computer and use it in GitHub Desktop.
Save zml2008/ccce01406e9ee048f80e to your computer and use it in GitHub Desktop.
Potential new PEX configuration format
# Cleaned up version of the configuration posted on /r/admincraft
# This is the amount of cleanup that would occur when the configuration is saved
# A list of permissions, applying to the group Test
# (also, comments are preserved)
[permissions group=Test]
- pex.user.thing
- commandbook.teleport.*
# These options apply to the group admins in world_nether
[options group=admins world=world_nether]
prefix=Admin
motd="The format supports heredocs
For multiline stuff
(though quoted strings can span lines too)"
# And these are permissions that apply to any user
# on a server with the tag minigames (server tags are set in PEX's config.yml,
# to allow the same file to be shared between servers)
# This section also demonstrates a variety of syntax variations possible for lists
[permissions server=minigames]
- worldedit.wand
- permission.that.is.a.star # The server reads these permissions the same, and cleans up when saving
- even.plusses.are.supported # and indentation kinda doesn't matter
# Inheritance options that apply to either the user zml2008 or risaccess1 (uuids shown below)
[inheritance user=2f224fdf-ca9a-4043-8166-0d673ba4c0b8 user=deec9e1e-c7cb-4fcb-93a5-1d7a2bdeebb1]
- admins
# Mappings for uuid->username
[user-aliases]
2f224fdf-ca9a-4043-8166-0d673ba4c0b8=zml2008
deec9e1e-c7cb-4fcb-93a5-1d7a2bdeebb1=risaccess1
# This is what a simple converted configuration would look like
# converted from 1.22. It's autoconversion so the resulting config might not be the cleanest possible.
# default group
[permissions group=default]
- modifyworld.*
- commandbook.motd
[options group=default]
default=true
# members group
[permissions group=Members]
- commandbook.home.*
[options group=Members]
prefix=Members
[options group=Members world=world_nether]
prefix=Nether Members
[inheritance group=Members]
- default
# users
[inheritance user=2f224fdf-ca9a-4043-8166-0d673ba4c0b8]
- Members
# Mappings for uuid->username
[user-aliases]
2f224fdf-ca9a-4043-8166-0d673ba4c0b8=zml2008
[permissions group=Test] # A list of permissions that apply to the group
- pex.user.thing
- commandbook.teleport.*
[options group=admins world=world_nether] # A set of options for admins in the world world_nether
prefix=Admin
[inheritance user=zml2008 user=risaccess1] # List of inheritance options that applies for the user zml2008 or the user risaccess1
- admins
@csh
Copy link

csh commented Dec 30, 2014

Looks rather nice I guess, will there be an option to stick with the traditional YAML files though?

I personally wouldn't use this because it adds yet another configuration system where it's (at least in my eyes) entirely unnecessary, whilst the old one remains clean and straight to the point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment