OfflinePlayer: remove more useless junk

to obtain an OfflinePlayer instance you had to have a server instance to start with, which means getServer() is pointless, and also that isOp() and setOp() (which can be removed thanks to the fact that OfflinePlayer is not a Permissible) can be done by just asking the server.
This commit is contained in:
Dylan K. Taylor 2020-11-28 21:16:04 +00:00
parent 3e9a37ca77
commit c102477f91

View File

@ -50,26 +50,6 @@ class OfflinePlayer implements IPlayer{
return $this->name; return $this->name;
} }
public function getServer() : Server{
return $this->server;
}
public function isOp() : bool{
return $this->server->isOp($this->name);
}
public function setOp(bool $value) : void{
if($value === $this->isOp()){
return;
}
if($value){
$this->server->addOp($this->name);
}else{
$this->server->removeOp($this->name);
}
}
public function getPlayer() : ?Player{ public function getPlayer() : ?Player{
return $this->server->getPlayerExact($this->name); return $this->server->getPlayerExact($this->name);
} }