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

Overriding

Discussion in 'Development' started by DogTheBlock, May 21, 2017.

  1. DogTheBlock

    DogTheBlock Spider Jockey

    Messages:
    29
    is it possible to override a default perm like pocketmine.command.gamemode?
     
  2. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    what do you mean by override?
     
  3. DogTheBlock

    DogTheBlock Spider Jockey

    Messages:
    29
    like change the default permission for pocketmine.command.gamemode
     
  4. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    You can't change the command's permission, but you can set who is allowed to use the permission. [citation needed]
     
  5. Michael

    Michael Baby Zombie

    Messages:
    113
    GitHub:
    michaelm04
    You could unregister then reregister the /gamemode command then set the permission if changing the permission for the command allowed usage is what your looking to do.
     
  6. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Like Michael said^

    You can extend the command class you'll be registering while overwriting with \pocketmine\commands\default\GamemodeCommand.
     
  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.