Package dev.esophose.playerparticles.api
Class PlayerParticlesAPI
java.lang.Object
dev.esophose.playerparticles.api.PlayerParticlesAPI
public final class PlayerParticlesAPI
extends java.lang.Object
The API for the PlayerParticles plugin.
Used to manipulate a player's particles and data.
Note: This API will bypass all permissions and does not send any messages.
Any changes made through the API will be saved to the database automatically.
-
Method Summary
Modifier and Type Method Description @Nullable ParticlePair
addActivePlayerParticle(@NotNull org.bukkit.entity.Player player, @NotNull ParticleEffect effect, @NotNull ParticleStyle style)
Adds an active particle to a Player's particles@Nullable ParticlePair
addActivePlayerParticle(@NotNull org.bukkit.entity.Player player, @NotNull ParticleEffect effect, @NotNull ParticleStyle style, @NotNull ColorTransition colorTransitionData)
Adds an active particle to a Player's particles@Nullable ParticlePair
addActivePlayerParticle(@NotNull org.bukkit.entity.Player player, @NotNull ParticleEffect effect, @NotNull ParticleStyle style, @NotNull NoteColor noteColorData)
Adds an active particle to a Player's particles@Nullable ParticlePair
addActivePlayerParticle(@NotNull org.bukkit.entity.Player player, @NotNull ParticleEffect effect, @NotNull ParticleStyle style, @NotNull OrdinaryColor colorData)
Adds an active particle to a Player's particles@Nullable ParticlePair
addActivePlayerParticle(@NotNull org.bukkit.entity.Player player, @NotNull ParticleEffect effect, @NotNull ParticleStyle style, @NotNull Vibration vibrationData)
Adds an active particle to a Player's particles@Nullable ParticlePair
addActivePlayerParticle(@NotNull org.bukkit.entity.Player player, @NotNull ParticleEffect effect, @NotNull ParticleStyle style, @NotNull org.bukkit.Material materialData)
Adds an active particle to a Player's particles@Nullable ParticlePair
addActivePlayerParticle(@NotNull org.bukkit.entity.Player player, @NotNull ParticlePair particle)
Adds an active particle to a Player's particles@Nullable FixedParticleEffect
createFixedParticleEffect(@NotNull org.bukkit.command.CommandSender sender, @NotNull FixedParticleEffect fixedEffect)
Creates a fixed particle effect for a player@Nullable FixedParticleEffect
createFixedParticleEffect(@NotNull org.bukkit.command.CommandSender sender, @NotNull org.bukkit.Location location, @NotNull ParticleEffect effect, @NotNull ParticleStyle style)
Creates a fixed particle effect for a player@Nullable FixedParticleEffect
createFixedParticleEffect(@NotNull org.bukkit.command.CommandSender sender, @NotNull org.bukkit.Location location, @NotNull ParticleEffect effect, @NotNull ParticleStyle style, @NotNull ColorTransition colorTransitionData)
Creates a fixed particle effect for a player@Nullable FixedParticleEffect
createFixedParticleEffect(@NotNull org.bukkit.command.CommandSender sender, @NotNull org.bukkit.Location location, @NotNull ParticleEffect effect, @NotNull ParticleStyle style, @NotNull NoteColor noteColorData)
Creates a fixed particle effect for a player@Nullable FixedParticleEffect
createFixedParticleEffect(@NotNull org.bukkit.command.CommandSender sender, @NotNull org.bukkit.Location location, @NotNull ParticleEffect effect, @NotNull ParticleStyle style, @NotNull OrdinaryColor colorData)
Creates a fixed particle effect for a player@Nullable FixedParticleEffect
createFixedParticleEffect(@NotNull org.bukkit.command.CommandSender sender, @NotNull org.bukkit.Location location, @NotNull ParticleEffect effect, @NotNull ParticleStyle style, @NotNull Vibration vibrationData)
Creates a fixed particle effect for a player@Nullable FixedParticleEffect
createFixedParticleEffect(@NotNull org.bukkit.command.CommandSender sender, @NotNull org.bukkit.Location location, @NotNull ParticleEffect effect, @NotNull ParticleStyle style, @NotNull org.bukkit.Material materialData)
Creates a fixed particle effect for a player@Nullable FixedParticleEffect
createFixedParticleEffect(@NotNull org.bukkit.command.CommandSender sender, @NotNull org.bukkit.Location location, @NotNull ParticlePair particle)
Creates a fixed particle effect for a player@Nullable ParticlePair
editActivePlayerParticle(@NotNull org.bukkit.entity.Player player, int id, @NotNull NoteColor noteColorData)
Edits an active particle of a Player@Nullable ParticlePair
editActivePlayerParticle(@NotNull org.bukkit.entity.Player player, int id, @NotNull OrdinaryColor colorData)
Edits an active particle of a Player@Nullable ParticlePair
editActivePlayerParticle(@NotNull org.bukkit.entity.Player player, int id, @NotNull ParticleEffect effect)
Edits an active particle of a Player@Nullable ParticlePair
editActivePlayerParticle(@NotNull org.bukkit.entity.Player player, int id, @NotNull ParticleStyle style)
Edits an active particle of a Player@Nullable ParticlePair
editActivePlayerParticle(@NotNull org.bukkit.entity.Player player, int id, @NotNull org.bukkit.Material materialData)
Edits an active particle of a Player@Nullable FixedParticleEffect
editFixedParticleEffect(@NotNull org.bukkit.command.CommandSender sender, int id, @NotNull NoteColor noteColorData)
Edits a fixed particle effect for a player@Nullable FixedParticleEffect
editFixedParticleEffect(@NotNull org.bukkit.command.CommandSender sender, int id, @NotNull OrdinaryColor colorData)
Edits a fixed particle effect for a player@Nullable FixedParticleEffect
editFixedParticleEffect(@NotNull org.bukkit.command.CommandSender sender, int id, @NotNull ParticleEffect effect)
Edits a fixed particle effect for a player@Nullable FixedParticleEffect
editFixedParticleEffect(@NotNull org.bukkit.command.CommandSender sender, int id, @NotNull ParticleStyle style)
Edits a fixed particle effect for a player@Nullable FixedParticleEffect
editFixedParticleEffect(@NotNull org.bukkit.command.CommandSender sender, int id, @NotNull org.bukkit.Location location)
Edits a fixed particle effect for a player@Nullable FixedParticleEffect
editFixedParticleEffect(@NotNull org.bukkit.command.CommandSender sender, int id, @NotNull org.bukkit.Material materialData)
Edits a fixed particle effect for a playerFixedParticleEffect
editFixedParticleEffect(@NotNull org.bukkit.command.CommandSender sender, @NotNull FixedParticleEffect fixedEffect)
Edits a fixed particle effect for a player@Nullable ParticlePair
getActivePlayerParticle(@NotNull org.bukkit.entity.Player player, int id)
Gets an active particle from a player@NotNull java.util.Collection<ParticlePair>
getActivePlayerParticles(@NotNull org.bukkit.entity.Player player)
Gets all active particles from a player@Nullable PPlayer
getConsolePPlayer()
Gets the PPlayer representing the console@Nullable FixedParticleEffect
getFixedParticleEffect(@NotNull org.bukkit.command.CommandSender sender, int id)
Gets a fixed particle effect for a player@NotNull java.util.Collection<FixedParticleEffect>
getFixedParticleEffects(@NotNull org.bukkit.command.CommandSender sender)
Gets a collection of a player's fixed particle effectsstatic @NotNull PlayerParticlesAPI
getInstance()
@NotNull java.util.Collection<ParticleGroup>
getPlayerParticleGroups(@NotNull org.bukkit.entity.Player player)
Gets a collection of the player's particle groups@Nullable PPlayer
getPPlayer(@NotNull java.util.UUID uuid)
Gets a PPlayer from their UUID@Nullable PPlayer
getPPlayer(@NotNull org.bukkit.command.CommandSender sender)
Gets a PPlayer from a CommandSender@Nullable PPlayer
getPPlayer(@NotNull org.bukkit.entity.Player player)
Gets a PPlayer from a Player@NotNull java.lang.String
getVersion()
void
openParticlesGui(@NotNull org.bukkit.entity.Player player)
Opens the particles gui for a player@Nullable ParticlePair
removeActivePlayerParticle(@NotNull org.bukkit.entity.Player player, int id)
Removes an active particle from a player by ID@Nullable java.util.Set<ParticlePair>
removeActivePlayerParticles(@NotNull org.bukkit.entity.Player player, @NotNull ParticleEffect effect)
Removes active particles from a player by effect@Nullable java.util.Set<ParticlePair>
removeActivePlayerParticles(@NotNull org.bukkit.entity.Player player, @NotNull ParticleStyle style)
Removes active particles from a player by style@Nullable FixedParticleEffect
removeFixedEffect(@NotNull org.bukkit.command.CommandSender sender, int id)
Removes a fixed particle effect from a playerint
removeFixedEffectsInRange(@NotNull org.bukkit.Location location, double radius)
Removes fixed effects within a given radius of a location@Nullable ParticleGroup
removePlayerParticleGroup(@NotNull org.bukkit.entity.Player player, @NotNull ParticleGroup particleGroup)
Removes a particle group from a player@Nullable ParticleGroup
removePlayerParticleGroup(@NotNull org.bukkit.entity.Player player, @NotNull java.lang.String groupName)
Removes a particle group from a playervoid
resetActivePlayerParticles(@NotNull java.lang.String playerName, @Nullable java.util.function.Consumer<java.lang.Boolean> successConsumer)
Attempts to reset the active particles for the given player name.@Nullable java.lang.Integer
resetActivePlayerParticles(@NotNull org.bukkit.entity.Player player)
Removes all active particles from a player@Nullable ParticleGroup
savePlayerParticleGroup(@NotNull org.bukkit.entity.Player player, @NotNull ParticleGroup particleGroup)
Saves a particle group to a player or edits an existing one@Nullable ParticleGroup
savePlayerParticleGroup(@NotNull org.bukkit.entity.Player player, @NotNull java.lang.String groupName, @NotNull java.util.Collection<ParticlePair> particles)
Saves a particle group to a player or edits an existing onevoid
togglePlayerParticleSelfVisibility(@NotNull org.bukkit.entity.Player player, boolean particlesHidden)
Toggles a player's particle visibility for their own particles on/offvoid
togglePlayerParticleVisibility(@NotNull org.bukkit.entity.Player player, boolean particlesHidden)
Toggles a player's particle visibility on/off
-
Method Details
-
getInstance
- Returns:
- the instance of the PlayerParticlesAPI
-
getVersion
@NotNull public @NotNull java.lang.String getVersion()- Returns:
- the currently installed version of the plugin
-
getPPlayer
Gets a PPlayer from their UUID- Parameters:
uuid
- The UUID of the PPlayer- Returns:
- The PPlayer, or null if not found
-
getPPlayer
Gets a PPlayer from a Player- Parameters:
player
- The Player- Returns:
- The PPlayer, or null if not found
-
getPPlayer
@Nullable public @Nullable PPlayer getPPlayer(@NotNull @NotNull org.bukkit.command.CommandSender sender)Gets a PPlayer from a CommandSender- Parameters:
sender
- The CommandSender, either a Player or ConsoleCommandSender- Returns:
- The PPlayer, or null if not found
-
getConsolePPlayer
Gets the PPlayer representing the console- Returns:
- The PPlayer, or null if not found
-
addActivePlayerParticle
@Nullable public @Nullable ParticlePair addActivePlayerParticle(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull ParticlePair particle)Adds an active particle to a Player's particles- Parameters:
player
- The player to add toparticle
- The particle to add- Returns:
- The ParticlePair that was added or null if failed
-
addActivePlayerParticle
@Nullable public @Nullable ParticlePair addActivePlayerParticle(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull ParticleEffect effect, @NotNull @NotNull ParticleStyle style)Adds an active particle to a Player's particles- Parameters:
player
- The player to add toeffect
- The effect of the particlestyle
- The style of the particle- Returns:
- The ParticlePair that was added or null if failed
-
addActivePlayerParticle
@Nullable public @Nullable ParticlePair addActivePlayerParticle(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull ParticleEffect effect, @NotNull @NotNull ParticleStyle style, @NotNull @NotNull OrdinaryColor colorData)Adds an active particle to a Player's particles- Parameters:
player
- The player to add toeffect
- The effect of the particlestyle
- The style of the particlecolorData
- The color data of the particle.- Returns:
- The ParticlePair that was added or null if failed
-
addActivePlayerParticle
@Nullable public @Nullable ParticlePair addActivePlayerParticle(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull ParticleEffect effect, @NotNull @NotNull ParticleStyle style, @NotNull @NotNull NoteColor noteColorData)Adds an active particle to a Player's particles- Parameters:
player
- The player to add toeffect
- The effect of the particlestyle
- The style of the particlenoteColorData
- The note color data of the particle- Returns:
- The ParticlePair that was added or null if failed
-
addActivePlayerParticle
@Nullable public @Nullable ParticlePair addActivePlayerParticle(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull ParticleEffect effect, @NotNull @NotNull ParticleStyle style, @NotNull @NotNull org.bukkit.Material materialData)Adds an active particle to a Player's particles- Parameters:
player
- The player to add toeffect
- The effect of the particlestyle
- The style of the particlematerialData
- The material data of the particle- Returns:
- The ParticlePair that was added or null if failed
-
addActivePlayerParticle
@Nullable public @Nullable ParticlePair addActivePlayerParticle(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull ParticleEffect effect, @NotNull @NotNull ParticleStyle style, @NotNull @NotNull ColorTransition colorTransitionData)Adds an active particle to a Player's particles- Parameters:
player
- The player to add toeffect
- The effect of the particlestyle
- The style of the particlecolorTransitionData
- The color transition data of the particle- Returns:
- The ParticlePair that was added or null if failed
-
addActivePlayerParticle
@Nullable public @Nullable ParticlePair addActivePlayerParticle(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull ParticleEffect effect, @NotNull @NotNull ParticleStyle style, @NotNull @NotNull Vibration vibrationData)Adds an active particle to a Player's particles- Parameters:
player
- The player to add toeffect
- The effect of the particlestyle
- The style of the particlevibrationData
- The vibration data of the particle- Returns:
- The ParticlePair that was added or null if failed
-
editActivePlayerParticle
@Nullable public @Nullable ParticlePair editActivePlayerParticle(@NotNull @NotNull org.bukkit.entity.Player player, int id, @NotNull @NotNull ParticleEffect effect)Edits an active particle of a Player- Parameters:
player
- The player to edit fromid
- The ID of the target particleeffect
- The new effect for the particle- Returns:
- The ParticlePair that was edited or null if failed
-
editActivePlayerParticle
@Nullable public @Nullable ParticlePair editActivePlayerParticle(@NotNull @NotNull org.bukkit.entity.Player player, int id, @NotNull @NotNull ParticleStyle style)Edits an active particle of a Player- Parameters:
player
- The player to edit fromid
- The ID of the target particlestyle
- The new style for the particle- Returns:
- The ParticlePair that was edited or null if failed
-
editActivePlayerParticle
@Nullable public @Nullable ParticlePair editActivePlayerParticle(@NotNull @NotNull org.bukkit.entity.Player player, int id, @NotNull @NotNull OrdinaryColor colorData)Edits an active particle of a Player- Parameters:
player
- The player to edit fromid
- The ID of the target particlecolorData
- The new color data for the particle- Returns:
- The ParticlePair that was edited or null if failed
-
editActivePlayerParticle
@Nullable public @Nullable ParticlePair editActivePlayerParticle(@NotNull @NotNull org.bukkit.entity.Player player, int id, @NotNull @NotNull NoteColor noteColorData)Edits an active particle of a Player- Parameters:
player
- The player to edit fromid
- The ID of the target particlenoteColorData
- The new note color data for the particle- Returns:
- The ParticlePair that was edited or null if failed
-
editActivePlayerParticle
@Nullable public @Nullable ParticlePair editActivePlayerParticle(@NotNull @NotNull org.bukkit.entity.Player player, int id, @NotNull @NotNull org.bukkit.Material materialData)Edits an active particle of a Player- Parameters:
player
- The player to edit fromid
- The ID of the target particlematerialData
- The new material data for the particle- Returns:
- The ParticlePair that was edited or null if failed
-
removeActivePlayerParticle
@Nullable public @Nullable ParticlePair removeActivePlayerParticle(@NotNull @NotNull org.bukkit.entity.Player player, int id)Removes an active particle from a player by ID- Parameters:
player
- The player to remove fromid
- The ID of the particle to remove- Returns:
- The ParticlePair that was removed or null if failed
-
removeActivePlayerParticles
@Nullable public @Nullable java.util.Set<ParticlePair> removeActivePlayerParticles(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull ParticleEffect effect)Removes active particles from a player by effect- Parameters:
player
- The player to remove fromeffect
- The effect of the particle(s) to remove- Returns:
- A Set of removed ParticlePairs or null if failed
-
removeActivePlayerParticles
@Nullable public @Nullable java.util.Set<ParticlePair> removeActivePlayerParticles(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull ParticleStyle style)Removes active particles from a player by style- Parameters:
player
- The player to remove fromstyle
- The style of the particle(s) to remove- Returns:
- A Set of removed ParticlePairs or null if failed
-
resetActivePlayerParticles
@Nullable public @Nullable java.lang.Integer resetActivePlayerParticles(@NotNull @NotNull org.bukkit.entity.Player player)Removes all active particles from a player- Parameters:
player
- The player to remove from- Returns:
- The number of particles removed or null if failed
-
resetActivePlayerParticles
public void resetActivePlayerParticles(@NotNull @NotNull java.lang.String playerName, @Nullable @Nullable java.util.function.Consumer<java.lang.Boolean> successConsumer)Attempts to reset the active particles for the given player name. This works even if the player is offline.- Parameters:
playerName
- The name of the player to reset the active particles forsuccessConsumer
- The callback to execute when finished
-
getActivePlayerParticles
@NotNull public @NotNull java.util.Collection<ParticlePair> getActivePlayerParticles(@NotNull @NotNull org.bukkit.entity.Player player)Gets all active particles from a player- Parameters:
player
- The player to get from- Returns:
- A collection of the player's active particles
-
getActivePlayerParticle
@Nullable public @Nullable ParticlePair getActivePlayerParticle(@NotNull @NotNull org.bukkit.entity.Player player, int id)Gets an active particle from a player- Parameters:
player
- The player to get fromid
- The ID of the particle to get- Returns:
- A particle or null if one doesn't exist
-
savePlayerParticleGroup
@Nullable public @Nullable ParticleGroup savePlayerParticleGroup(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull ParticleGroup particleGroup)Saves a particle group to a player or edits an existing one- Parameters:
player
- The player to save toparticleGroup
- The particle group to save- Returns:
- The ParticleGroup that was saved or null if failed
-
savePlayerParticleGroup
@Nullable public @Nullable ParticleGroup savePlayerParticleGroup(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull java.lang.String groupName, @NotNull @NotNull java.util.Collection<ParticlePair> particles)Saves a particle group to a player or edits an existing one- Parameters:
player
- The player to save togroupName
- The name of the group to saveparticles
- Particles that are part of the group- Returns:
- The ParticleGroup that was saved or null if failed
-
removePlayerParticleGroup
@Nullable public @Nullable ParticleGroup removePlayerParticleGroup(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull java.lang.String groupName)Removes a particle group from a player- Parameters:
player
- The player to remove fromgroupName
- The name of the particle group to remove- Returns:
- The ParticleGroup that was removed or null if failed
-
removePlayerParticleGroup
@Nullable public @Nullable ParticleGroup removePlayerParticleGroup(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull ParticleGroup particleGroup)Removes a particle group from a player- Parameters:
player
- The player to remove fromparticleGroup
- The particle group- Returns:
- The ParticleGroup that was removed or null if failed
-
getPlayerParticleGroups
@NotNull public @NotNull java.util.Collection<ParticleGroup> getPlayerParticleGroups(@NotNull @NotNull org.bukkit.entity.Player player)Gets a collection of the player's particle groups- Parameters:
player
- The player to get from- Returns:
- A collection of the player's particle groups
-
createFixedParticleEffect
@Nullable public @Nullable FixedParticleEffect createFixedParticleEffect(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull FixedParticleEffect fixedEffect)Creates a fixed particle effect for a player- Parameters:
sender
- The sender to create for, either a Player or ConsoleCommandSenderfixedEffect
- The FixedParticleEffect- Returns:
- The FixedParticleEffect that was created or null if failed
-
createFixedParticleEffect
@Nullable public @Nullable FixedParticleEffect createFixedParticleEffect(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull ParticlePair particle)Creates a fixed particle effect for a player- Parameters:
sender
- The sender to create for, either a Player or ConsoleCommandSenderlocation
- The location to create atparticle
- The particle to display- Returns:
- The FixedParticleEffect that was created or null if failed
-
createFixedParticleEffect
@Nullable public @Nullable FixedParticleEffect createFixedParticleEffect(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull ParticleEffect effect, @NotNull @NotNull ParticleStyle style)Creates a fixed particle effect for a player- Parameters:
sender
- The sender to create for, either a Player or ConsoleCommandSenderlocation
- The location to create ateffect
- The effect of the particlestyle
- The style of the particle- Returns:
- The FixedParticleEffect that was created or null if failed
-
createFixedParticleEffect
@Nullable public @Nullable FixedParticleEffect createFixedParticleEffect(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull ParticleEffect effect, @NotNull @NotNull ParticleStyle style, @NotNull @NotNull OrdinaryColor colorData)Creates a fixed particle effect for a player- Parameters:
sender
- The sender to create for, either a Player or ConsoleCommandSenderlocation
- The location to create ateffect
- The effect of the particlestyle
- The style of the particlecolorData
- The color data of the particle- Returns:
- The FixedParticleEffect that was created or null if failed
-
createFixedParticleEffect
@Nullable public @Nullable FixedParticleEffect createFixedParticleEffect(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull ParticleEffect effect, @NotNull @NotNull ParticleStyle style, @NotNull @NotNull NoteColor noteColorData)Creates a fixed particle effect for a player- Parameters:
sender
- The sender to create for, either a Player or ConsoleCommandSenderlocation
- The location to create ateffect
- The effect of the particlestyle
- The style of the particlenoteColorData
- The note color data of the particle- Returns:
- The FixedParticleEffect that was created or null if failed
-
createFixedParticleEffect
@Nullable public @Nullable FixedParticleEffect createFixedParticleEffect(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull ParticleEffect effect, @NotNull @NotNull ParticleStyle style, @NotNull @NotNull org.bukkit.Material materialData)Creates a fixed particle effect for a player- Parameters:
sender
- The sender to create for, either a Player or ConsoleCommandSenderlocation
- The location to create ateffect
- The effect of the particlestyle
- The style of the particlematerialData
- The material data of the particle- Returns:
- The FixedParticleEffect that was created or null if failed
-
createFixedParticleEffect
@Nullable public @Nullable FixedParticleEffect createFixedParticleEffect(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull ParticleEffect effect, @NotNull @NotNull ParticleStyle style, @NotNull @NotNull ColorTransition colorTransitionData)Creates a fixed particle effect for a player- Parameters:
sender
- The sender to create for, either a Player or ConsoleCommandSenderlocation
- The location to create ateffect
- The effect of the particlestyle
- The style of the particlecolorTransitionData
- The color transition data of the particle- Returns:
- The FixedParticleEffect that was created or null if failed
-
createFixedParticleEffect
@Nullable public @Nullable FixedParticleEffect createFixedParticleEffect(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull ParticleEffect effect, @NotNull @NotNull ParticleStyle style, @NotNull @NotNull Vibration vibrationData)Creates a fixed particle effect for a player- Parameters:
sender
- The sender to create for, either a Player or ConsoleCommandSenderlocation
- The location to create ateffect
- The effect of the particlestyle
- The style of the particlevibrationData
- The vibration data of the particle- Returns:
- The FixedParticleEffect that was created or null if failed
-
editFixedParticleEffect
public FixedParticleEffect editFixedParticleEffect(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull FixedParticleEffect fixedEffect)Edits a fixed particle effect for a player- Parameters:
sender
- The sender to edit from, either a Player or ConsoleCommandSenderfixedEffect
- The modified fixed effect to edit- Returns:
- The FixedParticleEffect that was edited or null if failed
-
editFixedParticleEffect
@Nullable public @Nullable FixedParticleEffect editFixedParticleEffect(@NotNull @NotNull org.bukkit.command.CommandSender sender, int id, @NotNull @NotNull org.bukkit.Location location)Edits a fixed particle effect for a player- Parameters:
sender
- The sender to edit from, either a Player or ConsoleCommandSenderid
- The ID of the fixed particle effectlocation
- The new location- Returns:
- The FixedParticleEffect that was edited or null if failed
-
editFixedParticleEffect
@Nullable public @Nullable FixedParticleEffect editFixedParticleEffect(@NotNull @NotNull org.bukkit.command.CommandSender sender, int id, @NotNull @NotNull ParticleEffect effect)Edits a fixed particle effect for a player- Parameters:
sender
- The sender to edit from, either a Player or ConsoleCommandSenderid
- The ID of the fixed particle effecteffect
- The new effect- Returns:
- The FixedParticleEffect that was edited or null if failed
-
editFixedParticleEffect
@Nullable public @Nullable FixedParticleEffect editFixedParticleEffect(@NotNull @NotNull org.bukkit.command.CommandSender sender, int id, @NotNull @NotNull ParticleStyle style)Edits a fixed particle effect for a player- Parameters:
sender
- The sender to edit from, either a Player or ConsoleCommandSenderid
- The ID of the fixed particle effectstyle
- The new style- Returns:
- The FixedParticleEffect that was edited or null if failed
-
editFixedParticleEffect
@Nullable public @Nullable FixedParticleEffect editFixedParticleEffect(@NotNull @NotNull org.bukkit.command.CommandSender sender, int id, @NotNull @NotNull OrdinaryColor colorData)Edits a fixed particle effect for a player- Parameters:
sender
- The sender to edit from, either a Player or ConsoleCommandSenderid
- The ID of the fixed particle effectcolorData
- The new color data- Returns:
- The FixedParticleEffect that was edited or null if failed
-
editFixedParticleEffect
@Nullable public @Nullable FixedParticleEffect editFixedParticleEffect(@NotNull @NotNull org.bukkit.command.CommandSender sender, int id, @NotNull @NotNull NoteColor noteColorData)Edits a fixed particle effect for a player- Parameters:
sender
- The sender to edit from, either a Player or ConsoleCommandSenderid
- The ID of the fixed particle effectnoteColorData
- The new note color data- Returns:
- The FixedParticleEffect that was edited or null if failed
-
editFixedParticleEffect
@Nullable public @Nullable FixedParticleEffect editFixedParticleEffect(@NotNull @NotNull org.bukkit.command.CommandSender sender, int id, @NotNull @NotNull org.bukkit.Material materialData)Edits a fixed particle effect for a player- Parameters:
sender
- The sender to edit from, either a Player or ConsoleCommandSenderid
- The ID of the fixed particle effectmaterialData
- The new material data- Returns:
- The FixedParticleEffect that was edited or null if failed
-
removeFixedEffect
@Nullable public @Nullable FixedParticleEffect removeFixedEffect(@NotNull @NotNull org.bukkit.command.CommandSender sender, int id)Removes a fixed particle effect from a player- Parameters:
sender
- The sender to remove from, either a Player or ConsoleCommandSenderid
- The ID of the fixed particle effect- Returns:
- The FixedParticleEffect that was removed or null if failed
-
removeFixedEffectsInRange
public int removeFixedEffectsInRange(@NotNull @NotNull org.bukkit.Location location, double radius)Removes fixed effects within a given radius of a location- Parameters:
location
- The location to search aroundradius
- The radius to remove- Returns:
- The number of fixed effects that were removed
-
getFixedParticleEffect
@Nullable public @Nullable FixedParticleEffect getFixedParticleEffect(@NotNull @NotNull org.bukkit.command.CommandSender sender, int id)Gets a fixed particle effect for a player- Parameters:
sender
- The sender to get from, either a Player or CommandSenderid
- The ID of the fixed particle effect- Returns:
- The fixed particle effect, or null if not found
-
getFixedParticleEffects
@NotNull public @NotNull java.util.Collection<FixedParticleEffect> getFixedParticleEffects(@NotNull @NotNull org.bukkit.command.CommandSender sender)Gets a collection of a player's fixed particle effects- Parameters:
sender
- The sender to get from, either a Player or CommandSender- Returns:
- A collection of the player's fixed particle effects
-
openParticlesGui
public void openParticlesGui(@NotNull @NotNull org.bukkit.entity.Player player)Opens the particles gui for a player- Parameters:
player
- The player to open the gui for
-
togglePlayerParticleVisibility
public void togglePlayerParticleVisibility(@NotNull @NotNull org.bukkit.entity.Player player, boolean particlesHidden)Toggles a player's particle visibility on/off- Parameters:
player
- The player to toggle visibility forparticlesHidden
- true if the particles should be hidden, or false for visible
-
togglePlayerParticleSelfVisibility
public void togglePlayerParticleSelfVisibility(@NotNull @NotNull org.bukkit.entity.Player player, boolean particlesHidden)Toggles a player's particle visibility for their own particles on/off- Parameters:
player
- The player to toggle visibility forparticlesHidden
- true if the player's own particles should be hidden, or false for visible
-