If the cause is unknown, use NON_MEMBER as the association.

This commit is contained in:
sk89q 2014-08-24 02:56:23 -07:00
parent f00d73d60e
commit f66e47c01f

View File

@ -127,7 +127,9 @@ private boolean isWhitelisted(Cause cause, World world) {
private RegionAssociable createRegionAssociable(Cause cause) {
Object rootCause = cause.getRootCause();
if (rootCause instanceof Player) {
if (!cause.isKnown()) {
return Associables.constant(Association.NON_MEMBER);
} else if (rootCause instanceof Player) {
return getPlugin().wrapPlayer((Player) rootCause);
} else if (rootCause instanceof OfflinePlayer) {
return getPlugin().wrapOfflinePlayer((OfflinePlayer) rootCause);