mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-22 17:18:37 +01:00
Allow users to modify existing homes when over homes limit (#3776)
Fixes #3761
This commit is contained in:
parent
1fed7a9a3a
commit
3ba675a899
@ -71,10 +71,10 @@ public class Commandsethome extends EssentialsCommand {
|
||||
private boolean checkHomeLimit(final User user, final User usersHome, final String name) throws Exception {
|
||||
if (!user.isAuthorized("essentials.sethome.multiple.unlimited")) {
|
||||
final int limit = ess.getSettings().getHomeLimit(user);
|
||||
if (usersHome.getHomes().size() == limit && usersHome.getHomes().contains(name)) {
|
||||
return false;
|
||||
}
|
||||
if (usersHome.getHomes().size() >= limit) {
|
||||
if (usersHome.getHomes().contains(name)) {
|
||||
return false;
|
||||
}
|
||||
throw new Exception(tl("maxHomes", ess.getSettings().getHomeLimit(user)));
|
||||
}
|
||||
return limit == 1;
|
||||
|
Loading…
Reference in New Issue
Block a user