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 voidaddPPlayer(PPlayer pplayer)Adds a PPlayer to the loaded mapvoiddisable()Cleans up the Manager's resourcesvoiddisplayParticles(PPlayer pplayer, org.bukkit.World world, ParticlePair particle, java.util.List<PParticle> particles, boolean isLongRange)An alternative method used for event stylesvoiddisplayParticles(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 loadedNoteColorgetRainbowNoteParticleColor()Gets the rainbow NoteColor for particle spawning with data 'rainbow'OrdinaryColorgetRainbowParticleColor()Gets the rainbow OrdinaryColor for particle spawning with data 'rainbow'NoteColorgetRandomNoteParticleColor()Gets a randomized NoteColor for particle spawning with data 'random'OrdinaryColorgetRandomParticleColor()Gets a randomized OrdinaryColor for particle spawning with data 'random'OrdinaryColorgetShiftedRainbowParticleColor()Gets the rainbow OrdinaryColor for particle spawning with data 'rainbow', shifted half way through the HSB spectrumvoidonPlayerJoin(org.bukkit.event.player.PlayerJoinEvent e)Adds the player to the array when they joinvoidonPlayerQuit(org.bukkit.event.player.PlayerQuitEvent e)Removes the player from the array when they log offvoidreload()Reloads the Manager's settingsvoidrun()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:ManagerReloads the Manager's settings -
disable
public void disable()Description copied from class:ManagerCleans 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:
runin 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'
-