Fixed group command

This commit is contained in:
Daniel Saukel 2016-04-28 22:41:51 +02:00
parent 2d4e870d65
commit c1415d054e

View File

@ -186,10 +186,9 @@ public class GroupCommand extends BRCommand {
return; return;
} }
for (DGroup anyDGroup : plugin.getDGroups()) { if (DGroup.getByPlayer(player) != null) {
if (anyDGroup.getPlayers().contains(player)) { MessageUtil.sendMessage(sender, messageConfig.getMessage(Messages.ERROR_LEAVE_GROUP));
MessageUtil.sendMessage(sender, messageConfig.getMessage(Messages.ERROR_LEAVE_GROUP)); return;
}
} }
if (!dGroup.getInvitedPlayers().contains(player) && !player.hasPermission("dxl.bypass")) { if (!dGroup.getInvitedPlayers().contains(player) && !player.hasPermission("dxl.bypass")) {