Fix edithome privacy not working

This commit is contained in:
William278 committed 2023-03-22 15:22:06 +00:00
1 parent 6903a705cd
commit c316d290c5
2 files changed
+1 -5

No files matched your search

@@ -166,7 +166,7 @@ public class EditHomeCommand extends SavedPositionCommand<Home> {
home.setPublic(privacyArg.get().equals("public"));
plugin.fireEvent(plugin.getHomeEditEvent(home, executor), (event) -> {
try {
plugin.getManager().homes().setHomePrivacy(home, home.isPublic());
plugin.getManager().homes().setHomePrivacy(event.getHome(), home.isPublic());
} catch (ValidationException e) {
int maxHomes = executor instanceof OnlineUser user ?
user.getMaxPublicHomes(plugin.getSettings().getMaxPublicHomes(),