Solved Essentials?

Discussion in 'Spigot Plugin Development' started by Nosmakos, May 11, 2016.

  1. hey guys is there any way to cancel /balance, /bal or /money command from essentials in a plugin? for example i don't want players to do the commands and doing /points.
  2. Are you talking about commands that don't seem to have permission nodes on the essentials wiki?
  3. If you're making it just create commands that use the same executors as theirs (executors basically being the name of a command). If you are not then look up 'spigot command blocking plugin'. Oh Spigot also has a blocked commands section within it's configuration I believe.
  4. Open the plugin jar file with winrar then open the plugin.yml file and remove the commands you don't wan't in the "commands:" field.
  5. I don't really agree with this method, but I guess it is one way to do so. (assuming they rely on Bukkit's command implementation not their own

    Edit: Now that I think about it Bukkit should complain if it attempts to register a command that doesn't exist within the plugin's data.
  6. The command is totally removed from the game but ofcourse it will give a error on start of the plugin but not when you execute the command.

    So using this method you are gonna get one error on startup.
  7. yeah but the thing is i don't want any error :/ well i tried about changing message about /balance but this is vault api message and it changed successfully but i tried /bal and /money and i can't make those to change because it's essentials and i can't find any way to change the message or cancel the commands
  8. @EventHandler
    public void onCommand(PlayerCommandPreProcessEvent e){
    If (e.getMessage().equalsIgnoreCase("/bal")||
    e.getMessage().equalsIgnoreCase("/balance") ||e.getMessage().equalsIgnoreCase("/money" )){
    • Useful Useful x 1
  9. thank you so much! it's worked!
    • Friendly Friendly x 1
  10. Code (Text):
        public void onCommand(PlayerCommandPreprocessEvent e){
            if (e.getMessage().equalsIgnoreCase("/bal")|| e.getMessage().equalsIgnoreCase("/balance") ||e.getMessage().equalsIgnoreCase("/money" )){
                Player p = e.getPlayer();
                p.sendMessage(ChatColor.RED + "You don't need money in a dead world!");
    • Winner Winner x 1
  11. Good god, that error message though 0_0
  12. Your welcome
    • Friendly Friendly x 1
  13. ahahahaha yeah lol
    • Like Like x 1