1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Need help with the permissions

Discussion in 'Facepalm' started by NickTehUnicorn, Jul 7, 2017.

  1. NickTehUnicorn

    NickTehUnicorn Zombie

    Messages:
    200
    GitHub:
    unickorn
    So I want some commands to be used by just the console and the ones who have the permission.

    I've set the permissions' "default:" to false and then gave permission to myself in the game (using PurePerms) and it works fine.

    BUT I can't use the commands from console because I didn't give CONSOLE permission from PurePerms (and it's not possible I guess because CONSOLE is not a player)

    So should I change the default: to something else or is there any other way to fix this can someone please help?
     
  2. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    if you made the plugin, you can do
    if $sender hasPermission, OR instanceof ConsoleCommandSender
     
  3. Zayd

    Zayd Witch

    Messages:
    55
    GitHub:
    ZaydPE
    The console is OP... it should be able to do anything.
     
  4. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    nope, that's a misconception ,
    OP only grants OP permission assigned to be granted to OP,
    if you set default to false, that meant no one will have it unless you explicitly granted it said node
    via plugins like pureperms or using your own plugins
     
  5. NickTehUnicorn

    NickTehUnicorn Zombie

    Messages:
    200
    GitHub:
    unickorn
    I didn't make the plugin. Is there any other way than that?
     
  6. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    then you could create a plugin help, wording it differently like
    "i have a plugin which have permission "default:" to false which i need that to prevent anyone other then me to use it, but how can i allow console to use it" or something like so
    but i doubt there will be any useful advices, they would mostly go by:
    editing it so default is true and use a perm manager to remove it
    editing it so it allows console to run the command
    ask the plugin developer to allow console

    if you can code, which i assume you can because this is in development section, try editing it so it allows console to run the command is my best idea
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.