added isMuted() function to the player object + some adds what a player cant do when muted (use chatmessages like /gg, add map to queue, start a vote...)
This commit is contained in:
@ -317,7 +317,7 @@ class Player {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Player Data
|
||||
* Sets the Player Data and stores it in the Database
|
||||
*
|
||||
* @param mixed $object
|
||||
* @param string $dataName
|
||||
@ -329,6 +329,21 @@ class Player {
|
||||
return $this->maniaControl->getPlayerManager()->getPlayerDataManager()->setPlayerData($object, $dataName, $this, $value, $serverIndex);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if a Player is muted
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isMuted() {
|
||||
$ignoreList = $this->maniaControl->getClient()->getIgnoreList(100, 0);
|
||||
foreach ($ignoreList as $ignoredPlayers) {
|
||||
if ($ignoredPlayers->login === $this->login) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Var_Dump the Player
|
||||
*/
|
||||
|
Reference in New Issue
Block a user