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

Disable Command

Discussion in 'Help' started by JarguarLoveMC, Jan 24, 2018.

  1. JarguarLoveMC

    JarguarLoveMC Spider Jockey

    Messages:
    49
    How do i disable certain command in people faction claim land?
     
  2. Oniii-Chan

    Oniii-Chan Witch

    Messages:
    66
    GitHub:
    Vincent583
    Just set permission to user/groups you need to not execute command
     
  3. DaPigGuy

    DaPigGuy Slime

    Messages:
    86
    GitHub:
    DaPigGuy
    Do you mean disable commands while you're in land claimed by a faction?
     
  4. JarguarLoveMC

    JarguarLoveMC Spider Jockey

    Messages:
    49
    Yes I want to disable /f home in others people claim land
     
  5. JarguarLoveMC

    JarguarLoveMC Spider Jockey

    Messages:
    49
    I only want to disable it in claim land not permanent
     
  6. DaPigGuy

    DaPigGuy Slime

    Messages:
    86
    GitHub:
    DaPigGuy
    To do this with a plugin outside of your Factions plugin, use PlayerCommandPreprocessEvent, check if the command is /f home & check if a player is in another faction's claimed land. Cancel if so. To do it in your Factions plugin, just add a check to the Home subcommand
     
  7. JarguarLoveMC

    JarguarLoveMC Spider Jockey

    Messages:
    49
    Is it possible to add some code to FactionCommand.php to prevent people from using it instead of doing it the way u ask?
     
  8. WitheredFactions

    WitheredFactions Creeper

    Messages:
    3
    GitHub:
    david202020
    how would it check when they are on it
     
  9. DaPigGuy

    DaPigGuy Slime

    Messages:
    86
    GitHub:
    DaPigGuy
    Check option 2...
    Depends on your Factions plugin's API (or how they save claimed land and factions if they don't have an API...).
     
    HyGlobalHD likes this.
  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.