Don't bomb if userMap isn't initialized.

This commit is contained in:
KHobbits 2012-08-06 02:44:01 +01:00
parent 2f562f79aa
commit 38655811b7
3 changed files with 17 additions and 10 deletions

View File

@ -491,6 +491,12 @@ public class Essentials extends JavaPlugin implements IEssentials
{ {
return (User)base; return (User)base;
} }
if (userMap == null) {
LOGGER.log(Level.WARNING, "Essentials userMap not initialized");
return null;
}
User user = userMap.getUser(base.getName()); User user = userMap.getUser(base.getName());
if (user == null) if (user == null)

View File

@ -64,7 +64,8 @@ public class SignGameMode extends EssentialsSign
{ {
player.setGameMode(GameMode.ADVENTURE); player.setGameMode(GameMode.ADVENTURE);
} }
else { else
{
throw new SignException(_("invalidSignLine", 2)); throw new SignException(_("invalidSignLine", 2));
} }
} }