How to block /me

Discussion in 'Spigot Plugin Help' started by NocturnalDev, Jan 4, 2020.

  1. Hello, I have a permissions issue. I'm trying to block /me and I've done everything that other threads posted online have suggested but my players can still use it.

    Includes negating bukkit.command.* and minecraft.command.*
     
  2. if you have Essentials, deny the permission essentials.me
     
  3. Are you an Programmer?
    If so write an Listener with

    @EventHandler (priority = EventPriority.NORMAL)
    public void onMe(PlayerCommandPreprocessEvent e) {
    Player p = e.getPlayer();
    String cmd = e.getMessage();
    if(cmd.equalsIgnoreCase("/me") && if(cmd.equalsIgnoreCase("/minecraft:me") {
    e.setCancelled(true);
    }
    }
     
    #3 DasChaos44, Jan 4, 2020
    Last edited: Jan 17, 2020
  4. I don't think that everyone know how to code lol, if they asked for a plugin/permissions, it's likely that they're not
     
  5. I write if he is an programmer, it doesn't mean he must be a programmer.
     
    • Agree Agree x 1
  6. I was planning on doing this, but there really isn't any other way?
     
  7. This would only disable it if they used /me. Using args would bypass this. Also doesn't block out /minecraft:me.

    I wrote a plugin which does this for you.

    If a player uses /me or /minecraft:me and does not have the blockme.bypass permission node (defaults to OP), it gets cancelled.
    Tested on 1.15.1, works fine for me.
    I hope it's what you wanted, let me know if there are complications somehow.

    Source code is included within the jar btw
     

    Attached Files: