#(blake4348) Command Permissions doesnt work

223 messages · Page 1 of 1 (latest)

silver anvil
#

I create a NPC with the command "jobs join woodcutter" and add the permission
'0': jobs.command.join
'1': jobs.join.woodcutter

but with click on the npc you get "you dont have permission". But when i add this2 perms direct in luckperms then the command on the npc works.
here is a screenshot from the citizens file
https://www.screens.comgames.de/upload/5ba469a36c5b0398be25a852489c48ee.png

wise groveBOT
#

(blake4348) Command Permissions doesnt work

wise groveBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

halcyon frigate
#

Also

#

!logs

lucid frigateBOT
# halcyon frigate !logs
Info: logs

Please post your full latest log file.

Background Info: One of the most helpful tools to identifying the source of a problem is your server logs file! Logs contain all sorts of important information like server and plugin versions, any error messages, and a lot more important information (More Info).

How To: Your log can be found in the logs folder within your server folder. The most recent log is a text file labeled latest.log. To get help using these logs, please open that file in a text editor and copy all of the text, then open https://paste.denizenscript.com/New/Log and paste the text into the box on the page. Then click "Submit" and copy the URL and paste that back into this channel.

Please do not upload the file to Discord or to other pastebin services, use the log pastebin linked above.

silver anvil
glossy kayak
lucid frigateBOT
# glossy kayak !checklog https://paste.denizenscript.com/View/120037
Server Version

Paper version git-Paper-409 (MC: 1.20.4)-- (Current build :white_check_mark:)

Plugin Version(s)

Citizens v2.0.33-SNAPSHOT (build 3316) -- (Current build :white_check_mark:)
Denizen v1.3.0-SNAPSHOT (build 1803-REL) -- (Current build :white_check_mark:)
Sentinel v2.8.1-SNAPSHOT (build 518) -- (Current build :white_check_mark:)

Checked For

@glossy kayak

Online/Offline

Offline, but proxied.

Java Version

17.0.5 :white_check_mark:

Other Noteworthy Plugin(s)

WorldGuard v7.0.10-SNAPSHOT+2260-c7319f1, ProtocolLib v5.2.0-SNAPSHOT-679

Possibly Relevant Plugin(s)

CMI v9.6.10.2 - CMI tends to mess with a large variety of server features and often gets in the way of issue debugging.
FastAsyncWorldEdit v2.9.0;974078c - This plugin has been known to break the plugin load order on many servers, due to usage of the 'loadbefore' directive in its 'plugin.yml'.

Potentially Bad Line(s)

Starting Minecraft server on *:25566 - server is offline but has no address bind. This might mean you're using a system level firewall, but if not, it means your proxy is bypassable by hackers. Either enable a system level firewall, or bind your server to localhost in server.properties via server-ip=127.0.0.1.

glossy kayak
#

Could you provide the output of /npc command as screenshoot please.

#

(of the relevant npc)

glossy kayak
#

Can you tell me what your exact goal is?

silver anvil
#

left click on npc join job and right click leave job

#

the click itelf works only a permission problem

#

when i add this 2 perms to the default group of luck perms then it works

#

but i only need this 2 perms temporaly for the command

glossy kayak
#

I see.

#

Do you use JobsReborn?

silver anvil
#

yes

glossy kayak
#

one moment please

silver anvil
#

no problem ^^

glossy kayak
#

You can use the -o argument instead of -p so the player will be treated as operator, allowed to run any command

silver anvil
#

no that doesnt work

glossy kayak
#

Oh why?

silver anvil
#

when i give op then then nothing happens when i click on the npc

glossy kayak
#

Can you do this and post a log in which you try this please?

#

/npc command add -o jobs join Woodcutter

silver anvil
#

with left click he get nothing back

#

and right click no permission

glossy kayak
#

Hmm okay

#

Can you try /npc command add -p permissions permission.node jobs join Woodcutter

#

replace permission.node with the permission node the command requires

silver anvil
#

i need 2 perms

#

/npc command add -p permissions jobs.command.join jobs.join.woodcutter jobs join Woodcutter

#

so ?

#

with the 2 perms

glossy kayak
#

why do you need 2 perms for one command

silver anvil
#

this command need 2 permissions to work

glossy kayak
#

hmm yeah try that and then provide logs again

#

not sure if this argument allows two permissions

silver anvil
#

no the command was wrong

#

/npc command add -p --permissions jobs.command.join jobs.join.woodcutter jobs join Woodcutter

#

so i think its right

glossy kayak
#

Oh yeah I missed the two --

silver anvil
#

yes i think i need the --permission per permission

timid oracleBOT
glossy kayak
#

Does it work now?

silver anvil
#

no i must test

glossy kayak
#

ye go test kekwcry

#

If that also not working, give the group access too jobs.join.* and only use --permissions jobs.command.join

#

That way players should be able to join any job but aren't allowed to use the command to join a job

#

which will prevent them to get a job

glossy kayak
#

Do you use the saves.yml file to modify it?

silver anvil
#

only to see the changes in the file

#

also i have give the group joins.join.*

#

and the npc /npc command add -p --permissions jobs.command.join jobs join Woodcutter

#

and my mate get "no permission"

glossy kayak
#

Hm interesting issue

silver anvil
#

only when i add jobs.command.join for the group too then it works

glossy kayak
#

Did you disable the op system in luckperms?

#

ie: does the /op command still work?

silver anvil
#

for the default group

glossy kayak
#

Why

silver anvil
#

because i want give every needed permission manuell

glossy kayak
#

You don't need this

#

Users don't have any permission by default

#

except there are plugins that provides them by default

silver anvil
#

but that doesn't really matter. If I can do it in luckperms and not in citizen then citizen has a bug because permissions don't seem to work there at all

#

yes i know that

glossy kayak
#

but in this case you should negate the specific permissions, not all

glossy kayak
#

There is an issue between LuckPerms and Citizens, not Citizens alone.

#

this can be caused by faulty setted permissions

silver anvil
#

when i dont add * false then i dont need the permission thing from citizens

#

but i want use it

glossy kayak
#

Yeah so there is an issue with your permissions you set

silver anvil
#

no a issue with citizens

glossy kayak
#

Try it on a test server with only Citizens, JobsReborn, LuckPerms and Vault

silver anvil
#

I don't think you understand. If I take out the * and don't want the group to be able to use the command join, I have to set it to false. and then the same thing happens!

#

i have tested it

#

i have remove the * false

glossy kayak
#

Okay I will test it

silver anvil
#

the command perm gives citizen but i get "no permissions"

#

only when i set the command perm to true then it works

#

but then i dont need citizens perm thing

glossy kayak
#

Yeah seems to be an issue with JobsReborn giving you all permissions by default

#

So you have to negate that permission which ends up not being removed, so you'll never have access even if you're op because that perm is negated..

#

You can ask JobsReborn if they'll add a command that lets you put players in jobs via console.

#

ie /jobs join Miner <playername>

#

that way you can simply add /npc command add jobs join Miner <p> and let the server handle it

#

<p> is a placeholder that returns the name of the player who clicked the npc

silver anvil
#

yes but its a problem from citizens

#

because the command permissions doesnt work

glossy kayak
#

Also maybe @tawny hollow can do something on citizens site, probably faster to feature request that on jobsreborn site

silver anvil
#

i hope so

#

thanks for help

glossy kayak
#

Be aware that if we can not do something, you have to ask JobsReborn devs

silver anvil
#

I don't think you understand me. The Jobs Reborn permissions work perfectly! I can give them to the group and everything works. But they don't work in Citizens. The NPCs ignore them. It's a bug in Citizens. There is not even a reason for the Jobs Reborn Dev to do anything. The bug has to be fixed by Citizen.

#

Citizen's Command Permission System is actually designed to use permissions only temporarily for the execution of the command. And that is exactly what does not work.

#

And I can say that it worked before with the 1.15 version, when I had the same system set up. And it worked then.

glossy kayak
#

It doesn't work because you have to negate the permissions from JobsReborn. The permission plugin doesn't allow that.

If you negate the permission from JobsReborn and give yourself OP you can NOT run this command.

#

If JobsReborn allows you to run /jobs join from the console you can still have this setup and allow the server to add other players to jobs.

glossy kayak
#

Citizens just tells the permission plugin to give you that perm. But you also have that negated perm which prevents you from running the command.

silver anvil
#

Yes, but why do I need the temporary permissions in citizen if I am not allowed to negate anything in luck perms? If I don't negate it in Luck perms then I don't need temporary permissions in citizen

#

so i get it. if i have to give a permission for a plugin to work then i can use that permission in citizen because i don't have to negate it. that's probably what it's there for

#

Citizen should be able to skip negated ones. that would be optimal

glossy kayak
#

If JobsReborn allows you to add players to jobs via console, you do not need any of this. /npc command add jobs join Miner <p> This command would be executed by the server. No need to give players permissions or anything. Even with the negated permissions, because the server and not the player runs this command.

#

Let me test something out I might have another idea.

silver anvil
#

okay

silver anvil
#

so

#

i have remove all negates

#

but when i give npc '0': jobs.command.leave.woodcutter
'1': jobs.leave.woodcutter

#

it doesnt work

#

when i add this 2 perms to luck perms group direct then it works

#

so it is a error in citizens

#

now with the jobs.leave.* perm

#

and the npc have jobs.command.leave.woodcutter perm

#

but dont permission

#

if i add jobs.command.leave.woodcutter to luck perms group like jobs.leave.* then it works

#

also the citizens command permission is not working

glossy kayak
#

What+

#

what doesnt work

glossy kayak
silver anvil
#

i dont use the file

glossy kayak
#

provide a screenshot of /npc command

#

stop providing screenshots of this specific file it doesnt help

glossy kayak
glossy kayak
#

This can not work because you havent specified the -p argument

silver anvil
#

it is now only about the right-click job leave jobs join does not matter for now

#

i dont negate anything in luck perms

#

and i want only give one permission with citizen and it doesnt work

glossy kayak
#

You do not have to give any permission because you have the permissions by default from JobsReborn

silver anvil
#

nooooo

#

i have put this true to test the citizen thing

#

and citizen doesnt give it

glossy kayak
#

You're better of testing it with a different plugin than JobsReborn

silver anvil
#

no

glossy kayak
#

But in this case you have to provide the -o argument

silver anvil
#

what is going on do you not want to admit that citizen has a fault?

#

I'll test again with -o maybe that will work now that I'm not negating anything. But that would still mean that the permission assignment in citizens does not work

#

so like before with the -o thing nothing happens

#

no msg and no action

glossy kayak
#

It doesn't work on right click because you haven't provided the -r argument either

#

!clickcommands

lucid frigateBOT
glossy kayak
#

yeah no wait -r is the default

silver anvil
#

yes

glossy kayak
#

hold one second

silver anvil
#

and here you see all is correct

#

thats why i use the save file to verify

#

and i can use the save file too i must only after edit citizen reload

glossy kayak
#

Works for me

#

As I said earlier it's better to test on a clean testserver

silver anvil
#

have you set the option in jobs config ?

glossy kayak
#

Yep

silver anvil
#

to need the permission

glossy kayak
#

It's only possible for me to leave the job via the npc. /jobs leave Woodcutter aint work

#

Setup a test server and test it yourself.

silver anvil
#

show me your save.yml

#

and which build do you use ?

#

from citizen

#

i use Citizens-2.0.33-b3316.jar

glossy kayak
silver anvil
#

no it works now

#

i have forgot to add -p too

#

i need -p and -o like you

#

not only -o

#

but the permissions does not work on citizens thats a fakt

#

sleep well and thanks

glossy kayak
#

Yeah I've got confused from all of this. It's a separate command.

#

/npc command permissions permission.node

#

This also works. Tested with the vanilla minecraft:say command.

#

Anyway, bye.

silver anvil
#

ah

#

wow

glossy kayak
#

@silver anvil I managed it to work. Did you know that a player requires the jobs.use permission too?

silver anvil
#

thats it

glossy kayak
#

Yeah

silver anvil
#

and now the save.yml shows temporaryPermissions:

#

lol

#

much ado about nothing I will test it tomorrow

glossy kayak
#

ado?

glossy kayak
silver anvil
#

but i know that i had it in the saves back then thanks for the info

#

yes i have jobs.use

#

set

glossy kayak
#

Aaaah

#

Yeah anyway, we can close this then? I'll write a big notice on how JobsReborn work for myself lol.

silver anvil
#

if you guarantee that it works with the temporary ones then you can close the thread ^^ I know it worked back then but sometimes it's stupid ^^

#

unfortunately I can no longer test today

glossy kayak
#

It's okay. I have tested it, this time it worked.

silver anvil
#

good 🙂

glossy kayak
#

I'll write you the steps to do and mark this thread for closing.

silver anvil
#

Then many thanks for your support very nice

#

Have a nice Evening

glossy kayak
#

The group requires the permission jobs.join.* and jobs.use.

Run the following commands:
/npc command add -p jobs join Miner
/npc command add -p -l jobs leave Miner
/npc command permissions jobs.command.*

candid meteorBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@silver anvil

#
Resolved

Thread closed as resolved.

#
Thread Reopened

Thread was manually reopened by @silver anvil.