1 package net.sourceforge.queried;
2
3 /**
4 * Player information that is returned by the player query.
5 *
6 * Any numerical values are set to <code>-9999</code> by default. If the value is
7 * still <code>-9999</code> after the query it means that no such value was returned;
8 * for example <i>kills</i> are the only value returned on a Halflife query, so <i>deaths</i>
9 * will always be <code>-9999</code>
10 *
11 * @author DeadEd
12 */
13 public class PlayerInfo {
14
15 private String name = "";
16 private String clan = "";
17 private int kills = -9999;
18 private int deaths = -9999;
19 private int score = -9999;
20 private int objectivesCompleted = -9999;
21 private int ping = -9999;
22 private int rate = -9999;
23
24 public PlayerInfo() {
25 }
26
27 /**
28 * Get the number of deaths for this player.
29 *
30 * @return number of times this player has died.
31 */
32 public int getDeaths() {
33 return deaths;
34 }
35
36 /**
37 * Get the number of kills for this player.
38 *
39 * @return the number of times this player has made a kill.
40 */
41 public int getKills() {
42 return kills;
43 }
44
45 /**
46 * Get the name of this player.
47 *
48 * @return the name of this player.
49 */
50 public String getName() {
51 return name;
52 }
53 /**
54 * Get the clan this player belongs to (Q4).
55 *
56 * @return the clan this player belongs to (Q4).
57 */
58 public String getClan() {
59 return clan;
60 }
61 /**
62 * Get this player's ping
63 * @return the ping of this player.
64 */
65 public int getPing() {
66 return ping;
67 }
68
69 /**
70 * Get this player's rate settings.
71 * @return the rate settings of this player.
72 */
73 public int getRate() {
74 return rate;
75 }
76
77 /**
78 * Get the number of objectives that this player has completed.
79 *
80 * @return the number of objectives completed by this player.
81 */
82 public int getObjectivesCompleted() {
83 return objectivesCompleted;
84 }
85
86 /**
87 * Get the score of this player.
88 *
89 * @return the score of this player.
90 */
91 public int getScore() {
92 return score;
93 }
94
95 public void setDeaths(int i) {
96 deaths = i;
97 }
98
99 public void setKills(int i) {
100 kills = i;
101 }
102
103 public void setName(String string) {
104 name = string;
105 }
106
107 public void setClan(String string) {
108 clan = string;
109 }
110
111 public void setObjectivesCompleted(int i) {
112 objectivesCompleted = i;
113 }
114
115 public void setScore(int i) {
116 score = i;
117 }
118
119 public void setPing(int i) {
120 ping = i;
121 }
122
123 public void setRate(int i) {
124 rate = i;
125 }
126 }