This commit is contained in:
Gabriele C 2015-11-25 15:39:15 +01:00
parent 6dc4119d0c
commit f6e9347e1e
6 changed files with 7 additions and 13 deletions

View File

@ -81,8 +81,7 @@ public class API {
PlayerAuth auth = PlayerCache.getInstance().getAuth(player.getName().toLowerCase()); PlayerAuth auth = PlayerCache.getInstance().getAuth(player.getName().toLowerCase());
if (auth != null) { if (auth != null) {
Location loc = new Location(Bukkit.getWorld(auth.getWorld()), auth.getQuitLocX(), auth.getQuitLocY(), auth.getQuitLocZ()); return new Location(Bukkit.getWorld(auth.getWorld()), auth.getQuitLocX(), auth.getQuitLocY(), auth.getQuitLocZ());
return loc;
} else { } else {
return null; return null;
} }

View File

@ -41,8 +41,7 @@ public class EssSpawn extends CustomConfiguration {
return null; return null;
if (this.getString("spawns.default.world").isEmpty() || this.getString("spawns.default.world").equals("")) if (this.getString("spawns.default.world").isEmpty() || this.getString("spawns.default.world").equals(""))
return null; return null;
Location location = new Location(Bukkit.getWorld(this.getString("spawns.default.world")), this.getDouble("spawns.default.x"), this.getDouble("spawns.default.y"), this.getDouble("spawns.default.z"), Float.parseFloat(this.getString("spawns.default.yaw")), Float.parseFloat(this.getString("spawns.default.pitch"))); return new Location(Bukkit.getWorld(this.getString("spawns.default.world")), this.getDouble("spawns.default.x"), this.getDouble("spawns.default.y"), this.getDouble("spawns.default.z"), Float.parseFloat(this.getString("spawns.default.yaw")), Float.parseFloat(this.getString("spawns.default.pitch")));
return location;
} catch (NullPointerException | NumberFormatException npe) { } catch (NullPointerException | NumberFormatException npe) {
return null; return null;
} }

View File

@ -378,7 +378,7 @@ public class BCRYPT implements EncryptionMethod {
* @param lr an array containing the two 32-bit half blocks * @param lr an array containing the two 32-bit half blocks
* @param off the position in the array of the blocks * @param off the position in the array of the blocks
*/ */
private final void encipher(int lr[], int off) { private void encipher(int lr[], int off) {
int i, n, l = lr[off], r = lr[off + 1]; int i, n, l = lr[off], r = lr[off + 1];
l ^= P[0]; l ^= P[0];

View File

@ -87,8 +87,7 @@ public class MacBasedPRF implements PRF {
* @return byte[] * @see fr.xephi.authme.security.pbkdf2.PRF#doFinal(byte[]) * @return byte[] * @see fr.xephi.authme.security.pbkdf2.PRF#doFinal(byte[])
*/ */
public byte[] doFinal(byte[] M) { public byte[] doFinal(byte[] M) {
byte[] r = mac.doFinal(M); return mac.doFinal(M);
return r;
} }
/** /**

View File

@ -69,7 +69,6 @@ public class PBKDF2HexFormatter implements PBKDF2Formatter {
* @return String * @see fr.xephi.authme.security.pbkdf2.PBKDF2Formatter#toString(PBKDF2Parameters) * @return String * @see fr.xephi.authme.security.pbkdf2.PBKDF2Formatter#toString(PBKDF2Parameters)
*/ */
public String toString(PBKDF2Parameters p) { public String toString(PBKDF2Parameters p) {
String s = BinTools.bin2hex(p.getSalt()) + ":" + String.valueOf(p.getIterationCount()) + ":" + BinTools.bin2hex(p.getDerivedKey()); return BinTools.bin2hex(p.getSalt()) + ":" + String.valueOf(p.getIterationCount()) + ":" + BinTools.bin2hex(p.getDerivedKey());
return s;
} }
} }

View File

@ -117,8 +117,7 @@ public class Spawn extends CustomConfiguration {
try { try {
if (this.getString("spawn.world").isEmpty() || this.getString("spawn.world").equals("")) if (this.getString("spawn.world").isEmpty() || this.getString("spawn.world").equals(""))
return null; return null;
Location location = new Location(Bukkit.getWorld(this.getString("spawn.world")), this.getDouble("spawn.x"), this.getDouble("spawn.y"), this.getDouble("spawn.z"), Float.parseFloat(this.getString("spawn.yaw")), Float.parseFloat(this.getString("spawn.pitch"))); return new Location(Bukkit.getWorld(this.getString("spawn.world")), this.getDouble("spawn.x"), this.getDouble("spawn.y"), this.getDouble("spawn.z"), Float.parseFloat(this.getString("spawn.yaw")), Float.parseFloat(this.getString("spawn.pitch")));
return location;
} catch (NullPointerException | NumberFormatException npe) { } catch (NullPointerException | NumberFormatException npe) {
return null; return null;
} }
@ -133,8 +132,7 @@ public class Spawn extends CustomConfiguration {
try { try {
if (this.getString("firstspawn.world").isEmpty() || this.getString("firstspawn.world").equals("")) if (this.getString("firstspawn.world").isEmpty() || this.getString("firstspawn.world").equals(""))
return null; return null;
Location location = new Location(Bukkit.getWorld(this.getString("firstspawn.world")), this.getDouble("firstspawn.x"), this.getDouble("firstspawn.y"), this.getDouble("firstspawn.z"), Float.parseFloat(this.getString("firstspawn.yaw")), Float.parseFloat(this.getString("firstspawn.pitch"))); return new Location(Bukkit.getWorld(this.getString("firstspawn.world")), this.getDouble("firstspawn.x"), this.getDouble("firstspawn.y"), this.getDouble("firstspawn.z"), Float.parseFloat(this.getString("firstspawn.yaw")), Float.parseFloat(this.getString("firstspawn.pitch")));
return location;
} catch (NullPointerException | NumberFormatException npe) { } catch (NullPointerException | NumberFormatException npe) {
return null; return null;
} }