JavaDoc fixes and fix for Particle enums

This commit is contained in:
tastybento 2024-05-05 21:28:04 -07:00
parent 61e7c22bbc
commit d8891796cd
6 changed files with 12 additions and 15 deletions

View File

@ -520,11 +520,11 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
/**
* Convenience method to check if a user has a team.
* Consider checking the island itself {@link Island#inTeam(UUID)}
*
* @param world - the world to check
* @param user - the User
* @return true if player is in a team
* @see Consider checking the island itself {@link Island#inTeam(UUID)}
*/
protected boolean inTeam(World world, User user) {
return plugin.getIslands().inTeam(world, user.getUniqueId());

View File

@ -528,7 +528,6 @@ public class IslandTeamGUI {
/**
* Creates text to describe the status of the player
* @param user2 user asking to see the status
* @param offlineMember member of the team
* @return string
*/

View File

@ -65,7 +65,8 @@ public class User implements MetaDataAble {
private static final Map<Particle, Class<?>> VALIDATION_CHECK;
static {
Map<Particle, Class<?>> v = new EnumMap<>(Particle.class);
v.put(Particle.DUST, Particle.DustOptions.class);
v.put(Enums.getIfPresent(Particle.class, "DUST")
.or(Enums.getIfPresent(Particle.class, "REDSTONE").or(Particle.FLAME)), Particle.DustOptions.class);
v.put(Particle.ITEM, ItemStack.class);
v.put(Particle.ITEM_COBWEB, ItemStack.class);
v.put(Particle.FALLING_DUST, BlockData.class);
@ -713,8 +714,7 @@ public class User implements MetaDataAble {
* server's view distance.
*
* @param particle Particle to display.
* @param dustOptions Particle.DustOptions for the particle to display. Cannot
* be null when particle is {@link Particle#REDSTONE}.
* @param dustOptions Particle.DustOptions for the particle to display.
* @param x X coordinate of the particle to display.
* @param y Y coordinate of the particle to display.
* @param z Z coordinate of the particle to display.
@ -749,8 +749,7 @@ public class User implements MetaDataAble {
* server's view distance. Compatibility method for older usages.
*
* @param particle Particle to display.
* @param dustOptions Particle.DustOptions for the particle to display. Cannot
* be null when particle is {@link Particle#REDSTONE}.
* @param dustOptions Particle.DustOptions for the particle to display.
* @param x X coordinate of the particle to display.
* @param y Y coordinate of the particle to display.
* @param z Z coordinate of the particle to display.
@ -764,8 +763,7 @@ public class User implements MetaDataAble {
* server's view distance.
*
* @param particle Particle to display.
* @param dustOptions Particle.DustOptions for the particle to display. Cannot
* be null when particle is {@link Particle#REDSTONE}.
* @param dustOptions Particle.DustOptions for the particle to display.
* @param x X coordinate of the particle to display.
* @param y Y coordinate of the particle to display.
* @param z Z coordinate of the particle to display.

View File

@ -1055,7 +1055,6 @@ public class Island implements DataObject, MetaDataAble {
* @param flag - flag
* @param value - Use RanksManager settings, e.g. RanksManager.MEMBER
* @param doSubflags - whether to set subflags
* @return true if this causes a flag change
*/
public void setFlag(Flag flag, int value, boolean doSubflags) {
if (flags.containsKey(flag.getID()) && flags.get(flag.getID()) != value) {
@ -1219,7 +1218,7 @@ public class Island implements DataObject, MetaDataAble {
* the {@link world.bentobox.bentobox.api.events.island.IslandRankChangeEvent}.
*
* @param uuid UUID of the player
* @param rank rank value
* @param newRank rank value
* @since 1.1
*/
public void setRank(@Nullable UUID uuid, int newRank) {
@ -2019,7 +2018,8 @@ public class Island implements DataObject, MetaDataAble {
}
/**
* @param primary the primary to set
* Set this island to be the primary for this user
* @param userID user UUID
*/
public void setPrimary(UUID userID) {
if (getPrimaries().add(userID)) {

View File

@ -35,7 +35,7 @@ public class TeamInvite implements DataObject {
* @param type - invitation type, e.g., coop, team, trust
* @param inviter - UUID of inviter
* @param invitee - UUID of invitee
* @param island - the unique ID of the island this invite is for
* @param islandID - the unique ID of the island this invite is for
*/
public TeamInvite(Type type, UUID inviter, UUID invitee, String islandID) {
this.type = type;

View File

@ -145,7 +145,7 @@ public class IslandsManager {
/**
* Used only for testing. Sets the database to a mock database.
*
* @param handler - handler
* @param h - handler
*/
public void setHandler(@NonNull Database<Island> h) {
handler = h;
@ -1518,11 +1518,11 @@ public class IslandsManager {
/**
* Checks if a player is in any team in this world. Note that the player may have
* multiple islands in the world, any one of which may have a team.
* Consider checking the island itself {@link Island#inTeam(UUID)}
*
* @param world - world
* @param playerUUID - player's UUID
* @return true if in team, false if not
* @see Consider checking the island itself {@link Island#inTeam(UUID)}
*/
public boolean inTeam(World world, @NonNull UUID playerUUID) {
return this.islandCache.getIslands(world, playerUUID).stream()