Spigot [CommandBlocks Extended +] Lite 1.1

A permission for using command blocks

  1. Galaxias submitted a new resource:

    CommandBlocks Extended - A permission for using command blocks

    Read more about this resource...
     
    #1 Galaxias, Feb 19, 2015
    Last edited: May 11, 2016
  2. This is an interesting idea, but without limiting the commands a player can use inside a command block he could cheat very easily. A couple examples:
    • Set the command to '/op @p' to get OP permissions.
    • Use the '/pex' commands to modify permissions (or commands of another permissions plugin)
    • Using '/setblock' to place blocks anywhere you want, bypasses WorldGuard and any other protection plugins.
    • Changing the gamemode of yourself.
    So basically giving a player the permission to use a command block through this plugin would result in the same situation as simply making this player OP.

    I'm writing this just to make you aware of this problem, maybe you could fix this problem somehow (command blacklist or whitelist?).
     
  3. Hi @NLThijs48,

    Thank you for your message.

    I want to let you know that I completely agree. Actually, I am planning on integrating these features. I just thought I'd upload the plugin and release an update later with the feature you suggested.

    I appreciate your feedback!
     
    #3 Galaxias, Feb 19, 2015
    Last edited: Mar 25, 2015
  4. @Galaxias Okey good that you are planning to implement it, maybe until you have something like that it would be wise to have a warning message at the Overview page about it? Because currently it is not really a smart idea to give VIPs permission to something like this.
     
  5. Hi @NLThijs48,

    I have followed your suggestion and have added a note at the plugin page. I'll make sure to remove it when the plugin is updated and it's safe to give your users this permission.

    Having said that, I have a question: do you think people would prefer a list of disabled commands (so a list of commands people can't use in a Command Block and they can use all the others), or a list of allowed commands (so a list of commands people can use in a Command Block and they can't use all the others.)

    Thank you!
     
  6. @Galaxias A list of disabled commands would take quite some work and time to get right, because for almost any plugin you might have to block a couple of them. A list of allowed commands would most certainly be safe, but might limit the possibilities for the player. So the best thing would supporting both, which would not even be that much extra work. You could make a boolean in the config that switches between whitelist and blacklist, and then make a list of strings that fill this white- or blacklist. I would recommend something like regular expressions, because then it would be easy to disable for example all commands with a certain prefix. And regex also allows for more advanced patterns, so it would allow a lot of flexibility.

    Maybe the blacklist implementation of my plugin AreaShop can help you, check this file on GitHub for a method that checks if something is in the blacklist. You could easily modify that to work as whitelist and blacklist, that would need something like this:
    Code (Text):
    /**
    * Check if the command is permitted by the white- or blacklist
    * @param command The command to check
    * @return true if the command is permitted, otherwise false
    */
    public boolean isPermitted(String command) {
      for(String line : plugin.getConfig().getStringList("filters")) {
        Pattern pattern = Pattern.compile(line, Pattern.CASE_INSENSITIVE);
        Matcher matcher = pattern.matcher(command);
        if(matcher.matches()) {
          return plugin.getConfig().getBoolean("whitelist");
        }
      }
      return !plugin.getConfig().getBoolean("whitelist");
    }
    Hopefully that helps a bit with implementing it :)
     
  7. Players can't place or use command blocks even if they have the permission.

    They need to be OP so they will use it.
     
    #7 TuckingFypo, Feb 21, 2015
    Last edited: Feb 21, 2015
  8. Hi @TuckingFypo,

    That's odd. I'll look into it as soon as possible!
     
  9. "
    Thank you for your review! I'm not sure what you mean with "the plugin is not publicized". Could you please elaborate in the discussion thread?"

    I mean it's not as popular as it deserves to be
     
  10. Hi @Eepmageep,

    I understand what you mean now, thanks for explaining! Make sure to recommend this plugin to all your friends with a server, so maybe it'll gain popularity!
     
  11. Amazing plugin, good job
     
  12. How can we help make this more popular?
     
  13. Hi @GomanTV,

    Thank you! Would you mind leaving a review?
     
  14. wow, that's nice. :)
     
  15. Hi everyone!

    I have recently been working on integrating the suggestion of @NLThijs48.
    I will release CommandBlocks Extended + as a premium resource when I am sure there are no more bugs in the new version!

    Thank you,
    Galaxias
     
    • Like Like x 1
  16. Awesome!
     
    • Like Like x 1
    • Optimistic Optimistic x 1