No permission

Discussion in 'Plugin Development' started by sailorerik, Dec 31, 2014.

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

    sailorerik

    Hello.
    I wanted to ask, how i check all permissions in server, and then i add custom message?
    I know, how to check 1 command permission, but i want to replace all command messages.

    Code:
        @EventHandler
        public void onPlayerCommandProcess(PlayerCommandPreprocessEvent event) {
            Player player = event.getPlayer();
            String msg = event.getMessage();
            if (!player.hasPermission("bukkit.command.op.give")) {
                sendTitle(player, "§cError","&4You do not have permission do to that.");
            }
    
        }
     
  2. Offline

    mine-care

    Please explain further what you want to do?
    do you want to replace all no permission messages of other plugins?
     
  3. Offline

    sailorerik

    Yes i do want replace all messages from every single plugin, and also i want to replace non plugin command messages like op, deop, unban, deop, pardon, etc.
     
  4. Offline

    sailorerik

  5. Wouldn't work. Not all plugins have stored their permissions in plugin.yml and just check them in a simple
    if(player.hasPermission("example.perm")){
     
Thread Status:
Not open for further replies.

Share This Page