PEXPlugins / PermissionsEx

A powerful permissions plugin for Minecraft
https://permissionsex.stellardrift.ca
Apache License 2.0
480 stars 298 forks source link

PEX is not working #2450

Closed xAtomicWastex closed 8 years ago

xAtomicWastex commented 8 years ago

Hi, in /pl, PEX is red, and when I do /pex, nothing happens, and I need help fixing it. And before PEX stopped working, I tied /pex group Starter set default, but it basically says that this command is wrong and you should check the syntax or something like that. So please help! Thanks! Here is my latest.log file. My server is 1.8.8 http://hastebin.com/dotafujuti.vbs By the way, this is not my server, it's my friend's server.

starwarsfreak219 commented 8 years ago

Do you have Vault installed? If it is red that usually mean a dependency of the plugin is missing.

] Edit by Stormbow: This is incorrect. PEX does not have any dependencies. [

xAtomicWastex commented 8 years ago

@starwarsfreak219 Yes I do have Vault.

starwarsfreak219 commented 8 years ago

Do you mind if I join your server and see what is going on? You can PM the IP through the Spigot, my name is the same as in here(starwarsfreak219).

starwarsfreak219 commented 8 years ago

I think you might have had a permissions error which would cause the plugin to stop working. Do you think you could show us your permissions.yml?

xAtomicWastex commented 8 years ago

@starwarsfreak219 I sent you the IP on Spigot. And you want my perm.yml of PEX? From PEX? If so, here's the screenshot: http://prntscr.com/blww49

starwarsfreak219 commented 8 years ago

We have fixed the issue. :D

Stormbow commented 8 years ago

@starwarsfreak219 doesn't know what they're talking about. When PEX is red, that means there is a problem with the config.yml or permissions.yml file, not that a dependency is missing for PEX. (PEX has no dependencies.)

If @xAtomicWastex says this is resolved, or 3 days pass, I'll close this ticket.

starwarsfreak219 commented 8 years ago

Yea, it wasn't a dependency, his permissions file had a error in it, I went on his server to see what the problem was first hand, but I thought PEX had a dependency with vault... maybe not...

xAtomicWastex commented 8 years ago

@starwarsfreak219 @Stormbow It's actually not fixed, starwars, you thought it was fixed, but I restarted the server, and it turned red again and it ain't working.

starwarsfreak219 commented 8 years ago

I saw that. You didn't come back on so I couldn't help you fix the issue in that time. If you edited anything in your permissions.yml, you might want to revert that as there is an error in your permissions.yml again. Please ensure you didn't use the Tab key in it as YAML (.yml) files do not support Tabbing, you have to use spaces.

Stormbow commented 8 years ago

@xAtomicWastex -- copy your permissions.yml file (in full) to Pastebin and I can tell you exactly where it went wrong. Leave a link to the paste in this thread.

xAtomicWastex commented 8 years ago

@Stormbow @starwarsfreak219 http://pastebin.com/DBfNskPj

xAtomicWastex commented 8 years ago

It's probably this: prefix: '&0[&eStarter&0] &f'

xAtomicWastex commented 8 years ago

Above default and below options

xAtomicWastex commented 8 years ago

And whenever I do /afk or /help, it says this: "Permissions manager is not accessable. Is the PermissionsEx plugin enabled?"

(There's probably more commands that have this error, but haven't found them yet)

Stormbow commented 8 years ago

Quite a few mistakes, actually.

First and foremost, if you're running a 1.9+ server, all of your groups will need an inheritance listed. See line 19 right here if the group is not going to actually be inheriting anything from other groups. I would recommend you make your groups inherit from each lower group, as you see in the example I've linked for you in this note.

• Lines 28-32: Incorrect permission nodes. If you are granting these permissions, add a space between the hyphen and the node. If you are negating these permissions, you will do so like this: - -permission.node with 2 hyphens containing a space in between them and no space between the second hyphen and the node.

• Lines 33-36, 44-47, : Incorrect multiworld settings. Delete all 4 of these lines. (See the example linked above, if you need help with setting the correct indentation.) PEX does not allow prefixes based on the world that the use/group is currently in.

• Lines 42, 61: Avoid using hyphens, underscores ( _ ) or any other non-letter, non-number characters in the actual group names. These can be problematic to many plugins such as AutoRank, Essentials, WordRankUp, and more. Keep in mind that the prefix value for the group can be almost anything you want.

• Line 50: @starwarsfreak219 is not a permission node. :-) LOL! Delete this line.

• Line 57: The best permission node to give yourself as the server owner is actually permissions.* and not the wildcard '*' which gives you all of the permissions, even many that you don't want (but you don't know you don't want them, yet).

• Lines 58-60: This user entry is missing the UUID information. Typically this is because the user is using a hacked or otherwise illegal copy of Minecraft (if the client and server is 1.79 or later), or the server itself is Minecraft 1.7.2 or earlier. This sort of user and server (offline mode: true, in the server.properties file) is not supported by PEX and can cause many, many problems on the server. If a server is running in offline mode for these players to connect, PEX will not work on that server no matter what else you do correctly in the PEX files.

xAtomicWastex commented 8 years ago

@Stormbow @starwarsfreak219 I removed line 50, I don't know who added that, I fixed the '*' and the space between the hyphen and node, didn't notice them :p

But the first paragraph is what I didn't understand, I'm running a 1.8.8 Spigot server but we have the Via Version plugin, which allows 1.9 and 1.10 users to join. Yeah, basically, I didn't understand the first paragraph.

(And /list doesn't work too, says the same thing as /afk and /help)

Stormbow commented 8 years ago

Show me your updated permissions.yml file. (Be sure to re-read my previous post too. I made a lot of edits and added more corrections that need to be made.)

xAtomicWastex commented 8 years ago

http://pastebin.com/AveuP52q

Stormbow commented 8 years ago

The file is short, so I'll correct the whole thing with the notes I posted above. Give me about 5 minutes.

xAtomicWastex commented 8 years ago

Okay

Stormbow commented 8 years ago

Here ya go. Try this file:

http://pastebin.com/EGi2JyjJ

xAtomicWastex commented 8 years ago

You're adding inheritance[] what will it do?

Stormbow commented 8 years ago

That's a 'closed set' where the group is not inheriting any permissions from any other group.

xAtomicWastex commented 8 years ago

So, the space in-between the [ ], I can put a group to get commands from the group that I've inherited in the Starter group?

xAtomicWastex commented 8 years ago

And what about the other groups, they don't have [ ], what's the difference

Stormbow commented 8 years ago

Nope. Look at line 39 and 40. That's how a group gains permissions that are listed in another group.

xAtomicWastex commented 8 years ago

So, if I put let's say moderator group perms in the Starter inheritence [ ], it'll take everything from mod and 'duplicate' it into Starter?

xAtomicWastex commented 8 years ago

Why did you inherit Starter group into Owner?

Line 44, 45

Stormbow commented 8 years ago

If you delete the [ ] after inheritance: and add - Dev under line 6, the "Starter" group would then gain all the permissions that the "Dev" group had listed.

Stormbow commented 8 years ago

The Owner group had no permissions listed at all, and it needs an inheritance for PEX to work, so I made it inherit the only group that actually had permission ("Starter").

(And I added one sample permission node.)

xAtomicWastex commented 8 years ago

Okay wait

xAtomicWastex commented 8 years ago

So Starter group won't get a perm from Owner, and every group has to have an inheritance for it to work?

xAtomicWastex commented 8 years ago

And here's the hard part... What group do I inherit into Starter....

Stormbow commented 8 years ago

Correct. Starter will only have the permissions listed after line 7, and doesn't inherit any permissions from any other group.

And every group needs an inheritance listed, even if it's not inheriting anything.

Stormbow commented 8 years ago

Starter doesn't need anything, that's why we have line 6 as it is. It's empty, nothing needs to be listed since it's not inheriting from other groups, but the inheritance section tag needs to be there, and we need to tell PEX that the group isn't inheriting anything (which we do with [ ] ).

xAtomicWastex commented 8 years ago

Edit: ok, I didn't read your new paragraph

xAtomicWastex commented 8 years ago

So it doesn't have to inherit anything

Stormbow commented 8 years ago

Correct. Every group must have an inheritance section, but doesn't have to inherit anything.

xAtomicWastex commented 8 years ago

Let's say Admin group has world edit, and I don't want moderator to inherit from admin, since admin is closest to mod, can I [ ] mod

Stormbow commented 8 years ago

If you look at my example, you'll see the basic structure of a server, using the most common names for all of the groups. From lowest to highest, the groups are Guest > Member > Mod > Admin > Owner. You'll notice they're also in the same order as we read down the file; Guest is at the top of the groups: section, Owner is at the bottom. When we look at the bottom of the groups: section, at the Owner group, we see it inherits from the next group above it, Admin. Admin inherits from the group above it (Mod), and so on, and so on, up the list. When we get to the top, the Guest group is where all permissions originate, all of the most basic permissions on the server are granted there, so there is no inheritance, just the 'closed set' we discussed earlier.

A member of the "Owner" group in my example gets all the permissions of all the groups above it, since they all inherit the permissions above them. No one in the Guest group gets anything below it, no one in the Mod group gets anything below it, etc. This is because the groups don't inherit anything below the group, only above it.

Think of permissions as a waterfall, the water (permissions) are only passed downstream (down the waterfall, down to other groups that inherit from it).

Stormbow commented 8 years ago

(We don't normally go through dozens of posts to teach people how to use plugins. That's what Google and YouTube are for. ;-) So you're getting a special treat here.)

xAtomicWastex commented 8 years ago

@Stormbow Well thank you <3

xAtomicWastex commented 8 years ago

Your link, line 88, you don't have permissions.* you have '*'

Stormbow commented 8 years ago

Correct. That gives the Owner group absolutely every permission from every plugin on the server, and then we only negate the ones the group does not want, above it.

Stormbow commented 8 years ago

And, technically, because of that permissions setup, the Owner group could have an inheritance like line 19 too, instead of inheriting from Admin.

Stormbow commented 8 years ago

The reason I had you give permissions.* to yourself is so that you can have access to ALL of the PermissionsEx commands, no matter which group you are in, as you move around on your server to test things out and set things up.

xAtomicWastex commented 8 years ago

Just asking, how do I give negative?

"Note: OP players must be given negative permissions to negate pandorrabounty.cantcollect and pandorrabounty.immune"

xAtomicWastex commented 8 years ago

Look at line 29 http://pastebin.com/EGi2JyjJ Here it's just black, but in the actual yml, the 1 is red, how do I fix this? Should I do - playervaults.amount.'1'? (And the . is red too)

Stormbow commented 8 years ago

/pex group <group> add <permission>

So: /pex group Guest add -pandorrabounty.cantcollect .

Use your group name, of course.