Fixed MaxMembers upgrade

This commit is contained in:
Fabrizio La Rosa 2020-07-10 07:34:32 +02:00
parent f3ad27c9e7
commit 9dcfe25d06
3 changed files with 3 additions and 5 deletions

View File

@ -99,8 +99,7 @@ public class AcceptCommand extends SubCommand {
island.save();
if ((island.getRole(IslandRole.Member).size() + island.getRole(IslandRole.Operator).size()
+ 1) >= fileManager.getConfig(new File(plugin.getDataFolder(), "config.yml"))
.getFileConfiguration().getInt("Island.Member.Capacity")) {
+ 1) >= island.getMaxMembers()) {
Map<UUID, Invite> invites = inviteManager.getInvites();
for (UUID inviteList : invites.keySet()) {

View File

@ -50,7 +50,7 @@ public class InviteCommand extends SubCommand {
Config mainConfig = fileManager.getConfig(new File(plugin.getDataFolder(), "config.yml"));
if ((island.getRole(IslandRole.Member).size() + island.getRole(IslandRole.Operator).size()
+ 1) >= mainConfig.getFileConfiguration().getInt("Island.Member.Capacity")) {
+ 1) >= island.getMaxMembers()) {
messageManager.sendMessage(player, configLoad.getString("Command.Island.Invite.Capacity.Message"));
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
} else {

View File

@ -333,8 +333,7 @@ public class Members {
new Placeholder("%island_members",
"" + (islandMembers.size() + islandOperators.size() + 1)),
new Placeholder("%island_capacity",
"" + fileManager.getConfig(new File(plugin.getDataFolder(), "config.yml"))
.getFileConfiguration().getInt("Island.Member.Capacity")),
"" + island.getMaxMembers()),
new Placeholder("%members", "" + islandMembers.size()),
new Placeholder("%operators", "" + islandOperators.size())},
null, null), 4);