Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * This method sets the value to be deducted from a players account for TKing
- * @param sender
- * @param cmd
- */
- public void doSetTeamKillTax(String sender, String cmd) {
- int newTax = -1;
- try {
- newTax = Integer.valueOf(cmd.substring(cmd.indexOf(" ") + 1));
- } catch (NumberFormatException e) {
- m_botAction.sendPrivateMessage( sender, "Invalid syntax, please use !tax <x> where x is an integer > 0");
- return;
- }
- if (tax > 0) {
- this.tax = newTax;
- m_botAction.sendPrivateMessage( sender, "The tax deduction for team killing has been set to " + tax);
- } else
- m_botAction.sendPrivateMessage( sender, "Invalid syntax, please use !tax <x> where x is an integer > 0");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement