Relocation of Full server check in party invites. Fixes a bug where people cannot invite players to their party, regardless of which server they are on, when the inivters server is full.

This commit is contained in:
TadahTech 2016-07-23 19:50:57 -05:00
parent 5d0b5f80c0
commit 133376fb94

View File

@ -43,13 +43,6 @@ public class PartyMethodManager
return;
}
boolean can = Bukkit.getMaxPlayers() >= _plugin.getPlugin().getServer().getOnlinePlayers().size();
if(!can)
{
Lang.SERVER_FULL.send(caller);
return;
}
if(party != null)
{
if(!party.getOwner().equalsIgnoreCase(caller.getName()))
@ -115,6 +108,14 @@ public class PartyMethodManager
_plugin.getInviteManager().sendAcceptOrDeny(possible, caller.getName());
return;
}
//Only perform this when I actually need too.
boolean can = Bukkit.getMaxPlayers() >= _plugin.getPlugin().getServer().getOnlinePlayers().size();
if(!can)
{
Lang.SERVER_FULL.send(caller);
return;
}
//Not on the same server
_plugin.getRedisManager().findAndInvite(target, caller.getName());
}