forked from Viduality/VSkyblock
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathPlayerInfo.java
More file actions
180 lines (154 loc) · 3.75 KB
/
PlayerInfo.java
File metadata and controls
180 lines (154 loc) · 3.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
package com.github.Viduality.VSkyblock.Utilitys;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import java.sql.Timestamp;
import java.util.UUID;
public class PlayerInfo {
private UUID playerId;
private String name = null;
private int islandId = 0;
private boolean isIslandOwner = false;
private boolean kicked = false;
private String islandName = null;
private int islandLevel = 0;
private int deathCount = 0;
private Timestamp islandCreated = null;
private int challengesCompleted = 0;
public int getChallengesCompleted() {
return challengesCompleted;
}
public void setChallengesCompleted(int challengesCompleted) {
this.challengesCompleted = challengesCompleted;
}
public Timestamp getIslandCreated() {
return islandCreated;
}
public void setIslandCreated(Timestamp islandCreated) {
this.islandCreated = islandCreated;
}
/**
* Returns the player.
* @return Player
*/
public Player getPlayer() {
return playerId != null ? Bukkit.getPlayer(playerId) : null;
}
/**
* Sets the player.
* @param player
*/
public void setPlayer(Player player) {
this.playerId = player.getUniqueId();
}
/**
* Sets the uuid from the player.
* @param uuid
*/
public void setUuid(String uuid) {
this.playerId = UUID.fromString(uuid);
}
/**
* Returns the playerrs uuid.
* @return String
*/
public UUID getUuid() {
return playerId;
}
/**
* Sets the players name.
* @param name
*/
public void setName(String name) {
this.name = name;
}
/**
* Returns the players name.
* @return String
*/
public String getName() {
return name;
}
/**
* Sets the id from the players island.
* @param islandid
*/
public void setIslandId(int islandid) {
this.islandId = islandid;
}
/**
* Returns the id from the players island.
* @return int
*/
public int getIslandId() {
return islandId;
}
/**
* Sets the island owner from the players island.
* @param islandowner
*/
public void setIsIslandOwner(boolean islandowner) {
this.isIslandOwner = islandowner;
}
/**
* Returns true if the player is the owner of the island where he is playing.
* @return boolean
*/
public boolean isIslandOwner() {
return isIslandOwner;
}
/**
* Sets a boolean in case the player has been kicked from his last island.
* @param kicked
*/
public void setKicked(boolean kicked) {
this.kicked = kicked;
}
/**
* Returns true if the player was kicked from his last island.
* @return boolean
*/
public boolean isKicked() {
return kicked;
}
/**
* Sets the island name.
* @param islandname
*/
public void setIslandName(String islandname) {
this.islandName = islandname;
}
/**
* Returns the island name.
* @return String
*/
public String getIslandName() {
return islandName;
}
/**
* Sets the islands level.
* @param islandLevel
*/
public void setIslandLevel(int islandLevel) {
this.islandLevel = islandLevel;
}
/**
* Returns the islands level.
* @return int
*/
public int getIslandLevel() {
return islandLevel;
}
/**
* Sets the death count for the player.
*/
public void setDeathCount(int deathCount) {
this.deathCount = deathCount;
}
/**
* Returns the death count of the player.
* @return deathcount
*/
public int getDeathCount() {
return deathCount;
}
}