mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
Fetch saved user from database when creating home if not cached
This commit is contained in:
1 file changed
+1
@@ -170,6 +170,7 @@ public class HomesManager {
|
||||
|
||||
// Validate against user home slots
|
||||
final SavedUser savedOwner = plugin.getSavedUser(owner)
|
||||
.or(() -> plugin.getDatabase().getUserData(owner.getUuid()))
|
||||
.orElseThrow(() -> new IllegalStateException("User data not found for " + owner.getUuid()));
|
||||
if (plugin.getSettings().doEconomy() && homes > getFreeHomes(owner) && homes > savedOwner.getHomeSlots()) {
|
||||
if (!buyAdditionalSlots || plugin.getEconomyHook().isEmpty() || !(owner instanceof OnlineUser online)) {
|
||||
|
||||
Reference in new issue
Block a user