Merge pull request #273 from MinelinkNetwork/fix-global-limit

Fix incorrect plot count being used in setowner
This commit is contained in:
boy0001 2015-04-15 09:51:56 +10:00
commit cd17641433

View File

@ -76,7 +76,7 @@ public class SetOwner extends SubCommand {
else { else {
if (!Permissions.hasPermission(plr, "plots.admin.command.setowner")) { if (!Permissions.hasPermission(plr, "plots.admin.command.setowner")) {
int size = plots.size(); int size = plots.size();
final int currentPlots = (Settings.GLOBAL_LIMIT ? MainUtil.getPlayerPlotCount(plr) : MainUtil.getPlayerPlotCount(loc.getWorld(), plr)) + size; final int currentPlots = (Settings.GLOBAL_LIMIT ? MainUtil.getPlayerPlotCount(other) : MainUtil.getPlayerPlotCount(loc.getWorld(), other)) + size;
if (currentPlots > MainUtil.getAllowedPlots(other)) { if (currentPlots > MainUtil.getAllowedPlots(other)) {
sendMessage(plr, C.CANT_TRANSFER_MORE_PLOTS); sendMessage(plr, C.CANT_TRANSFER_MORE_PLOTS);
return false; return false;