Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-2259

Get successful count after execute a command.


    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None

      Sometimes I need to know the successful count of command execution, such as /testfor, so I suggest add a executeSuccess besides a normal execute method.

      (In vanilla command wrapper)

      public int executeSuccess(CommandSender sender, String commandLabel, String[] args) {
          if (!testPermission(sender)) return 0;
          ICommandListener icommandlistener = getListener(sender);
          return dispatchVanillaCommand(sender, icommandlistener, args);

      (In its super type command abstract, add executeSuccess method.)
      Is this suitable?

            Unassigned Unassigned
            mukiu mukiu
            0 Vote for this issue
            2 Start watching this issue