Class NPCOwnedChestFactory
java.lang.Object
games.stendhal.server.entity.mapstuff.chest.NPCOwnedChestFactory
- All Implemented Interfaces:
ConfigurableFactory
A factory for
NPCOwnedChest
objects.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreate an NPC owned chest.protected SpeakerNPC
Extract the NPC from a context.
-
Constructor Details
-
NPCOwnedChestFactory
public NPCOwnedChestFactory()
-
-
Method Details
-
getNPC
Extract the NPC from a context.- Parameters:
ctx
- The configuration context.- Returns:
- The NPC.
- Throws:
IllegalArgumentException
- If attribute 'npc' is invalid or missing.
-
create
Create an NPC owned chest.- Specified by:
create
in interfaceConfigurableFactory
- Parameters:
ctx
- Configuration context.- Returns:
- An NPCOwnedChest.
- Throws:
IllegalArgumentException
- If there is a problem with the attributes. The exception message should be a value suitable for meaningful user interpretation.- See Also:
NPCOwnedChest
-