mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-06-26 14:34:53 +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;
|
||||
|
||||
import com.google.common.cache.Cache;
|
||||
import com.google.common.cache.LoadingCache;
|
||||
import com.sk89q.worldguard.LocalPlayer;
|
||||
import com.sk89q.worldguard.blacklist.action.Action;
|
||||
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();
|
||||
|
||||
// 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)) {
|
||||
repeating = true;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user