Class StatusList
java.lang.Object
games.stendhal.server.entity.status.StatusList
handles a list of status for an entity
- Author:
- hendrik
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
countStatusByType(StatusType statusType)
Count how many occurances of a status are inflicted on the entityGet statuses that are currently inflicted on the entityboolean
hasStatus(StatusType statusType)
Find if the entity has a specified statusboolean
inflictStatus(Status status, Entity attacker)
Add status effect to entityboolean
isImmune(StatusType statusType)
Check if entity is immune to specified status attack.void
removes a statusvoid
removes all statuses (e.void
removeAll(StatusType statusType)
removes all statuses of this type<T extends Status>
voidremoves all statuses of this classvoid
removeImmunity(StatusType statusType)
Remove any immunity of specified status effect from entity.void
setImmune(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
-