diff --git a/src/main/java/net/foxdenstudio/sponge/foxguard/plugin/handler/GlobalHandler.java b/src/main/java/net/foxdenstudio/sponge/foxguard/plugin/handler/GlobalHandler.java index e686c2a..c44725c 100644 --- a/src/main/java/net/foxdenstudio/sponge/foxguard/plugin/handler/GlobalHandler.java +++ b/src/main/java/net/foxdenstudio/sponge/foxguard/plugin/handler/GlobalHandler.java @@ -70,9 +70,9 @@ public GlobalHandler() { super(NAME, Integer.MIN_VALUE / 2); this.map = new CacheMap<>((key, map) -> Tristate.UNDEFINED); this.mapCache = new CacheMap<>((o, m) -> { - if (o instanceof Flag) { - Tristate state = map.get(FGUtil.nearestParent((Flag) o, map.keySet())); - m.put((Flag) o, state); + if (o instanceof IFlag) { + Tristate state = map.get(FGUtil.nearestParent((IFlag) o, map.keySet())); + m.put((IFlag) o, state); return state; } else return Tristate.UNDEFINED; }); diff --git a/src/main/java/net/foxdenstudio/sponge/foxguard/plugin/handler/GroupHandler.java b/src/main/java/net/foxdenstudio/sponge/foxguard/plugin/handler/GroupHandler.java index 901c502..9b2787e 100644 --- a/src/main/java/net/foxdenstudio/sponge/foxguard/plugin/handler/GroupHandler.java +++ b/src/main/java/net/foxdenstudio/sponge/foxguard/plugin/handler/GroupHandler.java @@ -81,16 +81,16 @@ public GroupHandler(String name, int priority, this.defaultPermissions = defaultPermissions; this.groupPermCache = new CacheMap<>((o, m) -> { - if (o instanceof Flag) { - Tristate state = groupPermissions.get(FGUtil.nearestParent((Flag) o, groupPermissions.keySet())); - m.put((Flag) o, state); + if (o instanceof IFlag) { + Tristate state = groupPermissions.get(FGUtil.nearestParent((IFlag) o, groupPermissions.keySet())); + m.put((IFlag) o, state); return state; } else return Tristate.UNDEFINED; }); this.defaultPermCache = new CacheMap<>((o, m) -> { - if (o instanceof Flag) { - Tristate state = defaultPermissions.get(FGUtil.nearestParent((Flag) o, defaultPermissions.keySet())); - m.put((Flag) o, state); + if (o instanceof IFlag) { + Tristate state = defaultPermissions.get(FGUtil.nearestParent((IFlag) o, defaultPermissions.keySet())); + m.put((IFlag) o, state); return state; } else return Tristate.UNDEFINED; }); diff --git a/src/main/java/net/foxdenstudio/sponge/foxguard/plugin/handler/PassiveHandler.java b/src/main/java/net/foxdenstudio/sponge/foxguard/plugin/handler/PassiveHandler.java index a5932de..1b66102 100644 --- a/src/main/java/net/foxdenstudio/sponge/foxguard/plugin/handler/PassiveHandler.java +++ b/src/main/java/net/foxdenstudio/sponge/foxguard/plugin/handler/PassiveHandler.java @@ -71,9 +71,9 @@ public PassiveHandler(String name, int priority, CacheMap map) super(name, priority); this.map = map; this.mapCache = new CacheMap<>((o, m) -> { - if (o instanceof Flag) { - Tristate state = map.get(FGUtil.nearestParent((Flag) o, map.keySet())); - m.put((Flag) o, state); + if (o instanceof IFlag) { + Tristate state = map.get(FGUtil.nearestParent((IFlag) o, map.keySet())); + m.put((IFlag) o, state); return state; } else return Tristate.UNDEFINED; }); diff --git a/src/main/java/net/foxdenstudio/sponge/foxguard/plugin/handler/SimpleHandler.java b/src/main/java/net/foxdenstudio/sponge/foxguard/plugin/handler/SimpleHandler.java index e2d2e5d..84370e3 100644 --- a/src/main/java/net/foxdenstudio/sponge/foxguard/plugin/handler/SimpleHandler.java +++ b/src/main/java/net/foxdenstudio/sponge/foxguard/plugin/handler/SimpleHandler.java @@ -97,23 +97,23 @@ public SimpleHandler(String name, int priority, this.defaultPermissions = defaultPermissions; this.ownerPermCache = new CacheMap<>((o, m) -> { - if (o instanceof Flag) { - Tristate state = ownerPermissions.get(FGUtil.nearestParent((Flag) o, ownerPermissions.keySet())); - m.put((Flag) o, state); + if (o instanceof IFlag) { + Tristate state = ownerPermissions.get(FGUtil.nearestParent((IFlag) o, ownerPermissions.keySet())); + m.put((IFlag) o, state); return state; } else return Tristate.UNDEFINED; }); this.memberPermCache = new CacheMap<>((o, m) -> { - if (o instanceof Flag) { - Tristate state = memberPermissions.get(FGUtil.nearestParent((Flag) o, memberPermissions.keySet())); - m.put((Flag) o, state); + if (o instanceof IFlag) { + Tristate state = memberPermissions.get(FGUtil.nearestParent((IFlag) o, memberPermissions.keySet())); + m.put((IFlag) o, state); return state; } else return Tristate.UNDEFINED; }); this.defaultPermCache = new CacheMap<>((o, m) -> { - if (o instanceof Flag) { - Tristate state = defaultPermissions.get(FGUtil.nearestParent((Flag) o, defaultPermissions.keySet())); - m.put((Flag) o, state); + if (o instanceof IFlag) { + Tristate state = defaultPermissions.get(FGUtil.nearestParent((IFlag) o, defaultPermissions.keySet())); + m.put((IFlag) o, state); return state; } else return Tristate.UNDEFINED; });