Class RemoveObjective
java.lang.Object
com.csse3200.game.components.collectables.effects.RemoveObjective
- All Implemented Interfaces:
ItemEffectHandler
Effect handler that removes a specific objective from the OBJECTIVES bag
if it exists in the player's inventory.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanapply(Entity player, EffectConfig cfg) Removes the specified objective from the player's OBJECTIVES bag.
-
Constructor Details
-
RemoveObjective
public RemoveObjective()
-
-
Method Details
-
apply
Removes the specified objective from the player's OBJECTIVES bag.- Specified by:
applyin interfaceItemEffectHandler- Parameters:
player- the entity whose inventory should be modifiedcfg- the effect configuration containing thetargetobjective ID- Returns:
trueif execution was valid (even if the item did not exist),falseif the player or config was invalid
-