PHP: public function onDeath(EntityDamageEvent $event) { $player = $event->getEntity(); $killer = $event->getFinalDamage()->getDamager(); $killern = $killer->getEntity(); if($event instanceof Player){ $killer->sendMessage(c::RED. " You killed ". $player . ); }}
Remove the last dot in sendMessage(). A string can be concatenated with an object with method __toString() declared another string null float|int|double but never with the open atmosphere. You never know what's happening in the atmosphere.