mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-08-26 13:09:05 +00:00
Remove unused deprecated stuff
This commit is contained in:
parent
36211a96c1
commit
1ebd7d3960
@ -32,9 +32,6 @@ use pocketmine\nbt\tag\IntTag;
|
||||
use pocketmine\nbt\tag\StringTag;
|
||||
use pocketmine\utils\Binary;
|
||||
use pocketmine\world\World;
|
||||
use function array_pad;
|
||||
use function array_slice;
|
||||
use function explode;
|
||||
use function implode;
|
||||
use function mb_scrub;
|
||||
use function sprintf;
|
||||
@ -60,14 +57,6 @@ class Sign extends Spawnable{
|
||||
public const TAG_WAXED = "IsWaxed"; //TAG_Byte
|
||||
public const TAG_LOCKED_FOR_EDITING_BY = "LockedForEditingBy"; //TAG_Long
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
* @deprecated
|
||||
*/
|
||||
public static function fixTextBlob(string $blob) : array{
|
||||
return array_slice(array_pad(explode("\n", $blob, limit: 5), 4, ""), 0, 4);
|
||||
}
|
||||
|
||||
protected SignText $text;
|
||||
private bool $waxed = false;
|
||||
|
||||
|
@ -102,17 +102,6 @@ class CraftingManager{
|
||||
/** @phpstan-return ObjectSet<\Closure() : void> */
|
||||
public function getRecipeRegisteredCallbacks() : ObjectSet{ return $this->recipeRegisteredCallbacks; }
|
||||
|
||||
/**
|
||||
* Function used to arrange Shapeless Recipe ingredient lists into a consistent order.
|
||||
* @deprecated
|
||||
*/
|
||||
public static function sort(Item $i1, Item $i2) : int{
|
||||
//Use spaceship operator to compare each property, then try the next one if they are equivalent.
|
||||
($retval = $i1->getStateId() <=> $i2->getStateId()) === 0 && ($retval = $i1->getCount() <=> $i2->getCount()) === 0;
|
||||
|
||||
return $retval;
|
||||
}
|
||||
|
||||
private static function hashOutput(Item $output) : string{
|
||||
$write = new BinaryStream();
|
||||
$write->putVarInt($output->getStateId());
|
||||
|
@ -125,24 +125,18 @@ final class Process{
|
||||
return Thread::getRunningCount() + 1; //pmmpthread doesn't count the main thread
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $subprocesses @deprecated
|
||||
*/
|
||||
public static function kill(int $pid, bool $subprocesses = false) : void{
|
||||
public static function kill(int $pid) : void{
|
||||
$logger = \GlobalLogger::get();
|
||||
if($logger instanceof MainLogger){
|
||||
$logger->syncFlushBuffer();
|
||||
}
|
||||
switch(Utils::getOS()){
|
||||
case Utils::OS_WINDOWS:
|
||||
exec("taskkill.exe /F " . ($subprocesses ? "/T " : "") . "/PID $pid > NUL 2> NUL");
|
||||
exec("taskkill.exe /F /PID $pid > NUL 2> NUL");
|
||||
break;
|
||||
case Utils::OS_MACOS:
|
||||
case Utils::OS_LINUX:
|
||||
default:
|
||||
if($subprocesses){
|
||||
$pid = -$pid;
|
||||
}
|
||||
if(function_exists("posix_kill")){
|
||||
posix_kill($pid, 9); //SIGKILL
|
||||
}else{
|
||||
|
@ -165,16 +165,6 @@ final class Utils{
|
||||
return $reflect->getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* @phpstan-return \Closure(object) : object
|
||||
* @deprecated
|
||||
*/
|
||||
public static function cloneCallback() : \Closure{
|
||||
return static function(object $o){
|
||||
return clone $o;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @phpstan-template TKey of array-key
|
||||
* @phpstan-template TValue of object
|
||||
|
Loading…
x
Reference in New Issue
Block a user