mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-28 20:19:00 +01:00
If the cause is unknown, use NON_MEMBER as the association.
This commit is contained in:
parent
f00d73d60e
commit
f66e47c01f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user