Class ArrestWarrant

All Implemented Interfaces:
Killer, StorableEntity, Cloneable, Iterable<String>, Serializable

public class ArrestWarrant extends Entity implements StorableEntity
are persistent arrest warrant.
Author:
hendrik
  • Field Details

  • Constructor Details

    • ArrestWarrant

      public ArrestWarrant(String criminalName, String policeOfficer, int minutes, String reason)
      Creates an ArrestWarrant.
      Parameters:
      criminalName - name of criminal to be jailed
      policeOfficer - name of police officer who issued the /jail command
      minutes - time of sentence
      reason - reason
    • ArrestWarrant

      public ArrestWarrant(RPObject rpobject)
      creates an ArrestWarrant based on a deserialized RPObject; use the other constructor.
      Parameters:
      rpobject - RPObject
  • Method Details

    • generateRPClass

      public static void generateRPClass()
    • getCriminal

      public String getCriminal()
      Gets the name of the criminal.
      Returns:
      name of criminal
    • isStarted

      public boolean isStarted()
      has the criminal started his jail time?
      Returns:
      true iff started
    • setStarted

      public void setStarted()
      The criminal has started his jail time.
    • getMinutes

      public int getMinutes()
      Returns the time of the sentence.
      Returns:
      time in minutes
    • getPoliceOfficer

      public String getPoliceOfficer()
      Returns the name of the police officer.
      Returns:
      name of player who issued /jail
    • getReason

      public String getReason()
      Returns the reason text.
      Returns:
      reason
    • getTimestamp

      public long getTimestamp()
      Returns the timestamp of the sentence.
      Returns:
      timestamp