Fix PlayerAuth constructor calls

This commit is contained in:
games647
2015-10-03 18:22:13 +02:00
parent 4c2348e6e3
commit e9f299fca8
16 changed files with 1115 additions and 1128 deletions
@@ -44,8 +44,8 @@ public class OtherAccounts extends CustomConfiguration {
this.getStringList(uuid.toString()).add(player.getName());
save();
}
} catch (NoSuchMethodError e) {
} catch (Exception e) {
} catch (NoSuchMethodError | Exception e) {
//ingore
}
}
@@ -58,10 +58,9 @@ public class OtherAccounts extends CustomConfiguration {
this.getStringList(uuid.toString()).remove(player.getName());
save();
}
} catch (NoSuchMethodError e) {
} catch (Exception e) {
} catch (NoSuchMethodError | Exception e) {
//ignore
}
}
public List<String> getAllPlayersByUUID(UUID uuid) {
@@ -90,9 +90,7 @@ public class Spawn extends CustomConfiguration {
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 location;
} catch (NullPointerException npe) {
return null;
} catch (NumberFormatException nfe) {
} catch (NullPointerException | NumberFormatException npe) {
return null;
}
}
@@ -103,9 +101,7 @@ public class Spawn extends CustomConfiguration {
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 location;
} catch (NullPointerException npe) {
return null;
} catch (NumberFormatException nfe) {
} catch (NullPointerException | NumberFormatException npe) {
return null;
}
}