public class WauzCitizenCache
extends java.lang.Object
WauzCitizenSpawner
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<net.jitse.npclib.api.NPC,java.util.Set<org.bukkit.entity.Player>> |
citizenViewersMap
A map of players viewing citizens.
|
Constructor and Description |
---|
WauzCitizenCache() |
Modifier and Type | Method and Description |
---|---|
static void |
markAsHidden(net.jitse.npclib.api.NPC npc,
org.bukkit.entity.Player player)
Marks the given citizen as show for a specific player.
|
static void |
markAsShown(net.jitse.npclib.api.NPC npc,
org.bukkit.entity.Player player)
Marks the given citizen as show for a specific player.
|
static void |
showRandomMessage(WauzCitizen citizen,
java.util.List<org.bukkit.entity.Player> players)
Shows a random citizen message to the given players, if possible.
|
static void |
updateCitizenLookDirections()
Updates the look directions of all cached citizens.
|
private static java.util.Map<net.jitse.npclib.api.NPC,java.util.Set<org.bukkit.entity.Player>> citizenViewersMap
public static void updateCitizenLookDirections()
showRandomMessage(WauzCitizen, List)
public static void showRandomMessage(WauzCitizen citizen, java.util.List<org.bukkit.entity.Player> players)
citizen
- The citizen to send the message.players
- The players who should receive the message.public static void markAsShown(net.jitse.npclib.api.NPC npc, org.bukkit.entity.Player player)
npc
- The citizen npc to set as shown in the cache.player
- The player viewing the citizen.public static void markAsHidden(net.jitse.npclib.api.NPC npc, org.bukkit.entity.Player player)
npc
- The citizen npc to set as hidden in the cache.player
- The player not viewing the citizen anymore.