diff --git a/src/plugin/PluginBase.php b/src/plugin/PluginBase.php index 569a122f8..6a6bf18a3 100644 --- a/src/plugin/PluginBase.php +++ b/src/plugin/PluginBase.php @@ -30,7 +30,6 @@ use pocketmine\command\PluginCommand; use pocketmine\lang\KnownTranslationFactory; use pocketmine\scheduler\TaskScheduler; use pocketmine\Server; -use pocketmine\utils\AssumptionFailedError; use pocketmine\utils\Config; use pocketmine\utils\Utils; use Symfony\Component\Filesystem\Path; @@ -231,26 +230,6 @@ abstract class PluginBase implements Plugin, CommandExecutor{ return Path::join($this->getResourceFolder(), $filename); } - /** - * @deprecated Prefer using standard PHP functions with {@link PluginBase::getResourcePath()}, like - * file_get_contents() or fopen(). - * - * Gets an embedded resource on the plugin file. - * WARNING: You must close the resource given using fclose() - * - * @return null|resource Resource data, or null - */ - public function getResource(string $filename){ - $filename = rtrim(str_replace(DIRECTORY_SEPARATOR, "/", $filename), "/"); - if(file_exists($this->resourceFolder . $filename)){ - $resource = fopen($this->resourceFolder . $filename, "rb"); - if($resource === false) throw new AssumptionFailedError("fopen() should not fail on a file which exists"); - return $resource; - } - - return null; - } - /** * Saves an embedded resource to its relative location in the data folder */ diff --git a/src/scheduler/AsyncTask.php b/src/scheduler/AsyncTask.php index ba5cc424c..55d8358e4 100644 --- a/src/scheduler/AsyncTask.php +++ b/src/scheduler/AsyncTask.php @@ -87,13 +87,6 @@ abstract class AsyncTask extends Runnable{ $worker->getNotifier()->wakeupSleeper(); } - /** - * @deprecated - */ - public function isCrashed() : bool{ - return $this->isTerminated(); - } - /** * Returns whether this task has finished executing, whether successfully or not. This differs from isRunning() * because it is not true prior to task execution. @@ -120,20 +113,6 @@ abstract class AsyncTask extends Runnable{ $this->result = is_scalar($result) || is_null($result) || $result instanceof ThreadSafe ? $result : new NonThreadSafeValue($result); } - /** - * @deprecated - */ - public function cancelRun() : void{ - //NOOP - } - - /** - * @deprecated - */ - public function hasCancelledRun() : bool{ - return false; - } - public function setSubmitted() : void{ $this->submitted = true; } @@ -193,13 +172,6 @@ abstract class AsyncTask extends Runnable{ } - /** - * @deprecated No longer used - */ - public function onError() : void{ - - } - /** * Saves mixed data in thread-local storage. Data stored using this storage is **only accessible from the thread it * was stored on**. Data stored using this method will **not** be serialized.