diff options
author | KHobbits <rob@khobbits.co.uk> | 2012-01-28 14:05:50 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2012-01-28 14:05:50 +0000 |
commit | e960078e1ad87cd509e5b13eafd02e3ecb7136a7 (patch) | |
tree | b5d1bf496214fb4b673232779eb40509a3638b6e /EssentialsSpawn | |
parent | f4413633b8c1ad5dd888370158fe412fa00a66d3 (diff) | |
download | Essentials-e960078e1ad87cd509e5b13eafd02e3ecb7136a7.tar Essentials-e960078e1ad87cd509e5b13eafd02e3ecb7136a7.tar.gz Essentials-e960078e1ad87cd509e5b13eafd02e3ecb7136a7.tar.lz Essentials-e960078e1ad87cd509e5b13eafd02e3ecb7136a7.tar.xz Essentials-e960078e1ad87cd509e5b13eafd02e3ecb7136a7.zip |
Random Cleanup
Diffstat (limited to 'EssentialsSpawn')
-rw-r--r-- | EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java | 2 | ||||
-rw-r--r-- | EssentialsSpawn/src/com/earth2me/essentials/spawn/SpawnStorage.java | 24 |
2 files changed, 18 insertions, 8 deletions
diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java index 48a74557b..bab6bd822 100644 --- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java +++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java @@ -104,7 +104,7 @@ public class EssentialsSpawnPlayerListener implements Listener { return; } - + try { final Location spawn = spawns.getNewbieSpawn(); diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/SpawnStorage.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/SpawnStorage.java index 13eb1f7df..9f040518a 100644 --- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/SpawnStorage.java +++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/SpawnStorage.java @@ -98,12 +98,15 @@ public class SpawnStorage extends AsyncStorageObjectHolder<Spawns> implements IE { for (EventPriority priority : EventPriority.values()) { - if (priority.toString().equalsIgnoreCase(getData().getRespawnPriority())) { + if (priority.toString().equalsIgnoreCase(getData().getRespawnPriority())) + { return priority; } } return EventPriority.NORMAL; - } finally { + } + finally + { unlock(); } } @@ -113,12 +116,15 @@ public class SpawnStorage extends AsyncStorageObjectHolder<Spawns> implements IE acquireReadLock(); try { - if (getData().getNewbieSpawn() == null || getData().getNewbieSpawn().isEmpty() || - getData().getNewbieSpawn().equalsIgnoreCase("none")) { + if (getData().getNewbieSpawn() == null || getData().getNewbieSpawn().isEmpty() + || getData().getNewbieSpawn().equalsIgnoreCase("none")) + { return null; } return getSpawn(getData().getNewbieSpawn()); - } finally { + } + finally + { unlock(); } } @@ -129,7 +135,9 @@ public class SpawnStorage extends AsyncStorageObjectHolder<Spawns> implements IE try { return getData().getNewPlayerAnnouncement() != null && !getData().getNewPlayerAnnouncement().isEmpty(); - } finally { + } + finally + { unlock(); } } @@ -140,7 +148,9 @@ public class SpawnStorage extends AsyncStorageObjectHolder<Spawns> implements IE try { return getData().getNewPlayerAnnouncement().replace('&', '§').replace("§§", "&").replace("{PLAYER}", user.getDisplayName()).replace("{DISPLAYNAME}", user.getDisplayName()).replace("{GROUP}", user.getGroup()).replace("{USERNAME}", user.getName()).replace("{ADDRESS}", user.getAddress().toString()); - } finally { + } + finally + { unlock(); } } |