Skip to content
This repository has been archived by the owner on Aug 31, 2019. It is now read-only.

Commit

Permalink
Allow commands to dynamically decide if they should be handled or pas…
Browse files Browse the repository at this point in the history
…sed upstream
  • Loading branch information
jedediah committed Sep 5, 2015
1 parent d2b8c6f commit 9c1884a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package net.md_5.bungee.api.plugin;

/**
* Thrown from inside a command to tell the proxy to pass the command upstream
*/
public class CommandBypassException extends RuntimeException {

}
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ public boolean dispatchCommand(CommandSender sender, String commandLine, List<St
tabResults.add( s );
}
}
} catch ( CommandBypassException ex ) {
return false;
} catch ( Exception ex )
{
sender.sendMessage( ChatColor.RED + "An internal error occurred whilst executing this command, please check the console log for details." );
Expand Down

0 comments on commit 9c1884a

Please sign in to comment.