diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java index 0ed71cc..a1bb8e4 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java @@ -600,7 +600,7 @@ public class SchematicCommand extends SWCommand { @Register(value = {"check", "clipboard"}) public void checkClipboardCommand(Player player, @ErrorMessage("UTIL_CHECK_TYPE_NOT_FOUND") CheckSchemType type) { try { - check(player, WorldEdit.getInstance().getSessionManager().get(new BukkitPlayer(player)).getClipboard().getClipboard(), type, "clipboard", false); + check(player, WorldEdit.getInstance().getSessionManager().findByName(player.getName()).getClipboard().getClipboard(), type, "clipboard", false); } catch (EmptyClipboardException e) { SchematicSystem.MESSAGE.send("COMMAND_CHECK_CLIPBOARD_EMPTY", player); } @@ -609,7 +609,7 @@ public class SchematicCommand extends SWCommand { @Register(value = {"check", "selection"}) public void checkSelectionCommand(Player player, @ErrorMessage("UTIL_CHECK_TYPE_NOT_FOUND") CheckSchemType type) { try { - Clipboard clipboard = new BlockArrayClipboard(WorldEdit.getInstance().getSessionManager().get(new BukkitPlayer(player)).getSelection(new BukkitWorld(player.getWorld()))); + Clipboard clipboard = new BlockArrayClipboard(WorldEdit.getInstance().getSessionManager().findByName(player.getName()).getSelection(new BukkitWorld(player.getWorld()))); EditSession editSession = WorldEdit.getInstance().getEditSessionFactory().getEditSession(new BukkitWorld(player.getWorld()), -1); Operations.complete(new ForwardExtentCopy(editSession, clipboard.getRegion(), clipboard, clipboard.getMinimumPoint())); @@ -630,7 +630,7 @@ public class SchematicCommand extends SWCommand { } Clipboard clipboard; try { - clipboard = WorldEdit.getInstance().getSessionManager().get(new BukkitPlayer(player)).getClipboard().getClipboard(); + clipboard = WorldEdit.getInstance().getSessionManager().findByName(player.getName()).getClipboard().getClipboard(); } catch (EmptyClipboardException e) { SchematicSystem.MESSAGE.send("COMMAND_CHECK_CLIPBOARD_EMPTY", player); return;