From 6c6d1a85521103d6316e03f444b0a42ab794f918 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Sun, 22 May 2016 14:02:53 +0200 Subject: [PATCH] Fix /dxl leave for edit mode --- .../java/io/github/dre2n/dungeonsxl/command/LeaveCommand.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/dre2n/dungeonsxl/command/LeaveCommand.java b/src/main/java/io/github/dre2n/dungeonsxl/command/LeaveCommand.java index 7e873164..627ea1bc 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/command/LeaveCommand.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/command/LeaveCommand.java @@ -22,6 +22,7 @@ import io.github.dre2n.dungeonsxl.DungeonsXL; import io.github.dre2n.dungeonsxl.config.DMessages; import io.github.dre2n.dungeonsxl.event.dplayer.DPlayerEscapeEvent; import io.github.dre2n.dungeonsxl.event.dplayer.DPlayerLeaveDGroupEvent; +import io.github.dre2n.dungeonsxl.player.DEditPlayer; import io.github.dre2n.dungeonsxl.player.DGlobalPlayer; import io.github.dre2n.dungeonsxl.player.DGroup; import io.github.dre2n.dungeonsxl.player.DInstancePlayer; @@ -61,7 +62,7 @@ public class LeaveCommand extends BRCommand { DGroup dGroup = DGroup.getByPlayer(player); - if (dGroup == null) { + if (dGroup == null && !(dPlayer instanceof DEditPlayer)) { MessageUtil.sendMessage(player, DMessages.ERROR_JOIN_GROUP.getMessage()); return; }