JavaDoc fixes and fix for Particle enums
This commit is contained in:
parent
61e7c22bbc
commit
d8891796cd
|
@ -520,11 +520,11 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience method to check if a user has a team.
|
* 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 world - the world to check
|
||||||
* @param user - the User
|
* @param user - the User
|
||||||
* @return true if player is in a team
|
* @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) {
|
protected boolean inTeam(World world, User user) {
|
||||||
return plugin.getIslands().inTeam(world, user.getUniqueId());
|
return plugin.getIslands().inTeam(world, user.getUniqueId());
|
||||||
|
|
|
@ -528,7 +528,6 @@ public class IslandTeamGUI {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates text to describe the status of the player
|
* Creates text to describe the status of the player
|
||||||
* @param user2 user asking to see the status
|
|
||||||
* @param offlineMember member of the team
|
* @param offlineMember member of the team
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -65,7 +65,8 @@ public class User implements MetaDataAble {
|
||||||
private static final Map<Particle, Class<?>> VALIDATION_CHECK;
|
private static final Map<Particle, Class<?>> VALIDATION_CHECK;
|
||||||
static {
|
static {
|
||||||
Map<Particle, Class<?>> v = new EnumMap<>(Particle.class);
|
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, ItemStack.class);
|
||||||
v.put(Particle.ITEM_COBWEB, ItemStack.class);
|
v.put(Particle.ITEM_COBWEB, ItemStack.class);
|
||||||
v.put(Particle.FALLING_DUST, BlockData.class);
|
v.put(Particle.FALLING_DUST, BlockData.class);
|
||||||
|
@ -713,8 +714,7 @@ public class User implements MetaDataAble {
|
||||||
* server's view distance.
|
* server's view distance.
|
||||||
*
|
*
|
||||||
* @param particle Particle to display.
|
* @param particle Particle to display.
|
||||||
* @param dustOptions Particle.DustOptions for the particle to display. Cannot
|
* @param dustOptions Particle.DustOptions for the particle to display.
|
||||||
* be null when particle is {@link Particle#REDSTONE}.
|
|
||||||
* @param x X coordinate of the particle to display.
|
* @param x X coordinate of the particle to display.
|
||||||
* @param y Y coordinate of the particle to display.
|
* @param y Y coordinate of the particle to display.
|
||||||
* @param z Z 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.
|
* server's view distance. Compatibility method for older usages.
|
||||||
*
|
*
|
||||||
* @param particle Particle to display.
|
* @param particle Particle to display.
|
||||||
* @param dustOptions Particle.DustOptions for the particle to display. Cannot
|
* @param dustOptions Particle.DustOptions for the particle to display.
|
||||||
* be null when particle is {@link Particle#REDSTONE}.
|
|
||||||
* @param x X coordinate of the particle to display.
|
* @param x X coordinate of the particle to display.
|
||||||
* @param y Y coordinate of the particle to display.
|
* @param y Y coordinate of the particle to display.
|
||||||
* @param z Z 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.
|
* server's view distance.
|
||||||
*
|
*
|
||||||
* @param particle Particle to display.
|
* @param particle Particle to display.
|
||||||
* @param dustOptions Particle.DustOptions for the particle to display. Cannot
|
* @param dustOptions Particle.DustOptions for the particle to display.
|
||||||
* be null when particle is {@link Particle#REDSTONE}.
|
|
||||||
* @param x X coordinate of the particle to display.
|
* @param x X coordinate of the particle to display.
|
||||||
* @param y Y coordinate of the particle to display.
|
* @param y Y coordinate of the particle to display.
|
||||||
* @param z Z coordinate of the particle to display.
|
* @param z Z coordinate of the particle to display.
|
||||||
|
|
|
@ -1055,7 +1055,6 @@ public class Island implements DataObject, MetaDataAble {
|
||||||
* @param flag - flag
|
* @param flag - flag
|
||||||
* @param value - Use RanksManager settings, e.g. RanksManager.MEMBER
|
* @param value - Use RanksManager settings, e.g. RanksManager.MEMBER
|
||||||
* @param doSubflags - whether to set subflags
|
* @param doSubflags - whether to set subflags
|
||||||
* @return true if this causes a flag change
|
|
||||||
*/
|
*/
|
||||||
public void setFlag(Flag flag, int value, boolean doSubflags) {
|
public void setFlag(Flag flag, int value, boolean doSubflags) {
|
||||||
if (flags.containsKey(flag.getID()) && flags.get(flag.getID()) != value) {
|
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}.
|
* the {@link world.bentobox.bentobox.api.events.island.IslandRankChangeEvent}.
|
||||||
*
|
*
|
||||||
* @param uuid UUID of the player
|
* @param uuid UUID of the player
|
||||||
* @param rank rank value
|
* @param newRank rank value
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
public void setRank(@Nullable UUID uuid, int newRank) {
|
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) {
|
public void setPrimary(UUID userID) {
|
||||||
if (getPrimaries().add(userID)) {
|
if (getPrimaries().add(userID)) {
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class TeamInvite implements DataObject {
|
||||||
* @param type - invitation type, e.g., coop, team, trust
|
* @param type - invitation type, e.g., coop, team, trust
|
||||||
* @param inviter - UUID of inviter
|
* @param inviter - UUID of inviter
|
||||||
* @param invitee - UUID of invitee
|
* @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) {
|
public TeamInvite(Type type, UUID inviter, UUID invitee, String islandID) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
|
|
@ -145,7 +145,7 @@ public class IslandsManager {
|
||||||
/**
|
/**
|
||||||
* Used only for testing. Sets the database to a mock database.
|
* Used only for testing. Sets the database to a mock database.
|
||||||
*
|
*
|
||||||
* @param handler - handler
|
* @param h - handler
|
||||||
*/
|
*/
|
||||||
public void setHandler(@NonNull Database<Island> h) {
|
public void setHandler(@NonNull Database<Island> h) {
|
||||||
handler = 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
|
* 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.
|
* 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 world - world
|
||||||
* @param playerUUID - player's UUID
|
* @param playerUUID - player's UUID
|
||||||
* @return true if in team, false if not
|
* @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) {
|
public boolean inTeam(World world, @NonNull UUID playerUUID) {
|
||||||
return this.islandCache.getIslands(world, playerUUID).stream()
|
return this.islandCache.getIslands(world, playerUUID).stream()
|
||||||
|
|
Loading…
Reference in New Issue