Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void sendMessage(Player player, final String msg){
- if(msg == null || msg.trim().isEmpty())
- throw new IllegalArgumentException("A mensagem a ser enviada não pode estar vazia.");
- boolean mod = PlayerInfo.getUserType(player) == PlayerInfo.MODERATOR;
- MessageType type = mod ? MessageTpl.MOD : MessageTpl.PLAYER;
- try {
- GameDataAccess game = Game.sendMessage(player, type, msg);
- } catch(GameDataException e){
- GameDataAccess game = Game.retryMessage(player,type, msg);
- } finally {
- GameDataAccess.disp();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement