Fixed a bug with the smoke effect for the faction home and one NPE.

This commit is contained in:
Olof Larsson
2011-10-13 22:49:41 +02:00
parent 88fe43d600
commit 618c5fceed
5 changed files with 11 additions and 12 deletions

View File

@ -82,6 +82,8 @@ public class PermUtil {
*/
public boolean has (CommandSender me, String perm)
{
if (me == null) return false;
if ( ! (me instanceof Player))
{
return me.hasPermission(perm);
@ -108,7 +110,7 @@ public class PermUtil {
{
return true;
}
else if (informSenderIfNot)
else if (informSenderIfNot && me != null)
{
me.sendMessage(this.getForbiddenMessage(perm));
}