1) Can I block »ONLY« rotating players head? e.g. You can move, but you can't move your head (propably something with x-rot and y-rot?) 2) Can I set any item throwable (e.g. throwing emeralds like enderpearls)
X-rot is called yaw and Y-rot is called pitch. Check in PlayerMoveEvent if from pitch !== to pitch or from yaw !== to yaw cancel event. Note that the Player can still rotate head, just that after hundreds of milliseconds it will get reverted.
For 2, handle PlayerInteractEvent. If event action is RIGHT_CLICK_AIR and event item is a snowball, cancel it.
PHP: public function onInteract(PlayerInteractEvent $ev){if ($ev->getAction() == PlayerInteractEvent::RIGHT_CLICK_AIR){//now what? It's bad/ good?}}
PHP: public function onInteract(PlayerInteractEvent $ev){if ($ev->getAction() === PlayerInteractEvent::RIGHT_CLICK_AIR and in_array($event->getItem()->getId(), [/*snowball ID*/, /*egg ID*/])){//now what? It's bad/ good?}}
Take a look at how Player.php handles snowballs projection. https://github.com/PocketMine/PocketMine-MP/blob/master/src/pocketmine/Player.php#L2009-2043
I looked there, but I don't think simply replacing "Item::SNOWBALL" with "item::EMERALD" should work.