Class MessagingUseBehavior
java.lang.Object
games.stendhal.server.entity.item.behavior.MessagingUseBehavior
- All Implemented Interfaces:
UseBehavior
A UseBehavior that can a public and private messages.
-
Constructor Summary
ConstructorDescriptionMessagingUseBehavior(Map<String,String> params)
Create a new MessagingUseBehavior. -
Method Summary
-
Constructor Details
-
MessagingUseBehavior
Create a new MessagingUseBehavior. This constructor is meant for the item XML loader.- Parameters:
params
- map of parameters. The values of "public" and "private" should contain the wanted public and private messages respectively
-
-
Method Details
-
use
Description copied from interface:UseBehavior
Called when the item is used.- Specified by:
use
in interfaceUseBehavior
- Parameters:
user
- entity using the itemitem
- used item- Returns:
true
on successful use,false
on failure
-