mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-26 20:26:34 +01:00
Fixed MaxMembers upgrade
This commit is contained in:
parent
f3ad27c9e7
commit
9dcfe25d06
@ -99,8 +99,7 @@ public class AcceptCommand extends SubCommand {
|
|||||||
island.save();
|
island.save();
|
||||||
|
|
||||||
if ((island.getRole(IslandRole.Member).size() + island.getRole(IslandRole.Operator).size()
|
if ((island.getRole(IslandRole.Member).size() + island.getRole(IslandRole.Operator).size()
|
||||||
+ 1) >= fileManager.getConfig(new File(plugin.getDataFolder(), "config.yml"))
|
+ 1) >= island.getMaxMembers()) {
|
||||||
.getFileConfiguration().getInt("Island.Member.Capacity")) {
|
|
||||||
Map<UUID, Invite> invites = inviteManager.getInvites();
|
Map<UUID, Invite> invites = inviteManager.getInvites();
|
||||||
|
|
||||||
for (UUID inviteList : invites.keySet()) {
|
for (UUID inviteList : invites.keySet()) {
|
||||||
|
@ -50,7 +50,7 @@ public class InviteCommand extends SubCommand {
|
|||||||
Config mainConfig = fileManager.getConfig(new File(plugin.getDataFolder(), "config.yml"));
|
Config mainConfig = fileManager.getConfig(new File(plugin.getDataFolder(), "config.yml"));
|
||||||
|
|
||||||
if ((island.getRole(IslandRole.Member).size() + island.getRole(IslandRole.Operator).size()
|
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"));
|
messageManager.sendMessage(player, configLoad.getString("Command.Island.Invite.Capacity.Message"));
|
||||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||||
} else {
|
} else {
|
||||||
|
@ -333,8 +333,7 @@ public class Members {
|
|||||||
new Placeholder("%island_members",
|
new Placeholder("%island_members",
|
||||||
"" + (islandMembers.size() + islandOperators.size() + 1)),
|
"" + (islandMembers.size() + islandOperators.size() + 1)),
|
||||||
new Placeholder("%island_capacity",
|
new Placeholder("%island_capacity",
|
||||||
"" + fileManager.getConfig(new File(plugin.getDataFolder(), "config.yml"))
|
"" + island.getMaxMembers()),
|
||||||
.getFileConfiguration().getInt("Island.Member.Capacity")),
|
|
||||||
new Placeholder("%members", "" + islandMembers.size()),
|
new Placeholder("%members", "" + islandMembers.size()),
|
||||||
new Placeholder("%operators", "" + islandOperators.size())},
|
new Placeholder("%operators", "" + islandOperators.size())},
|
||||||
null, null), 4);
|
null, null), 4);
|
||||||
|
Loading…
Reference in New Issue
Block a user