Solved Permissions for console

Discussion in 'Plugin Development' started by TGamingStudio, Oct 2, 2017.

Thread Status:
Not open for further replies.
  1. Hello now i set the permissions in my plugin :

    Code:
    worldtools.day:
            default: false
        worldtools.day.others:
            default: false   
        worldtools.night:
            default: false
        worldtools.night.others:
            default: false
    and more ... but after this the console cant use this commands too ...
    i want this command can use only playar who have permission (from permissionex) or console
    will work not op ?
     
  2. Offline

    EscapeMC

    The console can't use the commands? That's weird :p
    Lastly I recommend making the default to default: op not default: false

    Another thing, in your command, at the very beginning, do you have a check

    Code:
    if(!sender.hasPermission("permissionName") {
        sender.sendMessage("No perms bud")
    }else{
       //command
    }
     
  3. @EscapeMC i have in my code this .... if(sender.hasperms...)
    than do stuff esle write you dont have permissions.. but if have this player permissions from permissionex he can do it .. this is ok ... but ops can do this command too , and than i do in plugin.yml set this permusion to default:false and than console cant send shis command :/

    oh i fixed it with :
    Code:
     if (sender.hasPermission("worldtools.sun.others")|| sender instanceof ConsoleCommandSender)
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Oct 3, 2017
Thread Status:
Not open for further replies.

Share This Page