Advertisement
xlrnxnlx

!important :D

Oct 16th, 2014
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.63 KB | None | 0 0
  1. protected void sendMessage(Player player, final String msg){
  2.         if(msg == null || msg.trim().isEmpty())
  3.             throw new IllegalArgumentException("A mensagem a ser enviada não pode estar vazia.");
  4.        
  5.         boolean mod = PlayerInfo.getUserType(player) == PlayerInfo.MODERATOR;
  6.         MessageType type = mod ? MessageTpl.MOD : MessageTpl.PLAYER;
  7.         try {
  8.             GameDataAccess game = Game.sendMessage(player, type, msg);
  9.         } catch(GameDataException e){
  10.             GameDataAccess game = Game.retryMessage(player,type, msg);
  11.         } finally {
  12.             GameDataAccess.disp();
  13.         }
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement