Class MessagingUseBehavior

java.lang.Object
games.stendhal.server.entity.item.behavior.MessagingUseBehavior
All Implemented Interfaces:
UseBehavior

public class MessagingUseBehavior extends Object implements UseBehavior
A UseBehavior that can a public and private messages.
  • Constructor Details

    • MessagingUseBehavior

      public MessagingUseBehavior(Map<String,​String> params)
      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

      public boolean use(RPEntity user, Item item)
      Description copied from interface: UseBehavior
      Called when the item is used.
      Specified by:
      use in interface UseBehavior
      Parameters:
      user - entity using the item
      item - used item
      Returns:
      true on successful use, false on failure