summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-11-27 09:07:15 +0100
committersnowleo <schneeleo@gmail.com>2011-11-27 09:07:15 +0100
commit8791a8dbb75ac6ba145f85f5bfb8ecadf146ecc5 (patch)
tree41c85721a6abd555cbc91f0b8a136b3b7c6723c3
parent098072517a2bd667e3adc681333192910b442dc5 (diff)
downloadEssentials-8791a8dbb75ac6ba145f85f5bfb8ecadf146ecc5.tar
Essentials-8791a8dbb75ac6ba145f85f5bfb8ecadf146ecc5.tar.gz
Essentials-8791a8dbb75ac6ba145f85f5bfb8ecadf146ecc5.tar.lz
Essentials-8791a8dbb75ac6ba145f85f5bfb8ecadf146ecc5.tar.xz
Essentials-8791a8dbb75ac6ba145f85f5bfb8ecadf146ecc5.zip
Only print stack trace of motd.txt not found, if debug is on.
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java23
1 files changed, 17 insertions, 6 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
index 206154e6f..2bf989b5c 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
@@ -176,7 +176,14 @@ public class EssentialsPlayerListener extends PlayerListener
}
catch (IOException ex)
{
- LOGGER.log(Level.WARNING, ex.getMessage(), ex);
+ if (ess.getSettings().isDebug())
+ {
+ LOGGER.log(Level.WARNING, ex.getMessage(), ex);
+ }
+ else
+ {
+ LOGGER.log(Level.WARNING, ex.getMessage());
+ }
}
}
@@ -231,10 +238,12 @@ public class EssentialsPlayerListener extends PlayerListener
private void updateCompass(final User user)
{
Location loc = user.getHome(user.getLocation());
- if (loc == null) {
+ if (loc == null)
+ {
loc = user.getBedSpawnLocation();
}
- if (loc != null) {
+ if (loc != null)
+ {
user.setCompassTarget(loc);
}
}
@@ -362,11 +371,13 @@ public class EssentialsPlayerListener extends PlayerListener
@Override
public void onPlayerChangedWorld(final PlayerChangedWorldEvent event)
{
- if (ess.getSettings().getNoGodWorlds().contains(event.getPlayer().getLocation().getWorld().getName())) {
+ if (ess.getSettings().getNoGodWorlds().contains(event.getPlayer().getLocation().getWorld().getName()))
+ {
User user = ess.getUser(event.getPlayer());
- if (user.isGodModeEnabledRaw()) {
+ if (user.isGodModeEnabledRaw())
+ {
user.sendMessage(_("noGodWorldWarning"));
}
}
- }
+ }
}