Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1.  
  2. /**
  3. * This method sets the value to be deducted from a players account for TKing
  4. * @param sender
  5. * @param cmd
  6. */
  7. public void doSetTeamKillTax(String sender, String cmd) {
  8. int newTax = -1;
  9. try {
  10. newTax = Integer.valueOf(cmd.substring(cmd.indexOf(" ") + 1));
  11. } catch (NumberFormatException e) {
  12. m_botAction.sendPrivateMessage( sender, "Invalid syntax, please use !tax <x> where x is an integer > 0");
  13. return;
  14. }
  15. if (tax > 0) {
  16. this.tax = newTax;
  17. m_botAction.sendPrivateMessage( sender, "The tax deduction for team killing has been set to " + tax);
  18. } else
  19. m_botAction.sendPrivateMessage( sender, "Invalid syntax, please use !tax <x> where x is an integer > 0");
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement