4 |
import javax.persistence.Entity; |
import javax.persistence.Entity; |
5 |
import javax.persistence.GeneratedValue; |
import javax.persistence.GeneratedValue; |
6 |
import javax.persistence.Id; |
import javax.persistence.Id; |
7 |
|
import javax.persistence.Transient; |
8 |
|
|
9 |
|
import java.util.Set; |
10 |
|
|
11 |
|
import dk.thoerup.bukkit.hoeruputils.Util; |
12 |
|
|
13 |
|
|
14 |
@Entity |
@Entity |
15 |
public class LockedChestBean { |
public class ChestBean { |
16 |
|
final static int LOCKED = 1; |
17 |
|
final static int SNITCHING = 2; |
18 |
|
|
19 |
|
|
20 |
@Id |
@Id |
21 |
@GeneratedValue |
@GeneratedValue |
22 |
int id; |
int id; |
31 |
|
|
32 |
boolean doublechest = false; |
boolean doublechest = false; |
33 |
|
|
34 |
String modifyPlayers; |
String modifyPlayers; |
|
|
|
35 |
|
|
36 |
|
int chestType; |
37 |
|
|
38 |
|
String comment = ""; |
39 |
|
|
40 |
|
@Transient |
41 |
|
Set<String> modifyPlayersSet; |
42 |
|
|
43 |
|
public int getChestType() { |
44 |
|
return chestType; |
45 |
|
} |
46 |
|
public void setChestType(int chestType) { |
47 |
|
this.chestType = chestType; |
48 |
|
} |
49 |
public String getOwner() { |
public String getOwner() { |
50 |
return owner; |
return owner; |
51 |
} |
} |
110 |
} |
} |
111 |
public void setModifyPlayers(String modifyPlayers) { |
public void setModifyPlayers(String modifyPlayers) { |
112 |
this.modifyPlayers = modifyPlayers; |
this.modifyPlayers = modifyPlayers; |
113 |
|
|
114 |
|
this.modifyPlayersSet = Util.stringToSet( modifyPlayers ); |
115 |
|
} |
116 |
|
|
117 |
|
public Set<String> getModifyPlayersSet() { |
118 |
|
return modifyPlayersSet; |
119 |
|
} |
120 |
|
|
121 |
|
/*public void setModifyPlayersSet(Set<String> modifyPlayersSet) { |
122 |
|
this.modifyPlayersSet = modifyPlayersSet; |
123 |
|
}*/ |
124 |
|
|
125 |
|
public String getComment() { |
126 |
|
return comment; |
127 |
|
} |
128 |
|
public void setComment(String comment) { |
129 |
|
this.comment = comment.trim(); |
130 |
|
} |
131 |
|
|
132 |
|
public String getCommentString() { |
133 |
|
if (this.comment == null || this.comment.length() == 0) |
134 |
|
return ""; |
135 |
|
|
136 |
|
return " (Comment: " + this.comment + ")"; |
137 |
} |
} |
138 |
|
|
139 |
} |
} |