More work on javadoc...disable the lint for now

Will be enabled again when I have more time
This commit is contained in:
graywolf336 2015-08-18 09:19:37 -05:00
parent 63b43d1191
commit f9035baa35
21 changed files with 268 additions and 74 deletions

19
pom.xml
View File

@ -133,6 +133,25 @@
<project.build.number>${env.BUILD_NUMBER}</project.build.number>
</properties>
</profile>
<profile>
<id>doclint-java8-disable</id>
<activation>
<jdk>[1.8,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>

View File

@ -447,7 +447,11 @@ public class JailMain extends JavaPlugin {
return this.debug;
}
/** Logs a debugging message to the console if debugging is enabled. */
/**
* Logs a debugging message to the console if debugging is enabled.
*
* @param message the item to log as debugging
*/
public void debug(String message) {
if(inDebug()) getLogger().info("[Debug]: " + message);
}

View File

@ -27,7 +27,7 @@ import com.graywolf336.jail.steps.JailCreationSteps;
/**
* Handles all things related to jails.
*
* <p>&nbsp;</p>
* <p>
*
* Stores the following:
* <ul>
@ -100,7 +100,7 @@ public class JailManager {
/**
* Gets a list of Jail names that start with the provided prefix.
*
* <br /><br />
* <p>
*
* If the provided prefix is empty, then we add all of the jails.
*
@ -293,7 +293,7 @@ public class JailManager {
/**
* Gets the {@link Jail jail} the given player is in.
*
* <p />
* <p>
*
* Checks the cache first.
*
@ -422,7 +422,7 @@ public class JailManager {
/**
* Forcefully clears all the jails if name provided is null.
*
* <br /><br />
* <p>
*
* This method just clears them from the storage, doesn't release them.
*
@ -645,7 +645,11 @@ public class JailManager {
return this.jailCreators.get(name.toLowerCase());
}
/** Removes a CreationPlayer with the given name from the jail creators. */
/**
* Removes a CreationPlayer with the given name from the jail creators.
*
* @param name player's name to remove
*/
public void removeJailCreationPlayer(String name) {
this.jailCreators.remove(name.toLowerCase());
}
@ -687,7 +691,11 @@ public class JailManager {
return this.cellCreators.get(name.toLowerCase());
}
/** Removes a CreationPlayer with the given name from the cell creators. */
/**
* Removes a CreationPlayer with the given name from the cell creators.
*
* @param name player's name to remove
*/
public void removeCellCreationPlayer(String name) {
this.cellCreators.remove(name.toLowerCase());
}
@ -710,13 +718,22 @@ public class JailManager {
return this.ccs;
}
/** Adds something to the confirming list. */
/**
* Adds something to the confirming list.
*
* @param name who to add
* @param confirmer {@link ConfirmPlayer} of what they're confirming
*/
public void addConfirming(String name, ConfirmPlayer confirmer) {
getPlugin().debug("Adding a confirming for " + name + " to confirm " + confirmer.getConfirming().toString().toLowerCase());
this.confirms.put(name, confirmer);
}
/** Removes a name from the confirming list. */
/**
* Removes a name from the confirming list.
*
* @param name who to remove
*/
public void removeConfirming(String name) {
this.confirms.remove(name);
}

View File

@ -5,7 +5,7 @@ import com.graywolf336.jail.interfaces.IJailStickManager;
/**
* The static api interface for Jail plugin.
*
* <br /><br />
* <p>
*
* If you're looking for non-static methods, please see the
* {@link JailMain} interface.

View File

@ -32,7 +32,7 @@ import com.graywolf336.jail.interfaces.ICell;
/**
* Provides methods, non-statically, that do the preparing of jails, jailing, etc.
*
* <br /><br />
* <p>
*
* <ul>
* <li>{@link #prepareJail(Jail, ICell, Player, Prisoner) preparejail}</li>
@ -66,7 +66,7 @@ public class PrisonerManager {
/**
* Does everything preparing for the jailing of the provided prisoner, if they are online it forwards it to {@link #jailPrisoner(Jail, ICell, Player, Prisoner)}.
*
* <br /><br />
* <p>
*
* In this we do the following:
* <ol>
@ -373,7 +373,7 @@ public class PrisonerManager {
/**
* Schedules a prisoner to be released, this method is to be used <strong>async</strong>.
*
* <br /><br />
* <p>
*
* If you're wanting to unjail a prisoner, see the {@link #unJail(Jail, ICell, Player, Prisoner, CommandSender)} method.
*
@ -420,7 +420,7 @@ public class PrisonerManager {
/**
* Unjails a prisoner, <strong>sync</strong>, from jail, removing all their data.
*
* <br /><br />
* <p>
*
* Throws an exception if either the jail is null or the prisoner is null.
*
@ -565,7 +565,7 @@ public class PrisonerManager {
/**
* Forcefully unjails a {@link Prisoner prisoner} from {@link Jail}.
*
* <br /><br />
* <p>
*
* This method forcefully removes all the references to this prisoner,
* meaning if they're offline the following won't happened:
@ -577,7 +577,7 @@ public class PrisonerManager {
*
* But if they're online, it goes through the regular unjailing methods.
*
* <br /><br />
* <p>
*
* @param prisoner to release
* @param sender who is releasing the prisoner, <em>can be null</em>
@ -593,7 +593,7 @@ public class PrisonerManager {
* Forcefully unjails a {@link Prisoner prisoner} from {@link Jail}.
*
*
* <br /><br />
* <p>
*
* This method forcefully removes all the references to this prisoner,
* meaning if they're offline the following won't happened:
@ -605,7 +605,7 @@ public class PrisonerManager {
*
* But if they're online, it goes through the regular unjailing methods.
*
* <br /><br />
* <p>
*
* @param jail the prisoner is in
* @param cell the prisoner is in, <em>can be null</em>

View File

@ -164,7 +164,11 @@ public class Update {
return this.needed;
}
/** Returns the new version. */
/**
* Returns the new version.
*
* @return The string name of the new version
*/
public String getNewVersion() {
return this.version;
}

View File

@ -57,7 +57,7 @@ public class Util {
/**
* Checks if two numbers are inside a point, or something.
*
* <br /><br />
* <p>
*
* @param loc The location.
* @param first The first point
@ -363,7 +363,7 @@ public class Util {
*
* A method to serialize an {@link ItemStack} array to Base64 String.
*
* <br /><br />
* <p>
*
* Based off of {@link #toBase64(Inventory)}.
*
@ -395,7 +395,7 @@ public class Util {
/**
* A method to serialize an inventory to Base64 string.
*
* <br /><br />
* <p>
*
* Special thanks to Comphenix in the Bukkit forums or also known
* as aadnk on GitHub. <a href="https://gist.github.com/aadnk/8138186">Original Source</a>
@ -429,7 +429,7 @@ public class Util {
*
* A method to get an {@link Inventory} from an encoded, Base64, string.
*
* <br /><br />
* <p>
*
* Special thanks to Comphenix in the Bukkit forums or also known
* as aadnk on GitHub.
@ -463,7 +463,7 @@ public class Util {
/**
* Gets an array of ItemStacks from Base64 string.
*
* <br /><br />
* <p>
*
* Base off of {@link #fromBase64(String)}.
*

View File

@ -46,12 +46,20 @@ public class CreationPlayer {
this.step = 1;
}
/** Gets the name of the jail. */
/**
* Gets the name of the jail.
*
* @return the name of the jail the player is creating
*/
public String getJailName() {
return this.jailName;
}
/** Gets the name of the cell. */
/**
* Gets the name of the cell.
*
* @return the name of the cell the player is creating
*/
public String getCellName() {
return this.cellName;
}
@ -105,47 +113,75 @@ public class CreationPlayer {
this.step++;
}
/** Sets the first corner with the given location. */
/**
* Sets the first corner with the given location.
*
* @param loc the location of the first corner
*/
public void setCornerOne(Location loc) {
this.x1 = loc.getBlockX();
this.y1 = loc.getBlockY();
this.z1 = loc.getBlockZ();
}
/** Sets the first corner with the given x, y, and z. */
/**
* Sets the first corner with the given x, y, and z.
*
* @param x coordinate of the first corner's x
* @param y coordinate of the first corner's x
* @param z coordinate of the first corner's x
*/
public void setCornerOne(int x, int y, int z) {
this.x1 = x;
this.y1 = y;
this.z1 = z;
}
/** Returns the <strong>first corner</strong> coords an array of int. <strong>0 = x</strong>, <strong>1 = y</strong>, <strong>2 = z</strong> */
/**
* Returns the <strong>first corner</strong> coords an array of int. <strong>0 = x</strong>, <strong>1 = y</strong>, <strong>2 = z</strong>
*
* @return the first corner coords
*/
public int[] getCornerOne() {
int[] t = {x1, y1, z1};
return t;
return new int[] {x1, y1, z1};
}
/** Sets the second corner with the given location. */
/**
* Sets the second corner with the given location.
*
* @param loc The second corner's location
*/
public void setCornerTwo(Location loc) {
this.x2 = loc.getBlockX();
this.y2 = loc.getBlockY();
this.z2 = loc.getBlockZ();
}
/** Sets the second corner with the given x, y, and z. */
/** Sets the second corner with the given x, y, and z.
*
* @param x coordinate of the second corner's x
* @param y coordinate of the second corner's x
* @param z coordinate of the second corner's x
*/
public void setCornerTwo(int x, int y, int z) {
this.x2 = x;
this.y2 = y;
this.z2 = z;
}
/** Returns the <strong>second corner</strong> coords an array of int. <strong>0 = x</strong>, <strong>1 = y</strong>, <strong>2 = z</strong> */
/** Returns the <strong>second corner</strong> coords an array of int. <strong>0 = x</strong>, <strong>1 = y</strong>, <strong>2 = z</strong>
*
* @return the first corner coords
*/
public int[] getCornerTwo() {
int[] t = {x2, y2, z2};
return t;
return new int[] {x2, y2, z2};
}
/** Sets the teleport in coords from the given location. */
/**
* Sets the teleport in coords from the given location.
*
* @param location the in location
*/
public void setTeleportIn(Location location) {
this.inWorld = location.getWorld().getName();
this.inX = location.getX();
@ -155,7 +191,16 @@ public class CreationPlayer {
this.inPitch = location.getPitch();
}
/** Sets the teleport in coords from the given params. */
/**
* Sets the teleport in coords from the given params.
*
* @param world the name of the world
* @param x the coordinate for x
* @param y the coordinate for y
* @param z the coordinate for z
* @param yaw the yaw of the teleport in
* @param pitch the pitch of the teleport in
*/
public void setTeleportIn(String world, double x, double y, double z, float yaw, float pitch) {
this.inWorld = world;
this.inX = x;
@ -165,17 +210,29 @@ public class CreationPlayer {
this.inPitch = pitch;
}
/** Gets the teleport in location in a {@link Location}. */
/**
* Gets the teleport in location in a {@link Location}.
*
* @return the teleport in {@link Location}
*/
public Location getTeleportIn() {
return new Location(Bukkit.getWorld(inWorld), inX, inY, inZ, inYaw, inPitch);
}
/** Gets the teleport in location in a {@link SimpleLocation}. */
/**
* Gets the teleport in location in a {@link SimpleLocation}.
*
* @return the {@link SimpleLocation} for the teleportin
*/
public SimpleLocation getTeleportInSL() {
return new SimpleLocation(inWorld, inX, inY, inZ, inYaw, inPitch);
}
/** Sets the teleport free coords from the given location. */
/**
* Sets the teleport free coords from the given location.
*
* @param location Sets the teleport free {@link Location}
*/
public void setTeleportFree(Location location) {
this.freeWorld = location.getWorld().getName();
this.freeX = location.getX();
@ -185,7 +242,16 @@ public class CreationPlayer {
this.freePitch = location.getPitch();
}
/** Sets the teleport in coords from the given params. */
/**
* Sets the teleport free coords from the given params.
*
* @param world the name of the world
* @param x the coordinate for x
* @param y the coordinate for y
* @param z the coordinate for z
* @param yaw the yaw of the teleport free
* @param pitch the pitch of the teleport free
*/
public void setTeleportFree(String world, double x, double y, double z, float yaw, float pitch) {
this.freeWorld = world;
this.freeX = x;
@ -195,32 +261,56 @@ public class CreationPlayer {
this.freePitch = pitch;
}
/** Gets the teleport free location in a {@link Location}. */
/**
* Gets the teleport free location in a {@link Location}.
*
* @return the teleport free {@link Location}
*/
public Location getTeleportFree() {
return new Location(Bukkit.getWorld(freeWorld), freeX, freeY, freeZ, freeYaw, freePitch);
}
/** Gets the teleport free location in a {@link SimpleLocation}. */
/**
* Gets the teleport free location in a {@link SimpleLocation}.
*
* @return the teleport free {@link SimpleLocation}
*/
public SimpleLocation getTeleportFreeSL() {
return new SimpleLocation(freeWorld, freeX, freeY, freeZ, freeYaw, freePitch);
}
/** Adds a sign to this cell. */
/**
* Adds a sign to this cell.
*
* @param sign the {@link SimpleLocation} of the sign to add
*/
public void addSign(SimpleLocation sign) {
this.signs.add(sign);
}
/** Returns all the signs, null if none (usually null when a jail is being created). */
/**
* Returns all the signs, null if none (usually null when a jail is being created).
*
* @return all of the signs, null if none.
*/
public HashSet<SimpleLocation> getSigns() {
return this.signs == null ? null : new HashSet<SimpleLocation>(this.signs);
}
/** Sets the chest's location, used mainly for cells. */
/**
* Sets the chest's location, used mainly for cells.
*
* @param loc the {@link SimpleLocation} of the cheset
*/
public void setChestLocation(SimpleLocation loc) {
this.chest = loc;
}
/** Gets the chest's location. */
/**
* Gets the chest's location.
*
* @return the {@link SimpleLocation} of the cheset
*/
public SimpleLocation getChestLocation() {
return this.chest;
}

View File

@ -36,32 +36,56 @@ public class Jail {
nocellPrisoners = new HashMap<UUID, Prisoner>();
}
/** Gets the instance of the plugin's main class. */
/**
* Gets the instance of the plugin's main class.
*
* @return the {@link JailMain} instance
*/
public JailMain getPlugin() {
return this.plugin;
}
/** Sets whether this jail can be used or not. */
/**
* Sets whether this jail can be used or not.
*
* @param enabled Whether to set if this Jail is enabled or not
*/
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
/** Gets whether this jail is enabled or not. */
/**
* Gets whether this jail is enabled or not.
*
* @return Whether the Jail is enabled or not
*/
public boolean isEnabled() {
return this.enabled;
}
/** Sets the name of the jail. */
/**
* Sets the name of the jail.
*
* @param name the name of the jail to set
*/
public void setName(String name) {
this.name = name;
}
/** Gets the name of the jail. */
/**
* Gets the name of the jail.
*
* @return the name of the jail
*/
public String getName() {
return this.name;
}
/** Sets the location of the <b>minimum</b> point to the given location's coordinates. */
/**
* Sets the location of the <b>minimum</b> point to the given location's coordinates.
*
* @param location the {@link Location} of the lowest point
*/
public void setMinPoint(Location location) {
if(this.world.isEmpty()) this.world = location.getWorld().getName();
@ -70,7 +94,11 @@ public class Jail {
this.minZ = location.getBlockZ();
}
/** Accepts an array of ints as the coord, where <strong>0 = x</strong>, <strong>1 = y</strong>, <strong>2 = z</strong>. */
/**
* Accepts an array of ints as the coord, where <strong>0 = x</strong>, <strong>1 = y</strong>, <strong>2 = z</strong>.
*
* @param coords the coordinates of the minimum point
*/
public void setMinPoint(int[] coords) {
if(coords.length != 3) return;
@ -79,12 +107,20 @@ public class Jail {
this.minZ = coords[2];
}
/** Gets the minimum point as a Bukkit Location class. */
/**
* Gets the minimum point as a Bukkit Location class.
*
* @return the {@link Location} of the minimum point.
*/
public Location getMinPoint() {
return new Location(plugin.getServer().getWorld(world), minX, minY, minZ);
}
/** Sets the location of the <b>maximum</b> point to the given location's coordinates. */
/**
* Sets the location of the <b>maximum</b> point to the given location's coordinates.
*
* @param location the {@link Location} of the maximum point
*/
public void setMaxPoint(Location location) {
if(this.world.isEmpty()) this.world = location.getWorld().getName();
@ -93,7 +129,11 @@ public class Jail {
this.maxZ = location.getBlockZ();
}
/** Gets the minimum point as a Bukkit Location class. */
/**
* Gets the minimum point as a Bukkit Location class.
*
* @return the {@link Location} of the maximum point
*/
public Location getMaxPoint() {
return new Location(plugin.getServer().getWorld(world), maxX, maxY, maxZ);
}

View File

@ -56,7 +56,7 @@ public class Stick {
/** Gets the amount of health a player has to have before getting jailed via this stick.
*
* <br /><br />
* <p>
*
* See here for reference: http://dev.bukkit.org/bukkit-plugins/jail/tickets/415/
*/

View File

@ -8,7 +8,7 @@ import com.graywolf336.jail.JailMain;
/**
* Event thrown after the plugin is reloaded, internal usage only.
*
* <br /><br />
* <p>
*
* This event is called right after the plugin and mostly everything has reloaded.
* We listen to this event for updating various items in classes which are only

View File

@ -10,7 +10,7 @@ import com.graywolf336.jail.interfaces.ICell;
/**
* Event thrown when a prisoner is offline put will be put into jail next time they come online.
*
* <br /><br />
* <p>
*
* This event is called before everything for the jailing takes place, as the player is offline.
* This event is called for informative purposes, see {@link PrePrisonerJailedEvent}

View File

@ -14,7 +14,7 @@ import com.graywolf336.jail.interfaces.ICell;
/**
* Event thrown before we a player is jailed by someone hitting them with a {@link Stick jail stick}.
*
* <br /><br />
* <p>
*
* This event is called right before we actually jail a player, and is cancellable.
*

View File

@ -13,7 +13,7 @@ import com.graywolf336.jail.interfaces.ICell;
/**
* Event thrown before we are jailing a player, both offline and online players.
*
* <br /><br />
* <p>
*
* This event is called right before we actually jail a player, and is cancellable, whether the player is offline or online, getPlayer() will always return null if isOnline() return false.
*

View File

@ -11,7 +11,7 @@ import com.graywolf336.jail.interfaces.ICell;
/**
* Event thrown after a prisoner is released.
*
* <br /><br />
* <p>
*
* This event is called before everything for the releasing takes place.
* This event is called for informative purposes, see {@link PrisonerReleasedEvent}

View File

@ -12,7 +12,7 @@ import com.graywolf336.jail.beans.Prisoner;
/**
* Event thrown before we transfer a prisoner, both offline and online prisoner.
*
* <br /><br />
* <p>
*
* This event is called right before we actually transfer a prisoner, and is cancellable, whether the prisoner is offline or online, getPlayer() will always return null if isOnline() return false.
*

View File

@ -11,7 +11,7 @@ import com.graywolf336.jail.beans.Prisoner;
/**
* Event thrown after a prisoner is put into jail.
*
* <br /><br />
* <p>
*
* This event is called after everything for the jailing takes place.
* This event is called for informative purposes, see {@link PrePrisonerJailedEvent}

View File

@ -11,7 +11,7 @@ import com.graywolf336.jail.beans.Prisoner;
/**
* Event thrown after a prisoner is released.
*
* <br /><br />
* <p>
*
* This event is called after everything for the releasing takes place.
* This event is called for informative purposes, see {@link PrePrisonerReleasedEvent}

View File

@ -11,7 +11,7 @@ import com.graywolf336.jail.beans.Prisoner;
/**
* Event thrown after we transfer a prisoner, both an offline and an online prisoner.
*
* <br /><br />
* <p>
*
* This event is called after we transfer the prisoner whether the prisoner is offline or online, getPlayer() will always return null if isOnline() return false.
*

View File

@ -25,7 +25,11 @@ public interface ICell {
*/
public String getName();
/** Sets the prisoner in this cell. */
/**
* Sets the prisoner in this cell.
*
* @param prisoner the {@link Prisoner} to set
*/
public void setPrisoner(Prisoner prisoner);
/**
@ -45,10 +49,18 @@ public interface ICell {
*/
public boolean hasPrisoner();
/** Adds all the given signs to the cell. */
/**
* Adds all the given signs to the cell.
*
* @param signs all of the signs to add
*/
public void addAllSigns(HashSet<SimpleLocation> signs);
/** Adds a sign to the cell. */
/**
* Adds a sign to the cell.
*
* @param sign the {@link SimpleLocation} of the sign to add
*/
public void addSign(SimpleLocation sign);
/**
@ -93,7 +105,11 @@ public interface ICell {
*/
public HashMap<String, List<String>> updateSigns();
/** Sets the location of where the prisoner will be teleported at when jailed here. */
/**
* Sets the location of where the prisoner will be teleported at when jailed here.
*
* @param location the {@link SimpleLocation} of the teleport
*/
public void setTeleport(SimpleLocation location);
/**
@ -103,7 +119,11 @@ public interface ICell {
*/
public Location getTeleport();
/** Sets the location of the chest. */
/**
* Sets the location of the chest.
*
* @param simpleLocation the {@link SimpleLocation} of the chest
*/
public void setChestLocation(SimpleLocation simpleLocation);
/**

View File

@ -19,7 +19,7 @@ import com.graywolf336.jail.events.PrisonerTransferredEvent;
/**
* The listen for all events which need to add/remove to the prisoner cache.
*
* <br /><br />
* <p>
*
* These listeners add and remove prisoner cache objects to the cache,
* this way we gain performance for servers which have a high amount