Skip to content

Commit

Permalink
Merge pull request #9 from DevotedMC/civ14
Browse files Browse the repository at this point in the history
Fixing JavaDoc compilation hatred.
  • Loading branch information
Maxopoly authored Sep 30, 2019
2 parents 95112b3 + 15442a0 commit a6f93ce
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public GroupManager(){
/**
* Saves the group into caching and saves it into the db. Also fires the GroupCreateEvent.
* @param group the group to create to db.
* @return the internal ID of the group created.
*/
public int createGroup(Group group){
return createGroup(group,true);
Expand Down Expand Up @@ -229,6 +230,9 @@ public void transferGroup(Group g, UUID uuid, boolean savetodb){
* _for now_ simply invalidating the cache on servers.
*
* Eventually, we'll need to go line-by-line through the db code and just replicate in cache. That day is not today.
*
* @param group the origin group
* @param toMerge the group to merge in
*/
public void doneMergeGroup(Group group, Group toMerge) {
if (group == null || toMerge == null) {
Expand Down Expand Up @@ -407,6 +411,9 @@ public static Group getSpecialCircumstanceGroup(String name){
/**
* DO NOT WORK WITH THE PERMISSION OBJECT ITSELF TO DETERMINE ACCESS. Use the methods provided in this class instead, as they
* respect all the permission inheritation stuff
*
* @param group the group to retrieve permissions from
* @return the actual permissions for this object or null
*/
public GroupPermission getPermissionforGroup(Group group){
if (group == null) {
Expand Down Expand Up @@ -504,7 +511,7 @@ public String getDefaultGroup(UUID uuid){

/**
* Invalidates a group from cache.
* @param group
* @param group the group to invalidate cache for
*/
public static void invalidateCache(String group){
if (group == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ public void registerMigrations(){

/**
* returns null if no uuid was found
* @param playername
* @return
* @param playername the player's name
* @return the UUID of the player, or null
*/
public UUID getUUID(String playername){
try (Connection connection = db.getConnection();
Expand All @@ -111,8 +111,8 @@ public UUID getUUID(String playername){

/**
* returns null if no playername was found
* @param uuid
* @return
* @param uuid get the current server's name for this UUId
* @return the player's name if found
*/
public String getCurrentName(UUID uuid){
try (Connection connection = db.getConnection();
Expand Down Expand Up @@ -161,8 +161,10 @@ public void changePlayer(String newName, UUID uuid) {
/**
* This method returns all player info in the table. It is used mainly
* by NameAPI class to prepopulate the maps.
* As such PlayerMappingInfo.nameMapping will return Map<String, UUID>
* while PlayerMappingInfo.uuidMapping will return Map<UUID, String>
* As such PlayerMappingInfo.nameMapping will return Map&lt;String, UUID&gt;
* while PlayerMappingInfo.uuidMapping will return Map&lt;UUID, String&gt;
*
* @return the player mapping info is possible
*/
public PlayerMappingInfo getAllPlayerInfo(){
Map<String, UUID> nameMapping = new HashMap<String, UUID>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ public Set <UUID> loadAllAutoAccept() {

/**
* Adds the uuid to the db if they should auto accept groups when invited.
* @param uuid
* @param uuid sets up this player by uuid to accept groups async
*/
public void autoAcceptGroupsAsync(final UUID uuid){
plugin.getServer().getScheduler().runTaskAsynchronously(plugin, new Runnable(){
Expand Down Expand Up @@ -1679,8 +1679,8 @@ public Set<UUID> getBlackListMembers(String groupName) {
* we arbitrarily define primacy as the one with the most members for ease of accounting
* and backwards compatibility.
*
* @param groupName
* @return
* @param groupName the group name to get IDs for
* @return the list of IDs for this group name
*/
public List<Integer> getAllIDs(String groupName) {
if (groupName == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,7 @@ public PlayerType getInvite(UUID uuid) {

/**
* Removes the invite of a Player
* @param uuid- The UUID of the player.
* @param saveToDB - remove the invitation from the DB.
* @param uuid - The UUID of the player.
*/
public void removeInvite(UUID uuid){
removeInvite(uuid, true);
Expand Down Expand Up @@ -380,8 +379,9 @@ public void removeAllMembers(boolean savetodb) {

/**
*
* @param supergroup
* @param subgroup
* @param supergroup the base group
* @param subgroup the group to link under it
* @param saveToDb - add link to the DB.
* @return true if linking succeeded, false otherwise.
*/
public static boolean link(Group supergroup, Group subgroup, boolean saveToDb) {
Expand Down Expand Up @@ -414,8 +414,9 @@ public static boolean link(Group supergroup, Group subgroup, boolean saveToDb) {

/**
*
* @param supergroup
* @param subgroup
* @param supergroup the main group
* @param subgroup the sub group to unlink
* @return true if unlink succeeded, false otherwise
*/
public static boolean unlink(Group supergroup, Group subgroup){
return unlink(supergroup,subgroup, true);
Expand Down Expand Up @@ -497,7 +498,7 @@ public void changeDefaultGroup(UUID uuid) {
public UUID getOwner() { return owner; }

/**
* @param uuid
* @param uuid the uuid of owner
* @return true if the UUID belongs to the owner of the group, false otherwise.
*/
public boolean isOwner(UUID uuid) { return owner.equals(uuid); }
Expand Down Expand Up @@ -586,6 +587,8 @@ public void setGroupId(int id) {
/**
* Updates/replaces the group id list with a new one. Clears the old one, adds these,
* and ensures that the "main" id is added to the list as well.
*
* @param ids the list of IDs to replace
*/
public void setGroupIds(List<Integer> ids) {
this.ids.clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ public void clicked(Player arg0) {
* clicked, this opens up a detailed view where you can select what to do
* (promoting/removing)
*
* @param uuid
* @param uuid the UUID to show the inventory to
*/
public void showDetail(final UUID uuid) {
if (!validGroup()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ public static ItemStack getPlayerSkull(UUID uuid) {

/**
* Doesn't work
*
* @param lore the lore to split
* @return a split list of lores
*/
public static List<String> splitLore(String lore) {
System.out.println("Splitting " + lore);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private void loadPermsforGroup(){
* Checks if a certain PlayerType has the given permission. DONT USE THIS DIRECTLY. Use GroupManager.hasAccess() instead!
* @param playerType The PlayerType in question.
* @param perm The PermissionType to check for.
* @return
* @return return true if this type of player has this type of perm, false otherwise
*/
public boolean hasPermission(PlayerType playerType, PermissionType perm){
if (playerType == null || perm == null) {
Expand Down

0 comments on commit a6f93ce

Please sign in to comment.