Tab completion should work ā check back after I make some changes to Spongeās tabcompletion handling and see if it works then
Well yes⦠PEX2 has a completely different API. For the most part, you do want to use the PermissionService provided with Sponge and not depend directly on PEX ā it allows access to pretty much everything available directly and is more stable. Just access it like so:
@Plugin([...])
public class MyPlugin {
private PermissionService perms;
@Listener
public void onServiceChange(ChangeServiceProviderEvent event) {
if (event.getNewProvider() instanceof PermissionService) {
perms = (PermissionService) event.getNewProvider();
}
}
public void doAThing(Player p) { // players are already Subjects,
// so for online players you can skip the perms.getUserSubjects().get(...) part
perms.getUserSubjects().get(p.getUniqueId().toString()).getSubjectData().setPermission(SubjectData.GLOBAL_CONTEXT, "my.perm", Tristate.TRUE);
}
}
You donāt even need to keep track of the PermissionService if you only need to deal with online players ā just access the Subject methods like ply.getSubjectData() to change attributes.
Iām struggeling to create a default user group without any permissions.
This is my .json file: permissions.json
The default user group inherits from the group āDefaultā, to check that Iām realy in this group I have added a namecolor.
This deletes most of the command when Iām using /help but some are still remaining: /help
But I want to delete all commands, how can I do it?
Somehow I managed to remove the permission for reloading pex from the server console
ā¦
And even worse:
pex reload
[08:51:39] [Server thread/INFO]: You do not have permission to use this command!
[08:51:39] [Server thread/INFO]: Usage: /pex [ranking|[ācontext|ācontexts|-c] [-transient] subject permission-default|delete|options|info|permission|parents|[-transient] subject-type list [filter]]
say SERVER REBOOT IN 10 SECONDS!
[08:55:31] [Server thread/INFO]: You do not have permission to use this command
save-all
[08:55:41] [Server thread/INFO]: You do not have permission to use this command
stop
[08:55:51] [Server thread/INFO]: You do not have permission to use this command
Now pex is preventing me from stopping the server nicely, and forcing me to do kill -9
Progress Remaining problem now is that Iād like the group āDefaultā to hold permissions for everybody that have not been explicitly added to a group - or some other way of adjusting default permissions. This stanza doesnāt seem to work as intended:
Can someone PLEASE tell me what is wrong with my permissions. it says that they are all good in the parser, but in-game I cannot use most commands. I am in the āownerā category and cannot break any blocks in an admin claimed area (safezone) but i can claim for the safezone. i have no idea what is happening so if anyone can help, it would be greatly appreciated. http://pastebin.com/zPPnCBqP
Myself and @Peav have been building a server and for the last few version updates weāve been running into circular inheritance issues.
We are 110% sure it is an issue with our permission file. Even with no mods other then pex and sponge we still get the error.
This is the console output:
[01:55:37] [Server thread/WARN] [PermissionsEx]: Potential circular inheritance
found while traversing inheritance for user=*****-5ba5-4e46-b70e-4ab0dbac0c91
when visiting group=Noobs
As of the latest version (no ver. numbers, sorry) commands to not appear to function. With any more than no arguments the server returns ātoo many argumentsā
I believe the problem os that your Default group inherits from Noobie, while every group inherits from Default. If Iām right, they will inherit from each other in an infinite loop
Not exactly circular inheritance in this case ā itās more like a group appearing multiple times in this case ā so remove Noobs from inheritance or just ignore it.
I miss the yml but I feel that this is a more powerful system. More control over inheritance, just a wee bit harder to understand! Weāll figure it all out eventually.
Can someone PLEASE tell me whatās wrong with my permissions. PermissionsEx crashed every time i use this permission file: http://pastebin.com/UNBfr4tQ
you were missing an end quote on your invalid homes permission for the Karp group, try using a JSON parser if you arenāy going to actually follow the recommendation for using in-game commands (ie the only supported way to set permissions), for ease i have fixed it, see this gist: