Solved Disable all plugin long cmds?

Discussion in 'Bukkit Help' started by Meatiex, Nov 15, 2014.

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

    Meatiex

    I want to disable doing:
    bukkit:help
    minecraft:help
    myplugin:help
    Coreprotect:core inspect

    Is their some kind of config thing for it or would I have to make a plugin to cancel the event?
     
  2. Offline

    mrCookieSlime

    Moved to Bukkit Help.
     
  3. Offline

    XD 3VIL M0NKEY

    What permissions plugin are you using?
     
    DrPyroCupcake likes this.
  4. Offline

    DrPyroCupcake

    Like XD 3VIL M0NKEY was saying, you could just disable the command with your permissions plugin by not allowing anyone to use it.
     
  5. Offline

    17xDillz1997

    Add the permission if you know how to use the commands but add a minus sign in front. For example with group manager: mangaddp default -bukkit:help
     
  6. Offline

    Meatiex

    @XD 3VIL M0NKEY @DrPyroCupcake @17xDillz1997
    I made my own permissions plugin, All players have the same permissions. I just cancel the event if their not allowed to use the command, because ranks are pre-world and commands like /give can give to people outside the world their in.

    The problem was I had to check for ''/give", "/bukkit:give" and "/minecraft:give".

    I simply added this code to fix it :)
    Code:java
    1. if (cmd.startsWith("bukkit:") || cmd.startsWith("minecraft:")) {
    2. player.sendMessage(ChatColor.RED + "Sorry, Can't Do That..");
    3. event.setCancelled(true);
    4. }


    Here's my permissions plugin:
    Code:java
    1. public class Perms implements Listener {
    2. @EventHandler
    3. public void add(PlayerLoginEvent event) {
    4. PermissionAttachment attachment = event.getPlayer().addAttachment(Main.inst);
    5. attachment.setPermission("bukkit.command.seed",true);
    6. attachment.setPermission("bukkit.command.give",true);
    7. attachment.setPermission("bukkit.command.time",true);
    8. attachment.setPermission("bukkit.command.gamemode",true);
    9. attachment.setPermission("bukkit.command.xp",true);
    10. attachment.setPermission("bukkit.command.toggledownfall",true);
    11. attachment.setPermission("bukkit.command.enchant",true);
    12. attachment.setPermission("bukkit.command.weather",true);
    13. attachment.setPermission("bukkit.command.clear",true);
    14. attachment.setPermission("bukkit.command.effect",true);
    15. attachment.setPermission("bukkit.command.setworldspawn",true);
    16. attachment.setPermission("bukkit.command.achievement",true);
    17. //I know how to set false permissions, just don't need to...
    18. attachment.setPermission("bukkit.command.op",false);
    19. }
    20. @EventHandler
    21. public void leave(PlayerQuitEvent event) {
    22. PermissionAttachment attachment = event.getPlayer().addAttachment(Main.inst);
    23. event.getPlayer().removeAttachment(attachment);
    24. }
    25. }


    Thanks for you'r repy :D
     
Thread Status:
Not open for further replies.

Share This Page