mirror of
https://github.com/BentoBoxWorld/Warps.git
synced 2024-11-26 04:25:40 +01:00
Sign Cache could get out of sync with signs.
https://github.com/BentoBoxWorld/Warps/issues/80
This commit is contained in:
parent
74675abce6
commit
94f0ff4e22
@ -72,8 +72,9 @@ public class SignCacheManager {
|
||||
* @param key - uuid of owner
|
||||
*/
|
||||
void removeWarp(World world, UUID key) {
|
||||
cachedSigns.putIfAbsent(world, new HashMap<>());
|
||||
if (cachedSigns.containsKey(world)) {
|
||||
cachedSigns.get(world).remove(key);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -245,9 +245,10 @@ public class WarpSignsManager {
|
||||
if (getWarpMap(world).containsKey(uuid)) {
|
||||
popSign(getWarpMap(world).get(uuid));
|
||||
getWarpMap(world).remove(uuid);
|
||||
|
||||
}
|
||||
// Remove sign from warp panel cache
|
||||
addon.getWarpPanelManager().removeWarp(world, uuid);
|
||||
}
|
||||
saveWarpList();
|
||||
}
|
||||
|
||||
@ -256,6 +257,7 @@ public class WarpSignsManager {
|
||||
*/
|
||||
public void saveWarpList() {
|
||||
handler.saveObject(warpsData.save(worldsWarpList));
|
||||
addon.getWarpPanelManager().saveCache();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user