Possible? Giving and removing permissions via command/sign

Discussion in 'Plugin Development' started by Warreo, Aug 5, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    Warreo

    Hello everyone and thank you for taking time to help me with a question of mine. I'm just wondering if it is possible, if so how, to give a player a permission or remove a permission without changing the group they are currently in via command or a sign.

    Thanks,
    Warreo
     
  2. Offline

    anthonyc39

    you can do it just using commands if you have PermissionsEX
     
  3. Offline

    TheSmallBones

    Pseudo code:
    PlayerInteract event
    Player p = event.getPlayer:
    If interact is right click
    If its a sign
    If sign text is "right click to get Op!!1!"
    Dispatch command: "pex user "+p+" add permission.node"

    Also: the dispatch command thing is


    Code:
    plugin.getServer().dispatchCommand(console,"command plus arguments");

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 27, 2016
  4. Offline

    Warreo

    I think I understand what your saying. And thank you very much, it helps a ton. And the

    plugin.getServer().dispatchCommand(console,"command plus arguments");

    should work with any command to give a player a permission using PermissionsEx, correct?
     
  5. Offline

    TheSmallBones

    Yes. It works with any command, but it executes it from the console, so you can't do stuff like /fly ;)
     
  6. Offline

    Warreo

    Thank you very much! I've been doing some testing and this helps soooo much! makes my life a million times easier! :D my server appreciates it! :D
     
  7. Offline

    TheSmallBones

    No problem!
     
Thread Status:
Not open for further replies.

Share This Page