Object of class ThisCrazyPl\MainClassPl could not be converted to string" (EXCEPTION) in "plugins/new Player/src/ThisCrazyPl/MainClassPl" at line 95 public function FirstJoin(PlayerJoinEvent $e){ $p = $e->getPlayer(); $names = $p->getName(); if(!$p->hasPlayedBefore()){ $rand1 = mt_rand(1,10); $rand = mt_rand(1,10); if($rand == 1){ $name = ('Nicolas'); } if($rand == 2){ $name = ('Drake'); } if($rand == 3){ $name = ('Carl'); } if($rand == 4){ $name = ('Daniel'); } if($rand == 5){ $name = ('Jhon'); } if($rand == 6){ $name = ('Clyde'); } if($rand == 7){ $name = ('Nicolay'); } if($rand == 8){ $name = ('Max'); } if($rand == 9){ $name = ('Tommy'); } if($rand == 10){ $name = ('Gay'); } if($rand1 == 1){ $surname = ('Nicolas'); } if($rand1 == 2){ $surname = ('Caroletti'); } if($rand1 == 3){ $surname = ('Dicker'); } if($rand1 == 4){ $surname = ('Bale'); } if($rand1 == 5){ $surname = ('Nalogov'); } if($rand1 == 6){ $surname = ('Thompson'); } if($rand1 == 7){ $surname = ('Crybek'); } if($rand1 == 8){ $surname = ('Max'); } if($rand1 == 9){ $surname = ('Smith'); } if($rand1 == 10){ $surname = ('Versetti'); } $nick = ("".$name."_".$surname.""); 95 $p->$this->getAPI()->setNick($p, $nick);