Package org.kikikan.deadbymoonlight.game
Class Killer
- java.lang.Object
-
- org.kikikan.deadbymoonlight.game.PerkUser
-
- org.kikikan.deadbymoonlight.game.Killer
-
public final class Killer extends PerkUser
Represents the Killer.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
alert(KillerAlertReason reason, org.bukkit.Location location)
Runs GetKillerAlertEvent with the specified reason.void
alert(KillerAlertReason reason, org.bukkit.Location location, Survivor survivor)
Runs GetKillerAlertEvent with the specified reason and Survivor.void
dropSurvivor(boolean setToInjured)
Drops the Survivor if the Killer is carrying one.java.util.Optional<Survivor>
getCarriedSurvivor()
Returns the Survivor who is currently being carried by the Killer.java.util.List<Survivor>
getSurvivorsInTerrorRadius()
Gets the alive Survivors who are in the Killer's Terror Radius.boolean
isCarrying()
Checks if the Killer is carrying a Survivor.boolean
isInTerrorRadius(org.bukkit.Location location)
Checks if the specified Location is in the Killer's Terror Radius.void
kick(Generator generator)
void
resetKick()
-
Methods inherited from class org.kikikan.deadbymoonlight.game.PerkUser
addPoint, equals, getGame, getPerkList, getPlayer, getStatusEffect, hashCode, init, sendMessage
-
-
-
-
Method Detail
-
isInTerrorRadius
public boolean isInTerrorRadius(org.bukkit.Location location)
Checks if the specified Location is in the Killer's Terror Radius.- Parameters:
location
- The Location in the world.- Returns:
- True if the Location is in the Killer's Terror Radius.
-
alert
public void alert(KillerAlertReason reason, org.bukkit.Location location, Survivor survivor)
Runs GetKillerAlertEvent with the specified reason and Survivor. If the event was not cancelled, alerts the Killer at the specified location.- Parameters:
reason
- The reason why the Alert was raised.location
- The Location the explosion will be heard from and where the trail will lead the Player.survivor
- The Survivor who raised the Alert.
-
alert
public void alert(KillerAlertReason reason, org.bukkit.Location location)
Runs GetKillerAlertEvent with the specified reason. If the event was not cancelled, alerts the Killer at the specified location.- Parameters:
reason
- The reason why the Alert was raised.location
- The Location the explosion will be heard from and where the trail will lead the Player.
-
dropSurvivor
public void dropSurvivor(boolean setToInjured)
Drops the Survivor if the Killer is carrying one.- Parameters:
setToInjured
- True if the Survivor should be in the Injured state, false if the Survivor should be in the Dying state.
-
kick
public void kick(Generator generator)
-
resetKick
public void resetKick()
-
getSurvivorsInTerrorRadius
public java.util.List<Survivor> getSurvivorsInTerrorRadius()
Gets the alive Survivors who are in the Killer's Terror Radius.- Returns:
- The List of the living Survivors who are in the Killer's Terror Radius.
-
isCarrying
public boolean isCarrying()
Checks if the Killer is carrying a Survivor.- Returns:
- True if the Killer is carrying a Survivor.
-
getCarriedSurvivor
public java.util.Optional<Survivor> getCarriedSurvivor()
Returns the Survivor who is currently being carried by the Killer.- Returns:
- Null, if the Killer is not carrying a Survivor.
-
-