mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
Don't check against max public homes for other-user home privacy update, Fix #388
This commit is contained in:
1 file changed
+2
-2
@@ -288,11 +288,11 @@ public class HomesManager {
|
||||
}
|
||||
|
||||
public void setHomePrivacy(@NotNull Home home, boolean isPublic) {
|
||||
if (isPublic) {
|
||||
if (isPublic && home.getOwner() instanceof OnlineUser online) {
|
||||
final int publicHomes = plugin.getDatabase().getHomes(home.getOwner()).stream()
|
||||
.filter(Home::isPublic)
|
||||
.toList().size();
|
||||
if (publicHomes >= getMaxPublicHomes(home.getOwner())) {
|
||||
if (publicHomes >= getMaxPublicHomes(online)) {
|
||||
throw new ValidationException(ValidationException.Type.REACHED_MAX_PUBLIC_HOMES);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user