Class PersonService

Object
PersonService
All Implemented Interfaces:
PersonsInterface

public class PersonService extends Object implements PersonsInterface
Author:
maartenl
  • Constructor Details

    • PersonService

      @Inject public PersonService(LogService logService)
  • Method Details

    • getPerson

      public Person getPerson(String name)
      Retrieves a person from the pool of all persons. Bear in mind that no automatic filters need apply, nor does the person need to actually be playing the game, and the name lookup is case-insensitive.
      Parameters:
      name - the name of the person.
      Returns:
      a person or null if not found.
    • find

      public Person find(String name)
      Retrieves someone in the game. A bot or someone who is actually active and playing.
      Specified by:
      find in interface PersonsInterface
      Parameters:
      name - the name of the person to lookup.
      Returns:
      a Person or null if not found.
    • getUser

      public User getUser(String name)
      Retrieves a player, may or may not be playing the game. The name lookup is case-insensitive.
      Parameters:
      name - the name of the person.
      Returns:
      a person or null if not found.
    • getActiveUser

      public User getActiveUser(String name)
      Retrieves a player, playing the game. The name lookup is case-insensitive. Is often used for room-overreaching commands like the Who or Tell during play.
      Parameters:
      name - the name of the person.
      Returns:
      a person or null if not found.
    • getActivePlayers

      public List<User> getActivePlayers()
    • sendWall

      public void sendWall(String message)
      Sends a message from an administrator to all players currently playing the game, irrespective of room they are in.
      Parameters:
      message - the message in question.
    • sendChatBubble

      public void sendChatBubble(Person from, String message)
    • sendWall

      public void sendWall(String message, Predicate<User> predicate)
    • deletePerson

      public void deletePerson(Person person)
      Permanently removes a person from the database, including all related items like boardposts and mudmails and the like. Bear this in mind.
      Parameters:
      person - the person to be deleted.
    • setEntityManager

      public void setEntityManager(EntityManager em)