mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-02-20 06:12:38 +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) {
|
private RegionAssociable createRegionAssociable(Cause cause) {
|
||||||
Object rootCause = cause.getRootCause();
|
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);
|
return getPlugin().wrapPlayer((Player) rootCause);
|
||||||
} else if (rootCause instanceof OfflinePlayer) {
|
} else if (rootCause instanceof OfflinePlayer) {
|
||||||
return getPlugin().wrapOfflinePlayer((OfflinePlayer) rootCause);
|
return getPlugin().wrapOfflinePlayer((OfflinePlayer) rootCause);
|
||||||
|
Loading…
Reference in New Issue
Block a user