mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-09-28 22:57:29 +02:00
Merge pull request #332 from cindyker/versions/spigot1.8-5.x
Fix broken blacklist (NullPointerException).
This commit is contained in:
commit
83b1dabcdd
@ -20,6 +20,7 @@
|
|||||||
package com.sk89q.worldguard.blacklist;
|
package com.sk89q.worldguard.blacklist;
|
||||||
|
|
||||||
import com.google.common.cache.Cache;
|
import com.google.common.cache.Cache;
|
||||||
|
import com.google.common.cache.LoadingCache;
|
||||||
import com.sk89q.worldguard.LocalPlayer;
|
import com.sk89q.worldguard.LocalPlayer;
|
||||||
import com.sk89q.worldguard.blacklist.action.Action;
|
import com.sk89q.worldguard.blacklist.action.Action;
|
||||||
import com.sk89q.worldguard.blacklist.action.ActionResult;
|
import com.sk89q.worldguard.blacklist.action.ActionResult;
|
||||||
@ -181,7 +182,7 @@ public boolean check(boolean useAsWhitelist, BlacklistEvent event, boolean force
|
|||||||
Cache<String, TrackedEvent> repeatingEventCache = blacklist.getRepeatingEventCache();
|
Cache<String, TrackedEvent> repeatingEventCache = blacklist.getRepeatingEventCache();
|
||||||
|
|
||||||
// Check to see whether this event is being repeated
|
// Check to see whether this event is being repeated
|
||||||
TrackedEvent tracked = repeatingEventCache.getIfPresent(eventCacheKey);
|
TrackedEvent tracked = ((LoadingCache<String, TrackedEvent>)repeatingEventCache).getUnchecked(eventCacheKey);
|
||||||
if (tracked.matches(event)) {
|
if (tracked.matches(event)) {
|
||||||
repeating = true;
|
repeating = true;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user