Skip to content

Commit

Permalink
Fix isValid returning true if both positions are in different worlds
Browse files Browse the repository at this point in the history
Signed-off-by: thebigsmileXD <[email protected]>
  • Loading branch information
inxomnyaa committed Oct 28, 2018
1 parent cd27009 commit e7a5800
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugin.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: MagicWE2
main: xenialdan\MagicWE2\Loader
version: 6.0.1
version: 6.0.2
api: [4.0.0+dev, 3.2.5+dev]
load: STARTUP
authors:
Expand Down
4 changes: 1 addition & 3 deletions src/xenialdan/MagicWE2/Selection.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,10 @@ public function isValid(): bool
$this->getLevel();
$this->getPos1();
$this->getPos2();
if ($this->getPos1()->getLevel() === $this->getPos2()->getLevel())
return true;
return ($this->getPos1()->getLevel() === $this->getLevel() && $this->getPos2()->getLevel() === $this->getLevel());
} catch (\Exception $e) {
return false;
}
return true;
}

/**
Expand Down

0 comments on commit e7a5800

Please sign in to comment.