Word/Command blocker

Discussion in 'Plugin Requests' started by ckav11, Mar 7, 2016.

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

    ckav11

    Plugin category: Administration/Player management

    Suggested name: Blocker, idk

    What I want: A plugin that bans words in general from being used in commands or said in chat. I would like this plugin to tell the user "You may not use that word in this command" or "You may not say this word in chat"

    Ideas for commands: /blocker reload

    Ideas for permissions: blocker.override(Default to OP please)

    When I'd like it by: Tomorrow.
     
  2. Offline

    StarRocket

    @ckav11 Did you search around first before making this suggestion? There are a lot of plugins that do exactly this. If you didn't like any of them I suppose I could work on this.

    Edit: Coded it because I got bored. The command /blocker will take one of 4 different arguments: add, remove, addcmd, removecmd. Add will add a filtered word (very bypassable, there are plugins that do the job much better such as pwnfilter). Remove will remove the word, if it exists in the blocked words list in the config. Addcmd will add a blocked command (do not include the '/'!). Removecmd will remove a blocked command.

    ex: /blocker add taco would add taco to the blacklisted words.

    Permissions: blocker.add, blocker.override - blocker.add allows you to add words and command and remove words and commands, blocker.override allows you to bypass the word and command filter. Both default to OP
     
    Last edited: Mar 7, 2016
  3. Offline

    DJseanyB

    Also, if you create a region, you can make it so they can use certain commands in that area, regions use worlds edit, just look up regions flags
     
  4. Offline

    ckav11

    @DJseanyB @StarRocket I meant as in like to deny any commands or messages that contain a particular word. To help prevent racism from faction tags, nicks, etc.
    EDIT:
    @StarRocket I did not see your update, I will look at it shortly
     
  5. Offline

    StarRocket

    @ckav11 I don't think I completely understood the command block. Did you mean that if the command contained a filtered word, it would block it? If so, I can change that quickly. Currently I made it so that you can simply block commands from being executed.
     
  6. Offline

    ckav11

    Yes, that is what I meant, thank you very much @StarRocket
     
  7. Offline

    StarRocket

    @ckav11 Alright, updated. Same permissions and commands, but now with a command reprocess event it will check if any of the words that are filtered are contained in the command and if so, it will block them unless the player has the blocker.override permission.
     
  8. Offline

    ckav11

    Hello,
    @StarRocket Sorry for a delayed response. The plugin works really well but I was wondering if you could change the command "/blocker addcmd" to "/blocker addcmdall" and if you could make "/blocker addcmd" only block that command instead of blocking every command containing that fragment. Same with the command to add words. Also if it would be possible for you to add a messages.yml or lang.yml that would be great! Oh and could you add another message for when it blocks every command containing that fragment so it will say "&cYou are not able to perform commands containing '<fragment>'."
     
Thread Status:
Not open for further replies.

Share This Page