Fixed NPE

This commit is contained in:
boy0001 2015-03-21 00:53:24 +11:00
parent ab8ece4b6d
commit 1a3fe1426a

View File

@ -141,11 +141,11 @@ public class Merge extends SubCommand {
final UUID u1 = plot.owner; final UUID u1 = plot.owner;
for (final PlotId myid : plots) { for (final PlotId myid : plots) {
final Plot myplot = PlotSquared.getPlots(world).get(myid); final Plot myplot = PlotSquared.getPlots(world).get(myid);
UUID u2 = myplot.owner; if (myplot == null || myplot.owner == null) {
if (myplot == null || u2 == null) {
MainUtil.sendMessage(plr, C.NO_PERM_MERGE.s().replaceAll("%plot%", myid.toString())); MainUtil.sendMessage(plr, C.NO_PERM_MERGE.s().replaceAll("%plot%", myid.toString()));
return false; return false;
} }
UUID u2 = myplot.owner;
if (u2.equals(u1)) { if (u2.equals(u1)) {
continue; continue;
} }