001 /**
002 * Jetrix TetriNET Server
003 * Copyright (C) 2005 Emmanuel Bourg
004 *
005 * This program is free software; you can redistribute it and/or
006 * modify it under the terms of the GNU General Public License
007 * as published by the Free Software Foundation; either version 2
008 * of the License, or (at your option) any later version.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
013 * GNU General Public License for more details.
014 *
015 * You should have received a copy of the GNU General Public License
016 * along with this program; if not, write to the Free Software
017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
018 */
019
020 package net.jetrix.agent;
021
022 /**
023 * Player information returned by the query agent.
024 *
025 * @since 0.2
026 *
027 * @author Emmanuel Bourg
028 * @version $Revision: 794 $, $Date: 2009-02-17 20:08:39 +0100 (Tue, 17 Feb 2009) $
029 */
030 public class PlayerInfo
031 {
032 private String nick;
033 private String team;
034 private String version;
035 private int slot;
036 private int status;
037 private int authenticationLevel;
038 private String channel;
039
040 public String getNick()
041 {
042 return nick;
043 }
044
045 public void setNick(String nick)
046 {
047 this.nick = nick;
048 }
049
050 public String getTeam()
051 {
052 return team;
053 }
054
055 public void setTeam(String team)
056 {
057 this.team = team;
058 }
059
060 public String getVersion()
061 {
062 return version;
063 }
064
065 public void setVersion(String version)
066 {
067 this.version = version;
068 }
069
070 public int getSlot()
071 {
072 return slot;
073 }
074
075 public void setSlot(int slot)
076 {
077 this.slot = slot;
078 }
079
080 public int getStatus()
081 {
082 return status;
083 }
084
085 public void setStatus(int status)
086 {
087 this.status = status;
088 }
089
090 public boolean isPlaying()
091 {
092 return status > 0;
093 }
094
095 public int getAuthenticationLevel()
096 {
097 return authenticationLevel;
098 }
099
100 public void setAuthenticationLevel(int authenticationLevel)
101 {
102 this.authenticationLevel = authenticationLevel;
103 }
104
105 public String getChannel()
106 {
107 return channel;
108 }
109
110 public void setChannel(String channel)
111 {
112 this.channel = channel;
113 }
114
115 public String toString()
116 {
117 return "[Player name='" + nick + "' channel='" + channel + "']";
118 }
119 }