mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
Fix max home locale placeholder, account for free homes, fix #338
This commit is contained in:
5 files changed
+38
-31
No files matched your search
@@ -170,10 +170,7 @@ public class EditHomeCommand extends SavedPositionCommand<Home> {
|
||||
try {
|
||||
plugin.getManager().homes().setHomePrivacy(event.getHome(), home.isPublic());
|
||||
} catch (ValidationException e) {
|
||||
int maxHomes = executor instanceof OnlineUser user ?
|
||||
user.getMaxPublicHomes(plugin.getSettings().getMaxPublicHomes(),
|
||||
plugin.getSettings().doStackPermissionLimits()) :
|
||||
plugin.getSettings().getMaxPublicHomes();
|
||||
int maxHomes = plugin.getManager().homes().getMaxPublicHomes(executor instanceof OnlineUser user ? user : null);
|
||||
e.dispatchHomeError(executor, false, plugin, Integer.toString(maxHomes));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user