diff --git a/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/GroupManager.java b/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/GroupManager.java index 22b02280..a13bba9a 100644 --- a/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/GroupManager.java +++ b/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/GroupManager.java @@ -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); @@ -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) { @@ -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) { @@ -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) { diff --git a/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/database/AssociationList.java b/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/database/AssociationList.java index 65589e59..002b40e5 100644 --- a/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/database/AssociationList.java +++ b/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/database/AssociationList.java @@ -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(); @@ -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(); @@ -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 - * while PlayerMappingInfo.uuidMapping will return Map + * As such PlayerMappingInfo.nameMapping will return Map<String, UUID> + * while PlayerMappingInfo.uuidMapping will return Map<UUID, String> + * + * @return the player mapping info is possible */ public PlayerMappingInfo getAllPlayerInfo(){ Map nameMapping = new HashMap(); diff --git a/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/database/GroupManagerDao.java b/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/database/GroupManagerDao.java index da41b985..95df7d86 100644 --- a/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/database/GroupManagerDao.java +++ b/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/database/GroupManagerDao.java @@ -1223,7 +1223,7 @@ public Set 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(){ @@ -1679,8 +1679,8 @@ public Set 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 getAllIDs(String groupName) { if (groupName == null) { diff --git a/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/group/Group.java b/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/group/Group.java index 4d9f7f42..4f2230f7 100644 --- a/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/group/Group.java +++ b/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/group/Group.java @@ -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); @@ -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) { @@ -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); @@ -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); } @@ -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 ids) { this.ids.clear(); diff --git a/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/gui/MainGroupGUI.java b/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/gui/MainGroupGUI.java index f373cf67..db7d4cdf 100644 --- a/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/gui/MainGroupGUI.java +++ b/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/gui/MainGroupGUI.java @@ -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()) { diff --git a/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/gui/MenuUtils.java b/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/gui/MenuUtils.java index 124cd9be..df429182 100644 --- a/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/gui/MenuUtils.java +++ b/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/gui/MenuUtils.java @@ -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 splitLore(String lore) { System.out.println("Splitting " + lore); diff --git a/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/permission/GroupPermission.java b/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/permission/GroupPermission.java index acedd8bd..823d5456 100644 --- a/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/permission/GroupPermission.java +++ b/namelayer-spigot/src/main/java/vg/civcraft/mc/namelayer/permission/GroupPermission.java @@ -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) {