diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Merge.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Merge.java index 532fa2ce0..0d183ce8a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Merge.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Merge.java @@ -55,7 +55,7 @@ public class Merge extends SubCommand { MainUtil.sendMessage(player, C.NO_PLOT_PERMS); return false; } else { - uuid = plot.owner; + uuid = plot.guessOwner(); } } final PlotArea plotArea = plot.getArea(); @@ -155,25 +155,23 @@ public class Merge extends SubCommand { } isOnline = true; final int dir = direction; - Runnable run = new Runnable() { - @Override public void run() { - MainUtil.sendMessage(accepter, C.MERGE_ACCEPTED); - plot.autoMerge(dir, maxSize - size, owner, terrain); - PlotPlayer plotPlayer = UUIDHandler.getPlayer(player.getUUID()); - if (plotPlayer == null) { - sendMessage(accepter, C.MERGE_NOT_VALID); + Runnable run = () -> { + MainUtil.sendMessage(accepter, C.MERGE_ACCEPTED); + plot.autoMerge(dir, maxSize - size, owner, terrain); + PlotPlayer plotPlayer = UUIDHandler.getPlayer(player.getUUID()); + if (plotPlayer == null) { + sendMessage(accepter, C.MERGE_NOT_VALID); + return; + } + if (EconHandler.manager != null && plotArea.USE_ECONOMY && price > 0d) { + if (EconHandler.manager.getMoney(player) < price) { + sendMessage(player, C.CANNOT_AFFORD_MERGE, String.valueOf(price)); return; } - if (EconHandler.manager != null && plotArea.USE_ECONOMY && price > 0d) { - if (EconHandler.manager.getMoney(player) < price) { - sendMessage(player, C.CANNOT_AFFORD_MERGE, String.valueOf(price)); - return; - } - EconHandler.manager.withdrawMoney(player, price); - sendMessage(player, C.REMOVED_BALANCE, String.valueOf(price)); - } - MainUtil.sendMessage(player, C.SUCCESS_MERGE); + EconHandler.manager.withdrawMoney(player, price); + sendMessage(player, C.REMOVED_BALANCE, String.valueOf(price)); } + MainUtil.sendMessage(player, C.SUCCESS_MERGE); }; if (hasConfirmation(player)) { CmdConfirm.addPending(accepter,