Added PlayerBedEnterEvent and PlayerBedLeaveEvent

This commit is contained in:
Shoghi Cervantes
2014-10-08 17:37:11 +02:00
parent c52dc58d6f
commit 10b33546ef
4 changed files with 104 additions and 5 deletions

View File

@ -33,6 +33,7 @@ use pocketmine\event\entity\EntityMoveEvent;
use pocketmine\event\entity\EntityRegainHealthEvent;
use pocketmine\event\entity\EntitySpawnEvent;
use pocketmine\event\entity\EntityTeleportEvent;
use pocketmine\event\player\PlayerMotionEvent;
use pocketmine\event\Timings;
use pocketmine\level\format\Chunk;
use pocketmine\level\format\FullChunk;
@ -1100,9 +1101,11 @@ abstract class Entity extends Position implements Metadatable{
return false;
}
}
$this->motionX = $motion->x;
$this->motionY = $motion->y;
$this->motionZ = $motion->z;
if(!$this->justCreated){
if($this instanceof Player){
$pk = new SetEntityMotionPacket;