Replace all '/' in path to File.separator - Code Refactor
This commit is contained in:
@@ -5,7 +5,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* This event is call when AuthMe try to teleport a player
|
||||
* This event is call when AuthMe try to teleport a player
|
||||
*
|
||||
* @author Xephi59
|
||||
*/
|
||||
|
||||
@@ -5,44 +5,44 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
/**
|
||||
*
|
||||
* This event is called when a player login or register through AuthMe.
|
||||
* The boolean 'isLogin' will be false if, and only if, login/register failed.
|
||||
*
|
||||
* @author Xephi59
|
||||
*/
|
||||
*
|
||||
* This event is called when a player login or register through AuthMe. The
|
||||
* boolean 'isLogin' will be false if, and only if, login/register failed.
|
||||
*
|
||||
* @author Xephi59
|
||||
*/
|
||||
public class LoginEvent extends Event {
|
||||
|
||||
private Player player;
|
||||
private boolean isLogin;
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private Player player;
|
||||
private boolean isLogin;
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
public LoginEvent(Player player, boolean isLogin) {
|
||||
this.player = player;
|
||||
this.isLogin = isLogin;
|
||||
}
|
||||
public LoginEvent(Player player, boolean isLogin) {
|
||||
this.player = player;
|
||||
this.isLogin = isLogin;
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
public void setPlayer(Player player) {
|
||||
this.player = player;
|
||||
}
|
||||
public void setPlayer(Player player) {
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setLogin(boolean isLogin) {
|
||||
this.isLogin = isLogin;
|
||||
}
|
||||
@Deprecated
|
||||
public void setLogin(boolean isLogin) {
|
||||
this.isLogin = isLogin;
|
||||
}
|
||||
|
||||
public boolean isLogin() {
|
||||
return isLogin;
|
||||
}
|
||||
public boolean isLogin() {
|
||||
return isLogin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
|
||||
@@ -6,8 +6,10 @@ import org.bukkit.event.HandlerList;
|
||||
import fr.xephi.authme.security.crypts.EncryptionMethod;
|
||||
|
||||
/**
|
||||
* <p>This event is called when we need to compare or get an hash password,
|
||||
* for set a custom EncryptionMethod</p>
|
||||
* <p>
|
||||
* This event is called when we need to compare or get an hash password, for set
|
||||
* a custom EncryptionMethod
|
||||
* </p>
|
||||
*
|
||||
* @see fr.xephi.authme.security.crypts.EncryptionMethod
|
||||
*
|
||||
@@ -15,31 +17,31 @@ import fr.xephi.authme.security.crypts.EncryptionMethod;
|
||||
*/
|
||||
public class PasswordEncryptionEvent extends Event {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private EncryptionMethod method = null;
|
||||
private String playerName = "";
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private EncryptionMethod method = null;
|
||||
private String playerName = "";
|
||||
|
||||
public PasswordEncryptionEvent(EncryptionMethod method, String playerName) {
|
||||
this.method = method;
|
||||
this.playerName = playerName;
|
||||
}
|
||||
public PasswordEncryptionEvent(EncryptionMethod method, String playerName) {
|
||||
this.method = method;
|
||||
this.playerName = playerName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public void setMethod(EncryptionMethod method) {
|
||||
this.method = method;
|
||||
}
|
||||
public void setMethod(EncryptionMethod method) {
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
public EncryptionMethod getMethod() {
|
||||
return method;
|
||||
}
|
||||
public EncryptionMethod getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public String getPlayerName() {
|
||||
return playerName;
|
||||
}
|
||||
public String getPlayerName() {
|
||||
return playerName;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
|
||||
@@ -5,8 +5,8 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
/**
|
||||
*
|
||||
* This event is call just after store inventory into cache and will
|
||||
* empty the player inventory.
|
||||
* This event is call just after store inventory into cache and will empty the
|
||||
* player inventory.
|
||||
*
|
||||
* @author Xephi59
|
||||
*/
|
||||
|
||||
@@ -5,8 +5,8 @@ import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* This event is call if, and only if, a player is teleported
|
||||
* just after a register.
|
||||
* This event is call if, and only if, a player is teleported just after a
|
||||
* register.
|
||||
*
|
||||
* @author Xephi59
|
||||
*/
|
||||
|
||||
@@ -25,10 +25,8 @@ public class StoreInventoryEvent extends CustomEvent {
|
||||
|
||||
public StoreInventoryEvent(Player player, FileCache fileCache) {
|
||||
this.player = player;
|
||||
this.inventory = fileCache.readCache(player)
|
||||
.getInventory();
|
||||
this.armor = fileCache.readCache(player)
|
||||
.getArmour();
|
||||
this.inventory = fileCache.readCache(player).getInventory();
|
||||
this.armor = fileCache.readCache(player).getArmour();
|
||||
}
|
||||
|
||||
public ItemStack[] getInventory() {
|
||||
|
||||
Reference in New Issue
Block a user