Package org.kikikan.deadbymoonlight.game
Class PerkUser
- java.lang.Object
-
- org.kikikan.deadbymoonlight.game.PerkUser
-
-
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.
-
-
-
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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getGame
public final Game getGame()
-
-