Skip to content

Commit cdbb484

Browse files
committed
Updated GitHub repository. Renamed package me.loving11ish.clans.api to me.loving11ish.clans.apiimpl. Fixed API module shading correctly into uber jar. Fixed API module obfuscation. Added full javadocs to the API classes.
1 parent c8861c4 commit cdbb484

File tree

5 files changed

+392
-102
lines changed

5 files changed

+392
-102
lines changed

pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<build>
2929
<defaultGoal>package</defaultGoal>
3030
<plugins>
31+
3132
<plugin>
3233
<groupId>org.apache.maven.plugins</groupId>
3334
<artifactId>maven-compiler-plugin</artifactId>
@@ -37,6 +38,18 @@
3738
<target>${java.version}</target>
3839
</configuration>
3940
</plugin>
41+
42+
<plugin>
43+
<groupId>org.apache.maven.plugins</groupId>
44+
<artifactId>maven-javadoc-plugin</artifactId>
45+
<version>3.6.3</version>
46+
<configuration>
47+
<show>private</show>
48+
<nohelp>true</nohelp>
49+
<excludes>ClansLite-Core.src.main.java.me.loving11ish.clans.*</excludes>
50+
</configuration>
51+
</plugin>
52+
4053
</plugins>
4154
</build>
4255

src/main/java/me/loving11ish/clans/api/ClansLiteAPI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ static ClansLiteAPI getInstance() {
196196
* This method will fire an AsyncClanCreateEvent upon successful Clan creation.
197197
*
198198
* @param player The Bukkit Player object to create a Clan from.
199-
* @param clanName The name of the clan to create. (This cannot be changed later & cannot contain color codes)
199+
* @param clanName The name of the clan to create. (This cannot be changed later and cannot contain color codes)
200200
* @return Returns a Clan object.
201201
*/
202202
Clan createClan(Player player, String clanName);

src/main/java/me/loving11ish/clans/api/models/Clan.java

Lines changed: 248 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -3,84 +3,255 @@
33
import java.util.ArrayList;
44
import java.util.HashMap;
55

6+
/**
7+
* This contains all the `PLOJO` (Plain Old Java Object) methods for the Clan object.
8+
* <p>
9+
* This object is used to store all the information about a clan.
10+
*/
611
public interface Clan {
712

8-
public String getClanOwner();
9-
10-
public String getClanFinalOwnerName();
11-
12-
public void setClanFinalOwnerName(String clanFinalOwnerName);
13-
14-
public String getClanFinalName();
15-
16-
public void setClanFinalName(String newClanFinalName);
17-
18-
public String getClanPrefix();
19-
20-
public void setClanPrefix(String newClanPrefix);
21-
22-
public ArrayList<String> getClanMembers();
23-
24-
public void setClanMembers(ArrayList<String> clanMembersList);
25-
26-
public void addClanMember(String clanMember);
27-
28-
public Boolean removeClanMember(String clanMember);
29-
30-
public ArrayList<String> getClanAllies();
31-
32-
public void addClanAlly(String ally);
33-
34-
public void removeClanAlly(String allyUUID);
35-
36-
public void setClanAllies(ArrayList<String> clanAlliesList);
37-
38-
public void addClanEnemy(String enemy);
39-
40-
public void removeClanEnemy(String enemyUUID);
41-
42-
public void setClanEnemies(ArrayList<String> clanEnemiesList);
43-
44-
public ArrayList<String> getClanEnemies();
45-
46-
public boolean isFriendlyFireAllowed();
47-
48-
public void setFriendlyFireAllowed(boolean friendlyFire);
49-
50-
public int getClanPoints();
51-
52-
public void setClanPoints(int clanPoints);
53-
54-
public String getClanHomeWorld();
55-
56-
public void setClanHomeWorld(String clanHomeWorld);
57-
58-
public double getClanHomeX();
59-
60-
public void setClanHomeX(double clanHomeX);
61-
62-
public double getClanHomeY();
63-
64-
public void setClanHomeY(double clanHomeY);
65-
66-
public double getClanHomeZ();
67-
68-
public void setClanHomeZ(double clanHomeZ);
69-
70-
public float getClanHomeYaw();
71-
72-
public void setClanHomeYaw(float clanHomeYaw);
73-
74-
public float getClanHomePitch();
75-
76-
public void setClanHomePitch(float clanHomePitch);
77-
78-
public int getMaxAllowedProtectedChests();
79-
80-
public void setMaxAllowedProtectedChests(int maxAllowedProtectedChests);
81-
82-
public HashMap<String, ClanChest> getProtectedChests();
83-
84-
public void setProtectedChests(HashMap<String, ClanChest> protectedChests);
13+
/**
14+
* @return Returns the UUID string off the clan owner.
15+
*/
16+
String getClanOwner();
17+
18+
/**
19+
* This value is not always accurate, as the owner can change their name.
20+
* <p>
21+
* Do not rely on this value for anything important.
22+
* <p>
23+
* Please use {@link #getClanOwner()} instead and get the player via the UUID.
24+
* <p>
25+
* @return Returns the last known name of the clan owner.
26+
*/
27+
String getClanFinalOwnerName();
28+
29+
/**
30+
* @param clanFinalOwnerName The latest known name of the clan owner.
31+
*/
32+
void setClanFinalOwnerName(String clanFinalOwnerName);
33+
34+
/**
35+
* This value will ALWAYS be accurate, as the name of the clan cannot change.
36+
* <p>
37+
* @return Returns the name of the clan.
38+
*/
39+
String getClanFinalName();
40+
41+
/**
42+
* THIS SHOULD ONLY BE USED FOR INTERNAL USE WHEN LOADING CLANS FROM STORAGE!
43+
* <p>
44+
* DO NOT USE THIS METHOD!
45+
* <p>
46+
* @param newClanFinalName The new name of the clan.
47+
*/
48+
void setClanFinalName(String newClanFinalName);
49+
50+
/**
51+
* @return Returns the prefix of the clan.
52+
*/
53+
String getClanPrefix();
54+
55+
/**
56+
* This can have colour codes and other UTF-8 formatting.
57+
* <p>
58+
* @param newClanPrefix The new prefix of the clan.
59+
*/
60+
void setClanPrefix(String newClanPrefix);
61+
62+
/**
63+
* DO NOT use this to directly inject new or remove members into the clan.
64+
* <p>
65+
* Use {@link #addClanMember(String)} or {@link #removeClanMember(String)} instead.
66+
* <p>
67+
* @return Returns an arraylist of UUID strings, each one represents a unique clan member.
68+
*/
69+
ArrayList<String> getClanMembers();
70+
71+
/**
72+
* THIS SHOULD ONLY BE USED FOR INTERNAL USE WHEN LOADING CLANS FROM STORAGE!
73+
* <p>
74+
* DO NOT USE THIS METHOD!
75+
* <p>
76+
* @param clanMembersList The new list of clan members.
77+
*/
78+
void setClanMembers(ArrayList<String> clanMembersList);
79+
80+
/**
81+
* @param clanMember The UUID string of the clan member to add.
82+
*/
83+
void addClanMember(String clanMember);
84+
85+
/**
86+
* @param clanMember The UUID string of the clan member to remove.
87+
* @return Returns true if the clan member was removed, false if not found.
88+
*/
89+
Boolean removeClanMember(String clanMember);
90+
91+
/**
92+
* DO NOT use this to directly inject new or remove allied clans into the clan.
93+
* <p>
94+
* Use {@link #addClanAlly(String)} or {@link #removeClanAlly(String)} instead.
95+
* <p>
96+
* @return Returns an arraylist of UUID strings, each one represents a unique clan ally.
97+
*/
98+
ArrayList<String> getClanAllies();
99+
100+
/**
101+
* @param ally The UUID string of the clan ally to add.
102+
*/
103+
void addClanAlly(String ally);
104+
105+
/**
106+
* @param allyUUID The UUID string of the clan ally to remove.
107+
*/
108+
void removeClanAlly(String allyUUID);
109+
110+
/**
111+
* THIS SHOULD ONLY BE USED FOR INTERNAL USE WHEN LOADING CLANS FROM STORAGE!
112+
* <p>
113+
* DO NOT USE THIS METHOD!
114+
* <p>
115+
* @param clanAlliesList The new list of clan allies.
116+
*/
117+
void setClanAllies(ArrayList<String> clanAlliesList);
118+
119+
/**
120+
* @param enemy The UUID string of the clan enemy to add.
121+
*/
122+
void addClanEnemy(String enemy);
123+
124+
/**
125+
* @param enemyUUID The UUID string of the clan enemy to remove.
126+
*/
127+
void removeClanEnemy(String enemyUUID);
128+
129+
/**
130+
* THIS SHOULD ONLY BE USED FOR INTERNAL USE WHEN LOADING CLANS FROM STORAGE!
131+
* <p>
132+
* DO NOT USE THIS METHOD!
133+
* <p>
134+
* @param clanEnemiesList The new list of clan enemies.
135+
*/
136+
void setClanEnemies(ArrayList<String> clanEnemiesList);
137+
138+
/**
139+
* DO NOT use this to directly inject new or remove enemies into the clan.
140+
* <p>
141+
* Use {@link #addClanEnemy(String)} or {@link #removeClanEnemy(String)} instead.
142+
* <p>
143+
* @return Returns an arraylist of UUID strings, each one represents a unique clan enemy.
144+
*/
145+
ArrayList<String> getClanEnemies();
146+
147+
/**
148+
* @return Returns whether friendly fire is allowed in the clan.
149+
*/
150+
boolean isFriendlyFireAllowed();
151+
152+
/**
153+
* @param friendlyFire Whether friendly fire is allowed in the clan.
154+
*/
155+
void setFriendlyFireAllowed(boolean friendlyFire);
156+
157+
/**
158+
* @return Returns the clan points.
159+
*/
160+
int getClanPoints();
161+
162+
/**
163+
* @param clanPoints The new clan points.
164+
*/
165+
void setClanPoints(int clanPoints);
166+
167+
/**
168+
* @return Returns the clan home world string name.
169+
*/
170+
String getClanHomeWorld();
171+
172+
/**
173+
* @param clanHomeWorld The new clan home world string name.
174+
*/
175+
void setClanHomeWorld(String clanHomeWorld);
176+
177+
/**
178+
* @return Returns the clan home X coordinate.
179+
*/
180+
double getClanHomeX();
181+
182+
/**
183+
* @param clanHomeX The new clan home X coordinate.
184+
*/
185+
void setClanHomeX(double clanHomeX);
186+
187+
/**
188+
* @return Returns the clan home Y coordinate.
189+
*/
190+
double getClanHomeY();
191+
192+
/**
193+
* @param clanHomeY The new clan home Y coordinate.
194+
*/
195+
void setClanHomeY(double clanHomeY);
196+
197+
/**
198+
* @return Returns the clan home Z coordinate.
199+
*/
200+
double getClanHomeZ();
201+
202+
/**
203+
* @param clanHomeZ The new clan home Z coordinate.
204+
*/
205+
void setClanHomeZ(double clanHomeZ);
206+
207+
/**
208+
* @return Returns the clan home Yaw.
209+
*/
210+
float getClanHomeYaw();
211+
212+
/**
213+
* @param clanHomeYaw The new clan home Yaw.
214+
*/
215+
void setClanHomeYaw(float clanHomeYaw);
216+
217+
/**
218+
* @return Returns the clan home Pitch.
219+
*/
220+
float getClanHomePitch();
221+
222+
/**
223+
* @param clanHomePitch The new clan home Pitch.
224+
*/
225+
void setClanHomePitch(float clanHomePitch);
226+
227+
/**
228+
* @return Returns the max allowed amount of ClanChests this clan can have.
229+
*/
230+
int getMaxAllowedProtectedChests();
231+
232+
/**
233+
* @param maxAllowedProtectedChests The new max allowed amount of ClanChests this clan can have.
234+
*/
235+
void setMaxAllowedProtectedChests(int maxAllowedProtectedChests);
236+
237+
/**
238+
* This HashMap can be empty if the clan has no protected chests.
239+
* <p>
240+
* Direct modification of this HashMap is not currently recommended.
241+
* <p>
242+
* Dedicated methods will be added in the future to add, remove, and modify ClanChests.
243+
* <p>
244+
* @return Returns a HashMap of all the ClanChests this clan has protected.
245+
*/
246+
HashMap<String, ClanChest> getProtectedChests();
247+
248+
/**
249+
* THIS SHOULD ONLY BE USED FOR INTERNAL USE WHEN LOADING CLANS FROM STORAGE!
250+
* <p>
251+
* DO NOT USE THIS METHOD!
252+
* <p>
253+
* @param protectedChests The new HashMap of all the ClanChests this clan has protected.
254+
*/
255+
void setProtectedChests(HashMap<String, ClanChest> protectedChests);
85256

86257
}

0 commit comments

Comments
 (0)