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;
for (final PlotId myid : plots) {
final Plot myplot = PlotSquared.getPlots(world).get(myid);
UUID u2 = myplot.owner;
if (myplot == null || u2 == null) {
if (myplot == null || myplot.owner == null) {
MainUtil.sendMessage(plr, C.NO_PERM_MERGE.s().replaceAll("%plot%", myid.toString()));
return false;
}
UUID u2 = myplot.owner;
if (u2.equals(u1)) {
continue;
}