Interface AttributeWrangler

All Known Implementing Classes:
Administrator, Bot, Item, Mob, NormalItem, Person, Room, Shopkeeper, ShopkeeperList, User

public interface AttributeWrangler
Interface on what is allowed to be done with attributes.
Author:
maartenl
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves an attribute, returns null if not found.
    boolean
    Removes an attribute by name.
    void
    setAttribute(String name, String value)
    Set the value of the attribute, creates the attribute if the attribute does not exist.
    boolean
    Verify if the attribute exists, and has the proper value.
  • Method Details

    • removeAttribute

      boolean removeAttribute(String name)
      Removes an attribute by name.
      Parameters:
      name - the name of the attribute, for example "guildwish".
      Returns:
      false if not found, true if removed.
    • getAttribute

      Attribute getAttribute(String name)
      Retrieves an attribute, returns null if not found.
      Parameters:
      name - the name of the attribute
      Returns:
      an attribute
    • setAttribute

      void setAttribute(String name, String value)
      Set the value of the attribute, creates the attribute if the attribute does not exist.
      Parameters:
      name - the name of the attribute
      value - the value of the attribute
    • verifyAttribute

      boolean verifyAttribute(String name, String value)
      Verify if the attribute exists, and has the proper value.
      Parameters:
      name - the name of the attribute
      value - the value of the attribute
      Returns:
      true if it exists, false otherwise.