Package org.kikikan.deadbymoonlight.game
Class AuraManager
- java.lang.Object
-
- org.kikikan.deadbymoonlight.game.AuraManager
-
public final class AuraManager extends java.lang.Object
Deals with the Players' Auras. Every PerkUser has an Aura object that determines who they can see, so in a sense the PerkUsers know who they see, not the other way around. A PerkUser sees a Player's Aura if everyAuraRecord
whose Player is equal to the same Player istrue
. If only even oneAuraRecord
isfalse
, the PerkUser is unable to see the Player's Aura. (Player's Aura = The Player having a Glowing Potion Effect in the eyes of the PerkUser.)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAuraGlobally(org.bukkit.entity.Entity entity, Perk perk, boolean value)
Adds anAuraRecord
for every Survivor and the Killer.void
addAuraToPlayer(PerkUser see, org.bukkit.entity.Entity entity, Perk perk, boolean value)
Adds anAuraRecord
to the PerkUser's Aura.void
addAuraToSurvivors(org.bukkit.entity.Entity entity, Perk perk, boolean value)
Adds anAuraRecord
to every Survivor.void
clear()
Sets every Player's visibility to false.void
removeAuraByEntity(PerkUser see, org.bukkit.entity.Entity entity)
void
removeAuraByPerk(PerkUser see, Perk perk)
void
removeAuraFromPlayer(PerkUser see, org.bukkit.entity.Entity entity, Perk perk)
Removes theAuraRecord
that was set by the specified Perk.void
removeAuraFromSurvivors(org.bukkit.entity.Entity entity, Perk perk)
Removes theAuraRecord
from every Survivor.void
removeAuraGlobally(org.bukkit.entity.Entity entity, Perk perk)
Removes anAuraRecord
from every Survivor and the Killer.void
update()
Refreshes every Player's visibility for every Survivor and Killer.
-
-
-
Method Detail
-
addAuraToPlayer
public void addAuraToPlayer(PerkUser see, org.bukkit.entity.Entity entity, Perk perk, boolean value)
Adds anAuraRecord
to the PerkUser's Aura.- Parameters:
see
- The PerkUser who wishes to see (or to not see) the Player.entity
- The Player who will (or will not) be visible to the PerkUser.perk
- The Perk which created theAuraRecord
.value
- True, if the PerkUser should see the Player.
-
removeAuraFromPlayer
public void removeAuraFromPlayer(PerkUser see, org.bukkit.entity.Entity entity, Perk perk)
Removes theAuraRecord
that was set by the specified Perk.- Parameters:
see
- The PerkUser whose Aura should be changed.entity
- The Player who will (or will not) be visible to the PerkUser.perk
- The Perk which created theAuraRecord
.
-
addAuraToSurvivors
public void addAuraToSurvivors(org.bukkit.entity.Entity entity, Perk perk, boolean value)
Adds anAuraRecord
to every Survivor.- Parameters:
entity
- The Player who will (or will not) be visible to the Survivors.perk
- The Perk which created theAuraRecord
.value
- True, if the Survivors should see the Player.
-
removeAuraFromSurvivors
public void removeAuraFromSurvivors(org.bukkit.entity.Entity entity, Perk perk)
Removes theAuraRecord
from every Survivor.- Parameters:
entity
- The Player who will (or will not) be visible to the Survivors.perk
- The Perk which created theAuraRecord
.
-
addAuraGlobally
public void addAuraGlobally(org.bukkit.entity.Entity entity, Perk perk, boolean value)
Adds anAuraRecord
for every Survivor and the Killer.- Parameters:
entity
- The Player who will (or will not) be visible to the Survivors and the Killer.perk
- The Perk which created theAuraRecord
.value
- True, if the Survivors and the Killer should see the Player.
-
removeAuraGlobally
public void removeAuraGlobally(org.bukkit.entity.Entity entity, Perk perk)
Removes anAuraRecord
from every Survivor and the Killer.- Parameters:
entity
- The Player who will (or will not) be visible to the Survivors and the Killer.perk
- The Perk which created theAuraRecord
.
-
removeAuraByEntity
public void removeAuraByEntity(PerkUser see, org.bukkit.entity.Entity entity)
-
update
public void update()
Refreshes every Player's visibility for every Survivor and Killer.
-
clear
public void clear()
Sets every Player's visibility to false. However, theAuraRecord
s won't be deleted so if they still exist, their visibility will be set to true again when theupdate()
method is called, or when a change occurs to theAuraRecord
s.
-
-