Fixes /plot kick *

This commit is contained in:
Jesse Boyd 2016-06-23 04:07:57 +10:00
parent 7dc7714261
commit 16d191db2c

View File

@ -11,7 +11,6 @@ import com.intellectualcrafters.plot.util.UUIDHandler;
import com.intellectualcrafters.plot.util.WorldUtil; import com.intellectualcrafters.plot.util.WorldUtil;
import com.plotsquared.general.commands.Argument; import com.plotsquared.general.commands.Argument;
import com.plotsquared.general.commands.CommandDeclaration; import com.plotsquared.general.commands.CommandDeclaration;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;
@ -48,7 +47,12 @@ public class Kick extends SubCommand {
Set<PlotPlayer> players = new HashSet<>(); Set<PlotPlayer> players = new HashSet<>();
for (UUID uuid : uuids) { for (UUID uuid : uuids) {
if (uuid == DBFunc.everyone) { if (uuid == DBFunc.everyone) {
players.addAll(plot.getPlayersInPlot()); for (PlotPlayer pp : plot.getPlayersInPlot()) {
if (pp == player || pp.hasPermission("plots.admin.entry.denied")) {
continue;
}
players.add(pp);
}
break; break;
} }
PlotPlayer pp = UUIDHandler.getPlayer(uuid); PlotPlayer pp = UUIDHandler.getPlayer(uuid);