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."); } }
Please explain further what you want to do? do you want to replace all no permission messages of other plugins?
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.
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")){