Class StatusList
java.lang.Object
games.stendhal.server.entity.status.StatusList
handles a list of status for an entity
- Author:
- hendrik
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcountStatusByType(StatusType statusType) Count how many occurances of a status are inflicted on the entityGet statuses that are currently inflicted on the entitybooleanhasStatus(StatusType statusType) Find if the entity has a specified statusbooleaninflictStatus(Status status, Entity attacker) Add status effect to entitybooleanisImmune(StatusType statusType) Check if entity is immune to specified status attack.voidremoves a statusvoidremoves all statuses (e.voidremoveAll(StatusType statusType) removes all statuses of this type<T extends Status>
voidremoves all statuses of this classvoidremoveImmunity(StatusType statusType) Remove any immunity of specified status effect from entity.voidsetImmune(StatusType statusType) Make entity immune to a specified status attack.
-
Constructor Details
-
StatusList
StatusList for an entity- Parameters:
entity- RPEntity which has the statuses managed by this list.
-
-
Method Details
-
getStatuses
Get statuses that are currently inflicted on the entity- Returns:
- List of statuses
-
countStatusByType
Count how many occurances of a status are inflicted on the entity- Parameters:
statusType- type of status being checked- Returns:
- number of times status is found
-
removeAll
removes all statuses of this class- Parameters:
statusClass- status class
-
removeAll
removes all statuses of this type- Parameters:
statusType- status type
-
removeAll
public void removeAll()removes all statuses (e. g. on death) -
hasStatus
Find if the entity has a specified status- Parameters:
statusType- the status type to check for- Returns:
- true, if the entity has status; false otherwise
-
inflictStatus
Add status effect to entity- Parameters:
status- Status to be addedattacker- Entity that is inflicting status- Returns:
- true, if the was inflected; false if the RPEntity is immune.
-
isImmune
Check if entity is immune to specified status attack.- Parameters:
statusType- type of status- Returns:
- Entity is immune
-
removeImmunity
Remove any immunity of specified status effect from entity.- Parameters:
statusType- type of status
-
setImmune
Make entity immune to a specified status attack.- Parameters:
statusType- Status type
-
remove
removes a status- Parameters:
status- Status to remove
-