Prepare the project for javadocs

This commit is contained in:
Gabriele C
2015-11-21 01:27:06 +01:00
parent adcd70b91d
commit 118c79401a
168 changed files with 4375 additions and 422 deletions
@@ -9,6 +9,7 @@ import org.bukkit.event.HandlerList;
* This event is call when a player try to /login
*
* @author Xephi59
* @version $Revision: 1.0 $
*/
public class AuthMeAsyncPreLoginEvent extends Event {
@@ -16,23 +17,43 @@ public class AuthMeAsyncPreLoginEvent extends Event {
private boolean canLogin = true;
private static final HandlerList handlers = new HandlerList();
/**
* Constructor for AuthMeAsyncPreLoginEvent.
* @param player Player
*/
public AuthMeAsyncPreLoginEvent(Player player) {
super(true);
this.player = player;
}
/**
* Method getPlayer.
* @return Player
*/
public Player getPlayer() {
return player;
}
/**
* Method canLogin.
* @return boolean
*/
public boolean canLogin() {
return canLogin;
}
/**
* Method setCanLogin.
* @param canLogin boolean
*/
public void setCanLogin(boolean canLogin) {
this.canLogin = canLogin;
}
/**
* Method getHandlers.
* @return HandlerList
*/
@Override
public HandlerList getHandlers() {
return handlers;
@@ -8,6 +8,7 @@ import org.bukkit.entity.Player;
* This event is call when AuthMe try to teleport a player
*
* @author Xephi59
* @version $Revision: 1.0 $
*/
public class AuthMeTeleportEvent extends CustomEvent {
@@ -15,24 +16,45 @@ public class AuthMeTeleportEvent extends CustomEvent {
private Location to;
private Location from;
/**
* Constructor for AuthMeTeleportEvent.
* @param player Player
* @param to Location
*/
public AuthMeTeleportEvent(Player player, Location to) {
this.player = player;
this.from = player.getLocation();
this.to = to;
}
/**
* Method getPlayer.
* @return Player
*/
public Player getPlayer() {
return player;
}
/**
* Method setTo.
* @param to Location
*/
public void setTo(Location to) {
this.to = to;
}
/**
* Method getTo.
* @return Location
*/
public Location getTo() {
return to;
}
/**
* Method getFrom.
* @return Location
*/
public Location getFrom() {
return from;
}
@@ -7,6 +7,7 @@ import org.bukkit.event.HandlerList;
/**
*
* @author Xephi59
* @version $Revision: 1.0 $
*/
public class CustomEvent extends Event implements Cancellable {
@@ -17,22 +18,44 @@ public class CustomEvent extends Event implements Cancellable {
super(false);
}
/**
* Constructor for CustomEvent.
* @param b boolean
*/
public CustomEvent(boolean b) {
super(b);
}
/**
* Method getHandlers.
* @return HandlerList
*/
public HandlerList getHandlers() {
return handlers;
}
/**
* Method getHandlerList.
* @return HandlerList
*/
public static HandlerList getHandlerList() {
return handlers;
}
/**
* Method isCancelled.
* @return boolean
* @see org.bukkit.event.Cancellable#isCancelled()
*/
public boolean isCancelled() {
return this.isCancelled;
}
/**
* Method setCancelled.
* @param cancelled boolean
* @see org.bukkit.event.Cancellable#setCancelled(boolean)
*/
public void setCancelled(boolean cancelled) {
this.isCancelled = cancelled;
}
@@ -8,6 +8,7 @@ import org.bukkit.entity.Player;
* Called if a player is teleported to the authme first spawn
*
* @author Xephi59
* @version $Revision: 1.0 $
*/
public class FirstSpawnTeleportEvent extends CustomEvent {
@@ -15,6 +16,12 @@ public class FirstSpawnTeleportEvent extends CustomEvent {
private Location to;
private Location from;
/**
* Constructor for FirstSpawnTeleportEvent.
* @param player Player
* @param from Location
* @param to Location
*/
public FirstSpawnTeleportEvent(Player player, Location from, Location to) {
super(true);
this.player = player;
@@ -22,18 +29,34 @@ public class FirstSpawnTeleportEvent extends CustomEvent {
this.to = to;
}
/**
* Method getPlayer.
* @return Player
*/
public Player getPlayer() {
return player;
}
/**
* Method setTo.
* @param to Location
*/
public void setTo(Location to) {
this.to = to;
}
/**
* Method getTo.
* @return Location
*/
public Location getTo() {
return to;
}
/**
* Method getFrom.
* @return Location
*/
public Location getFrom() {
return from;
}
@@ -10,6 +10,7 @@ import org.bukkit.event.HandlerList;
* boolean 'isLogin' will be false if, and only if, login/register failed.
*
* @author Xephi59
* @version $Revision: 1.0 $
*/
public class LoginEvent extends Event {
@@ -17,33 +18,62 @@ public class LoginEvent extends Event {
private boolean isLogin;
private static final HandlerList handlers = new HandlerList();
/**
* Constructor for LoginEvent.
* @param player Player
* @param isLogin boolean
*/
public LoginEvent(Player player, boolean isLogin) {
this.player = player;
this.isLogin = isLogin;
}
/**
* Method getPlayer.
* @return Player
*/
public Player getPlayer() {
return this.player;
}
/**
* Method setPlayer.
* @param player Player
*/
public void setPlayer(Player player) {
this.player = player;
}
/**
* Method setLogin.
* @param isLogin boolean
*/
@Deprecated
public void setLogin(boolean isLogin) {
this.isLogin = isLogin;
}
/**
* Method isLogin.
* @return boolean
*/
public boolean isLogin() {
return isLogin;
}
/**
* Method getHandlers.
* @return HandlerList
*/
@Override
public HandlerList getHandlers() {
return handlers;
}
/**
* Method getHandlerList.
* @return HandlerList
*/
public static HandlerList getHandlerList() {
return handlers;
}
@@ -9,29 +9,50 @@ import org.bukkit.event.HandlerList;
* This event is called when a player logout through AuthMe.
*
* @author Xephi59
* @version $Revision: 1.0 $
*/
public class LogoutEvent extends Event {
private Player player;
private static final HandlerList handlers = new HandlerList();
/**
* Constructor for LogoutEvent.
* @param player Player
*/
public LogoutEvent(Player player) {
this.player = player;
}
/**
* Method getPlayer.
* @return Player
*/
public Player getPlayer() {
return this.player;
}
/**
* Method setPlayer.
* @param player Player
*/
public void setPlayer(Player player) {
this.player = player;
}
/**
* Method getHandlers.
* @return HandlerList
*/
@Override
public HandlerList getHandlers() {
return handlers;
}
/**
* Method getHandlerList.
* @return HandlerList
*/
public static HandlerList getHandlerList() {
return handlers;
}
@@ -14,6 +14,7 @@ import fr.xephi.authme.security.crypts.EncryptionMethod;
* @see fr.xephi.authme.security.crypts.EncryptionMethod
*
* @author Xephi59
* @version $Revision: 1.0 $
*/
public class PasswordEncryptionEvent extends Event {
@@ -21,29 +22,54 @@ public class PasswordEncryptionEvent extends Event {
private EncryptionMethod method = null;
private String playerName = "";
/**
* Constructor for PasswordEncryptionEvent.
* @param method EncryptionMethod
* @param playerName String
*/
public PasswordEncryptionEvent(EncryptionMethod method, String playerName) {
super(false);
this.method = method;
this.playerName = playerName;
}
/**
* Method getHandlers.
* @return HandlerList
*/
@Override
public HandlerList getHandlers() {
return handlers;
}
/**
* Method setMethod.
* @param method EncryptionMethod
*/
public void setMethod(EncryptionMethod method) {
this.method = method;
}
/**
* Method getMethod.
* @return EncryptionMethod
*/
public EncryptionMethod getMethod() {
return method;
}
/**
* Method getPlayerName.
* @return String
*/
public String getPlayerName() {
return playerName;
}
/**
* Method getHandlerList.
* @return HandlerList
*/
public static HandlerList getHandlerList() {
return handlers;
}
@@ -9,6 +9,7 @@ import org.bukkit.inventory.ItemStack;
* player inventory.
*
* @author Xephi59
* @version $Revision: 1.0 $
*/
public class ProtectInventoryEvent extends CustomEvent {
@@ -18,6 +19,10 @@ public class ProtectInventoryEvent extends CustomEvent {
private ItemStack[] emptyArmor = null;
private Player player;
/**
* Constructor for ProtectInventoryEvent.
* @param player Player
*/
public ProtectInventoryEvent(Player player) {
super(true);
this.player = player;
@@ -27,30 +32,58 @@ public class ProtectInventoryEvent extends CustomEvent {
this.emptyArmor = new ItemStack[4];
}
/**
* Method getStoredInventory.
* @return ItemStack[]
*/
public ItemStack[] getStoredInventory() {
return this.storedinventory;
}
/**
* Method getStoredArmor.
* @return ItemStack[]
*/
public ItemStack[] getStoredArmor() {
return this.storedarmor;
}
/**
* Method getPlayer.
* @return Player
*/
public Player getPlayer() {
return this.player;
}
/**
* Method setNewInventory.
* @param emptyInventory ItemStack[]
*/
public void setNewInventory(ItemStack[] emptyInventory) {
this.emptyInventory = emptyInventory;
}
/**
* Method getEmptyInventory.
* @return ItemStack[]
*/
public ItemStack[] getEmptyInventory() {
return this.emptyInventory;
}
/**
* Method setNewArmor.
* @param emptyArmor ItemStack[]
*/
public void setNewArmor(ItemStack[] emptyArmor) {
this.emptyArmor = emptyArmor;
}
/**
* Method getEmptyArmor.
* @return ItemStack[]
*/
public ItemStack[] getEmptyArmor() {
return this.emptyArmor;
}
@@ -9,6 +9,7 @@ import org.bukkit.entity.Player;
* register.
*
* @author Xephi59
* @version $Revision: 1.0 $
*/
public class RegisterTeleportEvent extends CustomEvent {
@@ -16,24 +17,45 @@ public class RegisterTeleportEvent extends CustomEvent {
private Location to;
private Location from;
/**
* Constructor for RegisterTeleportEvent.
* @param player Player
* @param to Location
*/
public RegisterTeleportEvent(Player player, Location to) {
this.player = player;
this.from = player.getLocation();
this.to = to;
}
/**
* Method getPlayer.
* @return Player
*/
public Player getPlayer() {
return player;
}
/**
* Method setTo.
* @param to Location
*/
public void setTo(Location to) {
this.to = to;
}
/**
* Method getTo.
* @return Location
*/
public Location getTo() {
return to;
}
/**
* Method getFrom.
* @return Location
*/
public Location getFrom() {
return from;
}
@@ -7,20 +7,33 @@ import org.bukkit.entity.Player;
* This event is call when a creative inventory is reseted.
*
* @author Xephi59
* @version $Revision: 1.0 $
*/
public class ResetInventoryEvent extends CustomEvent {
private Player player;
/**
* Constructor for ResetInventoryEvent.
* @param player Player
*/
public ResetInventoryEvent(Player player) {
super(true);
this.player = player;
}
/**
* Method getPlayer.
* @return Player
*/
public Player getPlayer() {
return this.player;
}
/**
* Method setPlayer.
* @param player Player
*/
public void setPlayer(Player player) {
this.player = player;
}
@@ -6,24 +6,42 @@ import org.bukkit.entity.Player;
* This event restore the inventory.
*
* @author Xephi59
* @version $Revision: 1.0 $
*/
public class RestoreInventoryEvent extends CustomEvent {
private Player player;
/**
* Constructor for RestoreInventoryEvent.
* @param player Player
*/
public RestoreInventoryEvent(Player player) {
this.player = player;
}
/**
* Constructor for RestoreInventoryEvent.
* @param player Player
* @param async boolean
*/
public RestoreInventoryEvent(Player player, boolean async) {
super(async);
this.player = player;
}
/**
* Method getPlayer.
* @return Player
*/
public Player getPlayer() {
return this.player;
}
/**
* Method setPlayer.
* @param player Player
*/
public void setPlayer(Player player) {
this.player = player;
}
@@ -8,6 +8,7 @@ import org.bukkit.entity.Player;
* Called if a player is teleported to a specific spawn
*
* @author Xephi59
* @version $Revision: 1.0 $
*/
public class SpawnTeleportEvent extends CustomEvent {
@@ -16,6 +17,13 @@ public class SpawnTeleportEvent extends CustomEvent {
private Location from;
private boolean isAuthenticated;
/**
* Constructor for SpawnTeleportEvent.
* @param player Player
* @param from Location
* @param to Location
* @param isAuthenticated boolean
*/
public SpawnTeleportEvent(Player player, Location from, Location to,
boolean isAuthenticated) {
this.player = player;
@@ -24,22 +32,42 @@ public class SpawnTeleportEvent extends CustomEvent {
this.isAuthenticated = isAuthenticated;
}
/**
* Method getPlayer.
* @return Player
*/
public Player getPlayer() {
return player;
}
/**
* Method setTo.
* @param to Location
*/
public void setTo(Location to) {
this.to = to;
}
/**
* Method getTo.
* @return Location
*/
public Location getTo() {
return to;
}
/**
* Method getFrom.
* @return Location
*/
public Location getFrom() {
return from;
}
/**
* Method isAuthenticated.
* @return boolean
*/
public boolean isAuthenticated() {
return isAuthenticated;
}