Class PerkUser

  • Direct Known Subclasses:
    Killer, Survivor

    public abstract class PerkUser
    extends java.lang.Object
    The common parts of the Survivors and the Killer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addPoint​(PointCategory category, double amount, java.lang.String reason, boolean instantlySay)
      Adds points to the specified category.
      boolean equals​(java.lang.Object obj)  
      Game getGame()  
      java.util.ArrayList<Perk> getPerkList()
      Gets a copy of the PerkUser's Perk list.
      org.bukkit.entity.Player getPlayer()
      Gets the Player by its UUID.
      org.kikikan.deadbymoonlight.cooldowns.statuseffects.StatusEffect getStatusEffect​(java.lang.String name)
      Searches for the specified Status Effect.
      int hashCode()  
      protected void init()  
      void sendMessage​(java.lang.String message)
      Sends a message.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • addPoint

        public void addPoint​(PointCategory category,
                             double amount,
                             java.lang.String reason,
                             boolean instantlySay)
        Adds points to the specified category.
        Parameters:
        category - The category in which the points will go.
        amount - The amount of points awarded to the Survivor.
        reason - The reason why the PerkUser got the points.
        instantlySay - True if you want the PerkUser to be notified instantly. Use false if you give the points gradually. (repair, self-heal, unlocking etc.)
        Throws:
        java.lang.IllegalArgumentException - If amount is less than 0.
      • init

        protected void init()
      • getPerkList

        public java.util.ArrayList<Perk> getPerkList()
        Gets a copy of the PerkUser's Perk list. However, the Perks inside the list are the same objects.
        Returns:
        Returns a copy of the PerkUser's Perk list.
      • getStatusEffect

        public org.kikikan.deadbymoonlight.cooldowns.statuseffects.StatusEffect getStatusEffect​(java.lang.String name)
        Searches for the specified Status Effect.
        Parameters:
        name - The name of the Status Effect it should search for.
        Returns:
        The cooldown matching the specified type.
        Throws:
        java.lang.IllegalArgumentException - If there is no Status Effect called the argument.
      • sendMessage

        public void sendMessage​(java.lang.String message)
        Sends a message. This makes sure the Player cannot get spammed with the same message.
        Parameters:
        message - The message to send.
      • getPlayer

        public org.bukkit.entity.Player getPlayer()
        Gets the Player by its UUID.
        Returns:
        The Player.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getGame

        public final Game getGame()