šŸ”‘ PermissionsEx v2.0 [API 5]

Could I get a quick rundown on how the Priority works? Iā€™ve tried everything and it seems the priority isnā€™t doing to much besides blocking commands as it would need to. Wondering for Prefix and Suffix reasons since they only allow one of each. Needing a higher priority Prefix to take over. I do so and it doesnā€™t seem to work?

For prefixes and suffixes whichever occurs first in the inheritance tree is whatā€™s used.

The priority system only makes sense for permissions where thereā€™s multiple levels of nodes outside of the inheritance system (a, a.b, a.b.c, etc).

I was hoping for Prefix and Suffix the LAST thing in the inheritance tree would be used, But I understand the priority now. Any chance You might be able to do something for the Prefix and such?

I recreate the Pex configuration files.
Every time I type a command here is the result.

[16:46:06] [Server thread/INFO]: Usage: /pex [debug|reload|import|ranking|[--context|--contexts|-c] [-transient] subject permission-default|delete|options|info|permission|parents|[-transient] subject-type list [filter]]

Thatā€™s my permissions.json file.

How do I create and have in my Admin group member Modo file with different permissions.

permissions.json

{
        "subjects": {
            "default": {
                "default": [
                    {
                        "contexts": {
                            "srcip": "127.0.0.1"
                        },
                        "permissions-default": 1
                    }
                ]
            }
        },
        "schema-version": 4
    }

sib-perms.json Ā· GitHub creates that structure.

Create new group Foo1

Thereā€™s no operation to explicitly create a group ā€“ groups will be added to the permissions file as soon as they have data.

Make it so when new users join the server they are assigned to group Foo1

/pex default user parent add group Foo1

Make two more groups: Foo2 Foo3

see above

If a user in group Foo is promoted, they go to Foo2 group
if a user in group Foo2 is promoted, they go to Foo3 group.

/pex rank default add group Foo1
/pex rank default add group Foo2
/pex rank default add group Foo3

A fourth group is created: Bar
Bar has all permissions, aka ā€œ*ā€

/pex group Bar def true

Bar is not in the ladder of Foo1 ā€¦ N
Create a set of groups, X, Y and Z where these groups are not in any promotion ladder but simply are containers for distinct permissions and so I can inherit them as such:
Foo1 inherits X

/pex group Foo1 parent add X

Foo2 inherits X, Y

/pex group Foo2 parent add X
/pex group Foo2 parent add Y

Foo3 inherits X, Y, Z

/pex group Foo3 parent add X
/pex group Foo3 parent add Y
/pex group Foo3 parent add Z

X Y and Z are mutually exclusive permissions

Call me crazy, the YML was easy to understand. :wink:
[/quote]

2 Likes

Is there a way to do conditional permission granting / grouping? For example, if a person is flagged as a leader of a town in the Polis plugin, could they be automatically assigned to a permissions group? etcā€¦

This would require user attributes, but could be useful.

I have exactly same error with latest PEX 2.0 & latest sponge 954
Did you find the solution of this issue ?
iā€™m running my server in off line mode. maybe the reason ?

Fabrice.

Hi!

I wonder if itā€™s possible to configure what the people canā€™t craft ? Like with ForgeEssentials.

thanks!

Yeah, offline mode is not supported currently (and would need sponge fixes to be supported)

Out of scope for PEX-- you would use a protection plugin for this.

Hello,

Iā€™m a server owner, and I am not used to configuration files like this. I also tried to create some ranks with permissions in-game but it didnā€™t work out well.

Is there anyone here that could help me creating a good working permissions file? I will send you the ranks with the permissions that are needed to be added.

Iā€™m willing to pay 10$ to the one helping me out.

My skype is Netherbyte.

Thanks!

I canā€™t forbid default users to break block. modifyworld.* doesnā€™t seem to work. any idea ?

I think that would be the role of a protection plugin.

1 Like

Youā€™d need some protection plugin ā€“ modifyworld has not been ported yet.

Here are some protection plugins I found for youā€¦ might not be all of them, just did a quick search on the forums.

Current Sponge Protection Plugins:


FoxGuard (Similar to WorldGuard, made by @gravityfox) can be viewed here.

Polis (Not mainly a protection plugin, but has some features that allow for it) can be viewed here.

ExplosionGuard (Not a complete protection plugin but to my understanding can protect from Explosions) can be viewed here.

1 Like

Yea Explosion Guard will block from any Explosion :slight_smile: and if you want a mod added to that list of items let us know :slight_smile:

Doesnt work with latest build 995 :frowning:

Version
forge-1.8-11.14.4.1577
spongeforge-1.8-1577-3.0.0-BETA-1000
permissionsex-sponge-2.0-SNAPSHOT - #106

[16:50:53] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.NoClassDefFoundError: org/spongepowered/api/service/ProviderExistsException
        at java.lang.Class.forName0(Native Method) ~[?:1.8.0_66]
        at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_66]
        at org.spongepowered.mod.plugin.SpongeModPluginContainer.constructMod(SpongeModPluginContainer.java:94) ~[spongeforge-1.8-1577-3.0.0-BETA-1000.jar:1.8-1577-3.0.0-BETA-1000]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_66]
        at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[minecraft_server.1.8.jar:?]
        at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[minecraft_server.1.8.jar:?]
        at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[minecraft_server.1.8.jar:?]
        at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[minecraft_server.1.8.jar:?]
        at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[minecraft_server.1.8.jar:?]
        at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) ~[LoadController.class:?]
        at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:190) ~[LoadController.class:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_66]
        at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[minecraft_server.1.8.jar:?]
        at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[minecraft_server.1.8.jar:?]
        at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[minecraft_server.1.8.jar:?]
        at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[minecraft_server.1.8.jar:?]
        at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[minecraft_server.1.8.jar:?]
        at net.minecraftforge.fml.common.LoadController.onPost(LoadController.java:53) ~[LoadController.class:?]
        at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:119) ~[LoadController.class:?]
        at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:507) ~[Loader.class:?]
        at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:87) ~[FMLServerHandler.class:?]
        at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:355) ~[FMLCommonHandler.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:117) ~[po.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:438) [MinecraftServer.class:?]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_66]
Caused by: java.lang.ClassNotFoundException: org.spongepowered.api.service.ProviderExistsException
        at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_66]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_66]
        ... 31 more
Caused by: java.lang.NullPointerException
        at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ~[launchwrapper-1.12.jar:?]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_66]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_66]
        ... 31 more
[16:50:53] [Server thread/ERROR]: This crash report has been saved to: C:\Users\geant\Desktop\minecraft\Sav - Serveur 1.8\Update\beta\.\crash-reports\crash-2016-01-01_16.50.53-server.txt

crash-reports

---- Minecraft Crash Report ----

WARNING: coremods are present:
  SpongeCoremod (spongeforge-1.8-1577-3.0.0-BETA-1000.jar)
Contact their authors BEFORE contacting forge

// Shall we play a game?

Time: 1/01/16 16:50
Description: Exception in server tick loop

java.lang.NoClassDefFoundError: org/spongepowered/api/service/ProviderExistsException
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at org.spongepowered.mod.plugin.SpongeModPluginContainer.constructMod(SpongeModPluginContainer.java:94)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at net.minecraftforge.fml.common.LoadController.onPost(LoadController.java:53)
    at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
    at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:507)
    at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:87)
    at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:355)
    at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:117)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:438)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.spongepowered.api.service.ProviderExistsException
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 31 more
Caused by: java.lang.NullPointerException
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)
    ... 33 more


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
    Minecraft Version: 1.8
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_66, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 956668720 bytes (912 MB) / 1819803648 bytes (1735 MB) up to 7635730432 bytes (7282 MB)
    JVM Flags: 2 total; -Xms1G -Xmx8G
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP v9.10 FML v8.0.99.99 Minecraft Forge 11.14.4.1577 6 mods loaded, 6 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UC    mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
    UC    FML{8.0.99.99} [Forge Mod Loader] (forge-1.8-11.14.4.1577-universal.jar) 
    UC    Forge{11.14.4.1577} [Minecraft Forge] (forge-1.8-11.14.4.1577-universal.jar) 
    UC    sponge{1.8-1577-3.0.0-BETA-1000} [SpongeForge] (spongeforge-1.8-1577-3.0.0-BETA-1000.jar) 
    UC    EssentialCmds{6.4-2b91e72} [EssentialCmds] (EssentialCmds-6.4b.jar) 
    U    PermissionsEx{2.0-SNAPSHOT} [PermissionsEx] (permissionsex-sponge-2.0-SNAPSHOT.jar) 
    Loaded coremods (and transformers): 
SpongeCoremod (spongeforge-1.8-1577-3.0.0-BETA-1000.jar)
  org.spongepowered.common.launch.transformer.SpongeSuperclassTransformer
    Profiler Position: N/A (disabled)
    Is Modded: Definitely; Server brand changed to 'fml,forge,SpongeForge'
    Type: Dedicated Server (map_server.txt)

I have a few questions about the json file:

Also where is the official documentation???


What is default referring to here? What is contexts? Is this saying the server console has all permissions?

"default": [{
   "contexts": {
     "srcip": "127.0.0.1"
   },
   "permissions-default": 1
}],

In the same vein there is an outer default, which so far has default (which my question above is about) and user as options according to my config. Are there other options for the outer default other than these two?

"default": {
  "default": [{
    "contexts": {
      "srcip": "127.0.0.1"
    },
    "permissions-default": 1
  }],
  "user": [{
    "parents": [
      "group:Default"
    ]
  }]
},

What do system and console mean? For example I saw this in someone elseā€™s config. Does this also give the server console all permissions like in the first question? Also what other options exist for system other than console?

"system": {
  "console": [{
    "permissions-default": 1
  }]
},

Finally back when you had a YAML file you supported globbing like command.thing.*. Is there any support for that in your json files?

andā€¦