Class ParticleManager
java.lang.Object
dev.esophose.playerparticles.manager.Manager
dev.esophose.playerparticles.manager.ParticleManager
- All Implemented Interfaces:
java.lang.Runnable
,org.bukkit.event.Listener
public class ParticleManager extends Manager implements org.bukkit.event.Listener, java.lang.Runnable
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ParticleManager(PlayerParticles playerParticles)
-
Method Summary
Modifier and Type Method Description void
addPPlayer(PPlayer pplayer)
Adds a PPlayer to the loaded mapvoid
disable()
Cleans up the Manager's resourcesvoid
displayParticles(PPlayer pplayer, org.bukkit.World world, ParticlePair particle, java.util.List<PParticle> particles, boolean isLongRange)
An alternative method used for event stylesvoid
displayParticles(PPlayer pplayer, org.bukkit.World world, ParticlePair particle, java.util.List<PParticle> particles, boolean isLongRange, boolean ignorePlayerState)
An alternative method used for event stylesjava.util.Map<java.util.UUID,PPlayer>
getPPlayers()
Gets the PPlayers that are loadedNoteColor
getRainbowNoteParticleColor()
Gets the rainbow NoteColor for particle spawning with data 'rainbow'OrdinaryColor
getRainbowParticleColor()
Gets the rainbow OrdinaryColor for particle spawning with data 'rainbow'NoteColor
getRandomNoteParticleColor()
Gets a randomized NoteColor for particle spawning with data 'random'OrdinaryColor
getRandomParticleColor()
Gets a randomized OrdinaryColor for particle spawning with data 'random'OrdinaryColor
getShiftedRainbowParticleColor()
Gets the rainbow OrdinaryColor for particle spawning with data 'rainbow', shifted half way through the HSB spectrumvoid
onPlayerJoin(org.bukkit.event.player.PlayerJoinEvent e)
Adds the player to the array when they joinvoid
onPlayerQuit(org.bukkit.event.player.PlayerQuitEvent e)
Removes the player from the array when they log offvoid
reload()
Reloads the Manager's settingsvoid
run()
The main loop to display all the particles Does not display particles if the world is disabled or if the player is in spectator mode
-
Constructor Details
-
Method Details
-
reload
public void reload()Description copied from class:Manager
Reloads the Manager's settings -
disable
public void disable()Description copied from class:Manager
Cleans up the Manager's resources -
onPlayerJoin
public void onPlayerJoin(org.bukkit.event.player.PlayerJoinEvent e)Adds the player to the array when they join- Parameters:
e
- The event
-
onPlayerQuit
public void onPlayerQuit(org.bukkit.event.player.PlayerQuitEvent e)Removes the player from the array when they log off- Parameters:
e
- The event
-
getPPlayers
Gets the PPlayers that are loaded- Returns:
- The loaded PPlayers
-
addPPlayer
Adds a PPlayer to the loaded map- Parameters:
pplayer
- The PPlayer to add
-
run
public void run()The main loop to display all the particles Does not display particles if the world is disabled or if the player is in spectator mode- Specified by:
run
in interfacejava.lang.Runnable
-
displayParticles
public void displayParticles(PPlayer pplayer, org.bukkit.World world, ParticlePair particle, java.util.List<PParticle> particles, boolean isLongRange)An alternative method used for event styles- Parameters:
pplayer
- The PPlayer the particles are spawning from, nullable for special casesworld
- The world the particles are spawning inparticle
- The ParticlePair to use for getting particle settingsparticles
- The particles to displayisLongRange
- If the particle can be viewed from long range
-
displayParticles
public void displayParticles(PPlayer pplayer, org.bukkit.World world, ParticlePair particle, java.util.List<PParticle> particles, boolean isLongRange, boolean ignorePlayerState)An alternative method used for event styles- Parameters:
pplayer
- The PPlayer the particles are spawning from, nullable for special casesworld
- The world the particles are spawning inparticle
- The ParticlePair to use for getting particle settingsparticles
- The particles to displayisLongRange
- If the particle can be viewed from long rangeignorePlayerState
- If the player's visibility state should be ignored
-
getRainbowParticleColor
Gets the rainbow OrdinaryColor for particle spawning with data 'rainbow'- Returns:
- The rainbow OrdinaryColor for particle spawning with data 'rainbow'
-
getShiftedRainbowParticleColor
Gets the rainbow OrdinaryColor for particle spawning with data 'rainbow', shifted half way through the HSB spectrum- Returns:
- The rainbow OrdinaryColor for particle spawning with data 'rainbow', shifted half way through the HSB spectrum
-
getRainbowNoteParticleColor
Gets the rainbow NoteColor for particle spawning with data 'rainbow'- Returns:
- The rainbow NoteColor for particle spawning with data 'rainbow'
-
getRandomParticleColor
Gets a randomized OrdinaryColor for particle spawning with data 'random'- Returns:
- A randomized OrdinaryColor for particle spawning with data 'random'
-
getRandomNoteParticleColor
Gets a randomized NoteColor for particle spawning with data 'random'- Returns:
- A randomized NoteColor for particle spawning with data 'random'
-