Update: Updated to the latest PEX build (#121). Didnt work still so I went off a working config from a backup AGAIN. It works now
Getting an error with Dense Ores version 2.0 for minecraft 1.8.9 when trying to break one of the blocks it messes with the permissions for a bit. here is a snippet of the logs. http://pastebin.com/BcnbT4Tx
Uh Iām pretty sure that has nothing to do with PEX. More likely to be a bug in either Sponge or Dense Ores.
Thereās an open issue here: Error executing task java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException Ā· Issue #580 Ā· SpongePowered/SpongeForge Ā· GitHub
Thanks, found it earlier after seeing zmlās respone
I read somewhere that the console needs to be given permission to run commands and have 2 questions:
- First of all, why? Are you worried the person who owns a given server computer might be a spy for another server or something?
- Second of all, how do I actually give the console permission, assuming itās still necessary?
Thatās not exactly true. The way it works is that the console is just a command sender like any other (player, command block, rcon console, etc). Therefore, plugins check permissions. Now normally, Sponge has the console permissions configured so that if the permissions plugin returns no result for a permission, the console is granted that permission, so generally the console has all permissions.
The difficulty is that there are some ways to accidentally explicitly deny all permissions to the console. When this happens, the console no longer has all permissions. However, normally this wonāt happen.
basically tl;dr 1. because we donāt stop it, 2. itās not necessary.
Okay, fair enough. I figured it was something like that, although I felt compelled to ask because it seems a little strange still.
Anyway, moving on, I also noticed that, by default, permissions.json apparently gives permission to anything in the context ālocalipā: ā127.0.0.1ā. I assume this means anything on the local computer, and that this is to ensure that the console has permission, right? Or am I completely confused because Iām so tired or something LOL?
That affects players and is designed to help with small servers/lan servers so the player connecting from the same computer as the server can automatically manage things ingame. The console defaulting is built into Sponge (so it will apply to any permissions plugin)
Hello.
I still not familiar with subjects and methods to get perms info from player
How is the code to i get the group the player is, using my plugin? Can be with or without PEX, i only need to get te group, and set the group of player.
I making a rank plugin and i only need this to finish the plugin!
Thanks.
Donāt understand what youāre trying to say, but this might help
@SnowBlitzz lolno
Thatās all exposed within Spongeās permissions API. player.getParents()
returns all parents (not necessarily just groups) of a player in the current context, player.getSubjectData().addParent(contexts, parent);
(SubjectData is the raw data, Subject calculates context combinations and inheritance ā so for editing you probably want to work with player.getSubjectData()
). To get groups objects to add, you want to get the group Subject
with permissionService.getGroupSubjects().get(groupName)
Thanks, i got the player group with
player.getParents().get(0).getIdentifier()
But i dont know how to get all groups to compare if that identifier is a group(may have other thinks on āparentsā).
And i dont know how to set the group of player.
I tryed to use
player.getParents().set(0, "Visitor");
But the āVisitorā need to be a Subject How to create a new Subject?
I dont know how to get
permissionService.getGroupSubjects().get(groupName)
to work. permissionService dont have any method.
permissionService
is an instance of PermissionService, gotten from the Gameās ServiceManager.
player.getParents().get(0).getContainingCollection().equals(permissionService.getGroupSubjects())
will evaluate to true if the parent is a group (make sure to do size checks as well so that users with no parents are handled as well.
pService.getGroupSubjects().get(āVisitorā) would get you a Subject for the visitor group. Also the parents list returned is immutable, so you want to work through the SubjectData (player.getSubjectData() to modify parents).
Thank you! This helped me to prevent errors on get the group if the players have other settings on parents
I have a problemā¦ you can see in my file, that the owner is alone with all permissions allowed. But once i change something at the Player Permissions like āessentialcmds.clearinventoryā: -1, then the Owner also cant use itā¦ whats wrong ?
same here. everything seems to affect the owner
That is by design. The default group applies to every user, even those in the Owner group as well. Since essentialcmds.clearinventory is more specific than the default permission, and both have the same weight (1), the essentialcmds.clearinventory permission takes effect. To counteract this, you can increase the weight of the owner default to 2 ā so /pex group Owner def 2
, which will then override the negation.
Thanks you very much helped me alot
How admit to edit command block?