mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 14:38:53 +00:00
fix: change where player is removed from cache
Fixes a permission error
This commit is contained in:
1 file changed
+3
-4
@@ -105,8 +105,10 @@ public abstract class EventListener {
|
|||||||
*/
|
*/
|
||||||
protected final void handlePlayerLeave(@NotNull OnlineUser online) {
|
protected final void handlePlayerLeave(@NotNull OnlineUser online) {
|
||||||
online.removeInvulnerabilityIfPermitted();
|
online.removeInvulnerabilityIfPermitted();
|
||||||
|
plugin.getOnlineUserMap().remove(online.getUuid());
|
||||||
|
|
||||||
plugin.runAsync(() -> {
|
plugin.runAsync(() -> {
|
||||||
// Set offline position
|
// Set offline position
|
||||||
plugin.getDatabase().setOfflinePosition(online, online.getPosition());
|
plugin.getDatabase().setOfflinePosition(online, online.getPosition());
|
||||||
|
|
||||||
// Remove this user's home cache
|
// Remove this user's home cache
|
||||||
@@ -125,9 +127,6 @@ public abstract class EventListener {
|
|||||||
.findAny()
|
.findAny()
|
||||||
.ifPresent(player -> this.updateUserList(player, users));
|
.ifPresent(player -> this.updateUserList(player, users));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove from user map
|
|
||||||
plugin.getOnlineUserMap().remove(online.getUuid());
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user