mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Remove deprecated functions for 4.0.0
If any moron starts complaining that their plugins broke, tell them to use 3.x... thanks
This commit is contained in:
parent
4e8a256a53
commit
62cb7963dc
@ -32,8 +32,6 @@ use pocketmine\event\Listener;
|
||||
use pocketmine\event\plugin\PluginDisableEvent;
|
||||
use pocketmine\event\plugin\PluginEnableEvent;
|
||||
use pocketmine\network\mcpe\protocol\ProtocolInfo;
|
||||
use pocketmine\permission\Permissible;
|
||||
use pocketmine\permission\Permission;
|
||||
use pocketmine\permission\PermissionManager;
|
||||
use pocketmine\Server;
|
||||
use pocketmine\timings\TimingsHandler;
|
||||
@ -396,140 +394,6 @@ class PluginManager{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see PermissionManager::getPermission()
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return null|Permission
|
||||
*/
|
||||
public function getPermission(string $name){
|
||||
return PermissionManager::getInstance()->getPermission($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see PermissionManager::addPermission()
|
||||
*
|
||||
* @param Permission $permission
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function addPermission(Permission $permission) : bool{
|
||||
return PermissionManager::getInstance()->addPermission($permission);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see PermissionManager::removePermission()
|
||||
*
|
||||
* @param string|Permission $permission
|
||||
*/
|
||||
public function removePermission($permission){
|
||||
PermissionManager::getInstance()->removePermission($permission);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see PermissionManager::getDefaultPermissions()
|
||||
*
|
||||
* @param bool $op
|
||||
*
|
||||
* @return Permission[]
|
||||
*/
|
||||
public function getDefaultPermissions(bool $op) : array{
|
||||
return PermissionManager::getInstance()->getDefaultPermissions($op);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see PermissionManager::recalculatePermissionDefaults()
|
||||
*
|
||||
* @param Permission $permission
|
||||
*/
|
||||
public function recalculatePermissionDefaults(Permission $permission){
|
||||
PermissionManager::getInstance()->recalculatePermissionDefaults($permission);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see PermissionManager::subscribeToPermission()
|
||||
*
|
||||
* @param string $permission
|
||||
* @param Permissible $permissible
|
||||
*/
|
||||
public function subscribeToPermission(string $permission, Permissible $permissible){
|
||||
PermissionManager::getInstance()->subscribeToPermission($permission, $permissible);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see PermissionManager::unsubscribeFromPermission()
|
||||
*
|
||||
* @param string $permission
|
||||
* @param Permissible $permissible
|
||||
*/
|
||||
public function unsubscribeFromPermission(string $permission, Permissible $permissible){
|
||||
PermissionManager::getInstance()->unsubscribeFromPermission($permission, $permissible);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see PermissionManager::getPermissionSubscriptions()
|
||||
*
|
||||
* @param string $permission
|
||||
*
|
||||
* @return array|Permissible[]
|
||||
*/
|
||||
public function getPermissionSubscriptions(string $permission) : array{
|
||||
return PermissionManager::getInstance()->getPermissionSubscriptions($permission);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see PermissionManager::subscribeToDefaultPerms()
|
||||
*
|
||||
* @param bool $op
|
||||
* @param Permissible $permissible
|
||||
*/
|
||||
public function subscribeToDefaultPerms(bool $op, Permissible $permissible){
|
||||
PermissionManager::getInstance()->subscribeToDefaultPerms($op, $permissible);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see PermissionManager::unsubscribeFromDefaultPerms()
|
||||
*
|
||||
* @param bool $op
|
||||
* @param Permissible $permissible
|
||||
*/
|
||||
public function unsubscribeFromDefaultPerms(bool $op, Permissible $permissible){
|
||||
PermissionManager::getInstance()->unsubscribeFromDefaultPerms($op, $permissible);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see PermissionManager::getDefaultPermSubscriptions()
|
||||
*
|
||||
* @param bool $op
|
||||
*
|
||||
* @return Permissible[]
|
||||
*/
|
||||
public function getDefaultPermSubscriptions(bool $op) : array{
|
||||
return PermissionManager::getInstance()->getDefaultPermSubscriptions($op);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see PermissionManager::getPermissions()
|
||||
*
|
||||
* @return Permission[]
|
||||
*/
|
||||
public function getPermissions() : array{
|
||||
return PermissionManager::getInstance()->getPermissions();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Plugin $plugin
|
||||
*
|
||||
|
@ -120,18 +120,6 @@ class Utils{
|
||||
return $uuid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see Internet::getIP()
|
||||
*
|
||||
* @param bool $force default false, force IP check even when cached
|
||||
*
|
||||
* @return string|bool
|
||||
*/
|
||||
public static function getIP(bool $force = false){
|
||||
return Internet::getIP($force);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current Operating System
|
||||
* Windows => win
|
||||
@ -330,59 +318,6 @@ class Utils{
|
||||
return array("yaw" => $hAngle, "pitch" => $vAngle);
|
||||
}*/
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see Internet::getURL()
|
||||
*
|
||||
* @param string $page
|
||||
* @param int $timeout default 10
|
||||
* @param array $extraHeaders
|
||||
* @param string &$err Will be set to the output of curl_error(). Use this to retrieve errors that occured during the operation.
|
||||
* @param array[] &$headers
|
||||
* @param int &$httpCode
|
||||
*
|
||||
* @return bool|mixed false if an error occurred, mixed data if successful.
|
||||
*/
|
||||
public static function getURL(string $page, int $timeout = 10, array $extraHeaders = [], &$err = null, &$headers = null, &$httpCode = null){
|
||||
return Internet::getURL($page, $timeout, $extraHeaders, $err, $headers, $httpCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see Internet::postURL()
|
||||
*
|
||||
* @param string $page
|
||||
* @param array|string $args
|
||||
* @param int $timeout
|
||||
* @param array $extraHeaders
|
||||
* @param string &$err Will be set to the output of curl_error(). Use this to retrieve errors that occured during the operation.
|
||||
* @param array[] &$headers
|
||||
* @param int &$httpCode
|
||||
*
|
||||
* @return bool|mixed false if an error occurred, mixed data if successful.
|
||||
*/
|
||||
public static function postURL(string $page, $args, int $timeout = 10, array $extraHeaders = [], &$err = null, &$headers = null, &$httpCode = null){
|
||||
return Internet::postURL($page, $args, $timeout, $extraHeaders, $err, $headers, $httpCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see Internet::simpleCurl()
|
||||
*
|
||||
* @param string $page
|
||||
* @param float|int $timeout The maximum connect timeout and timeout in seconds, correct to ms.
|
||||
* @param string[] $extraHeaders extra headers to send as a plain string array
|
||||
* @param array $extraOpts extra CURLOPT_* to set as an [opt => value] map
|
||||
* @param callable|null $onSuccess function to be called if there is no error. Accepts a resource argument as the cURL handle.
|
||||
*
|
||||
* @return array a plain array of three [result body : string, headers : array[], HTTP response code : int]. Headers are grouped by requests with strtolower(header name) as keys and header value as values
|
||||
*
|
||||
* @throws \RuntimeException if a cURL error occurs
|
||||
*/
|
||||
public static function simpleCurl(string $page, $timeout = 10, array $extraHeaders = [], array $extraOpts = [], callable $onSuccess = null){
|
||||
return Internet::simpleCurl($page, $timeout, $extraHeaders, $extraOpts, $onSuccess);
|
||||
}
|
||||
|
||||
public static function javaStringHash(string $string) : int{
|
||||
$hash = 0;
|
||||
for($i = 0, $len = strlen($string); $i < $len; $i++){
|
||||
|
Loading…
x
Reference in New Issue
Block a user