From c102477f91b27da7ef1ec8f67b2fac5fb8deab37 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 28 Nov 2020 21:16:04 +0000 Subject: [PATCH] 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. --- src/player/OfflinePlayer.php | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/player/OfflinePlayer.php b/src/player/OfflinePlayer.php index 8aa42c9988..a91ae87429 100644 --- a/src/player/OfflinePlayer.php +++ b/src/player/OfflinePlayer.php @@ -50,26 +50,6 @@ class OfflinePlayer implements IPlayer{ 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{ return $this->server->getPlayerExact($this->name); }