Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Outdated Plague 1.0

Get infected to the virus, and get recovered from the virus

About interface "PlagueVirus":

PHP:
interface PlagueVirus{
/*
@param $obj : Plague object
@param $server : The instanceof PocketMinecraftServer (Old version), MainServer (Lastest version)
*/
public function __construct(Plague $obj$server);
/*
@return int[] : Returns information of how it can be infected
*/
public function getInfectionInfo();
/*
@return string : Returns virus name
*/
public function getVirusName();
/*
@return int : Returns danger level (Can it be easily recovered?)
*/
public function getDangerLevel();
/*
@return int : Returns version of compatible Plague
*/
public function getPlagueVersion();
/*
@param Player $player : Who are infected?
@param int[] $route : Where it did infected?
*/
public function onInfect(Player $player$route);
/*
@param Player $player: Who are infected?
*/
public function onRecover(Player $player);
}

Plague API documentation:

=======================
PUBLIC FIELDS
=======================
PHP:
boolean|PlagueVirus findVirusByName(string $name)
boolean recoverMe(string $iusernamestring $virusName)
boolean checkInfected(string $usernamePlagueVirus $virus)

========================
DEFINED CONSTANTS
========================
ROUTE_WATER : 1
ROUTE_AIR : 2
ROUTE_TOUCH : 3

POSSIBILITY_LOW : 10000
POSSIBILITY_MEDIUM : 8000
POSSIBILITY_HIGH : 3000
POSSIBILITY_VERY_HIGH : 800

DANGER_LOW : 10
DANGER_MEDIUM : 20
DANGER_HIGH : 30


============================
PHP:
boolean|PlagueVirus findVirusByName(string $name)
@param $name : The name of virus which you want to find

@return boolean|PlagueVirus : Returns PlagueVirus. If it didn't found the virus named $name, returns "false"

PHP:
boolean recoverMe(string $iusernamestring $virusName)
@param $iusername : Lowercase of username which preferred to recover
@param $virusName : Name of virus which $iusername preferred to recovered

@return boolean : Returns "true" in success, "false" in failure

PHP:
boolean checkInfected(string $usernamePlagueVirus $virus)
@param $username : Lowercase of username who want to check if it's infected
@param $virus : The $virus of which wants to check if it's infected

@return boolean : Returns "true" if $username has been infected by $virus

==============================
ROUTE_WATER : The route is water of which it can be infected
ROUTE_AIR : The route is air of which it can be infected
ROUTE_TOUCH : The route is touch of which it can be infected

POSSIBILITY_LOW : The possibility of which it can be infected is low.
POSSIBILITY_MEDIUM : The possibility of which it can be infected is medium.
POSSIBILITY_HIGH : The possibility of which it can be infected is high.
POSSIBILITY_VERY_HIGH : The possibility of which it can be infected is very high.

DANGER_LOW : It can be recovered easily.
DANGER_MEDIUM : It can be recovered not easily, but not hard
DANGER_HIGH : It can't be recovered easily
Advertisement