Releases: Muqsit/DimensionPortals
Releases · Muqsit/DimensionPortals
v0.2.2
v0.2.0
- Fixed bug: Portals are wrongfully destroyed on any neighbouring block update
- Simplified portal creation and destruction logic
- Added
PlayerCreatePortalEvent::$transaction
property to track changed blocks
This is useful for grief prevention plugins and the likes, to perform checks for whether a portal intersects a protected region:/** @var PlayerCreatePortalEvent $event */ $positions = []; foreach($event->transaction->getBlocks() as [$x, $y, $z, $block]){ $positions[] = new Vector3($x, $y, $z); } $min = Vector3::minComponents(...$positions); $max = Vector3::maxComponents(...$positions); if(/* min-max intersects a protected region */){ $event->cancel(); }