From 5943537c2629c9255c6faccf1c16c70a8376bda0 Mon Sep 17 00:00:00 2001 From: DNx5 Date: Mon, 22 Feb 2016 22:48:02 +0700 Subject: [PATCH] cleanup It's good now --- src/main/java/fr/xephi/authme/settings/Spawn.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/fr/xephi/authme/settings/Spawn.java b/src/main/java/fr/xephi/authme/settings/Spawn.java index fa710c95f..275a8d0e0 100644 --- a/src/main/java/fr/xephi/authme/settings/Spawn.java +++ b/src/main/java/fr/xephi/authme/settings/Spawn.java @@ -74,10 +74,9 @@ public class Spawn extends CustomConfiguration { public Location getSpawn() { try { - String worldName; - World world; - if (StringUtils.isEmpty(worldName = getString("spawn.world")) || - (world = Bukkit.getWorld(worldName)) == null) { + String worldName = getString("spawn.world"); + World world = Bukkit.getWorld(worldName); + if (StringUtils.isEmpty(worldName) || world == null) { return null; } return new Location(world, getDouble("spawn.x"), getDouble("spawn.y"), getDouble("spawn.z"), @@ -107,11 +106,11 @@ public class Spawn extends CustomConfiguration { // Return the spawn location of a player public Location getSpawnLocation(Player player) { AuthMe plugin = AuthMe.getInstance(); - World world; - if (plugin == null || player == null || (world = player.getWorld()) == null) { + if (plugin == null || player == null || player.getWorld() == null) { return null; } + World world = player.getWorld(); Location spawnLoc = null; for (String priority : spawnPriority) { switch (priority.toLowerCase()) {