Package wbs.utils.util.particles
Class CuboidParticleEffect
java.lang.Object
wbs.utils.util.particles.WbsParticleEffect
wbs.utils.util.particles.VelocityParticleEffect
wbs.utils.util.particles.CuboidParticleEffect
A particle effect that draws the outline of a cuboid region
-
Nested Class Summary
Nested classes/interfaces inherited from class wbs.utils.util.particles.WbsParticleEffect
WbsParticleEffect.WbsParticleType -
Field Summary
Fields inherited from class wbs.utils.util.particles.VelocityParticleEffect
direction, relative, speed, variation -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreates this effect with x, y, and z statically initialized to 1, and rotation initialized as 0.protectedCuboidParticleEffect(org.bukkit.configuration.ConfigurationSection section, WbsSettings settings, String directory) Create this effect from a ConfigurationSection, logging errors in the given settings -
Method Summary
Modifier and TypeMethodDescriptionbuild()Generate the particle set based on current settings.clone()org.bukkit.LocationconfigureBlockOutline(org.bukkit.Location corner1, org.bukkit.Location corner2) Configure this effect to outline the cuboid region defined by corner1, corner2 and return the location to play at to center on those blocks.protected voidRefresh all providers for this object.setAbout(org.bukkit.util.Vector about) setAbout(VectorProvider about) Set the about vector provider directlysetRotation(double rotation) setRotation(NumProvider rotation) Set the rotation provider directlysetScaleAmount(boolean scaleAmount) Set whether or not to use the "amount" field as points-per-blocksetX(double x) Set the size of the region in the X axissetX(NumProvider x) Set the provider for the region in the X axissetXYZ(double size) Set the size of the region in the all 3 axes, making the region a cubesetXYZ(org.bukkit.util.Vector xyz) Set the size of the region in each axis defined by the X, Y, and Z components of a given vectorsetXYZ(NumProvider size) Set the provider to be used for allsetY(double y) Set the size of the region in the Y axissetY(NumProvider y) Set the size of the region in the Y axissetZ(double z) Set the size of the region in the Z axissetZ(NumProvider z) Set the size of the region in the Z axisvoidwriteToConfig(org.bukkit.configuration.ConfigurationSection section, String path) Save this effect in a config that can be read byWbsParticleEffect.buildParticleEffect(ConfigurationSection, WbsSettings, String)Methods inherited from class wbs.utils.util.particles.VelocityParticleEffect
cloneInto, getDirection, getDirectionProvider, getRelative, getSpeed, getSpeedProvider, getVariation, getVariationProvider, play, play, setDirection, setDirection, setRelative, setSpeed, setSpeed, setVariation, setVariationMethods inherited from class wbs.utils.util.particles.WbsParticleEffect
buildAndPlay, buildParticleEffect, cloneInto, filterChances, getAmount, getAmountProvider, getForce, getLocations, rand, scaleVector, setAmount, setAmount, setChance, setForce, setOptions, setPlugin
-
Constructor Details
-
CuboidParticleEffect
public CuboidParticleEffect()Creates this effect with x, y, and z statically initialized to 1, and rotation initialized as 0. -
CuboidParticleEffect
protected CuboidParticleEffect(org.bukkit.configuration.ConfigurationSection section, WbsSettings settings, String directory) Create this effect from a ConfigurationSection, logging errors in the given settings- Parameters:
section- The section where this effect is definedsettings- The settings to log errors againstdirectory- The path taken through the config to get to this point, for logging purposes
-
-
Method Details
-
clone
- Specified by:
clonein classWbsParticleEffect
-
refreshProviders
protected void refreshProviders()Description copied from class:WbsParticleEffectRefresh all providers for this object. Subclasses may override this, but should call super.refreshProviders() at the start of the method- Overrides:
refreshProvidersin classVelocityParticleEffect
-
build
Description copied from class:WbsParticleEffectGenerate the particle set based on current settings. Call this before the first time it is run, or call buildAndRun each time to run based on current settings.- Specified by:
buildin classWbsParticleEffect- Returns:
- The same object.
-
configureBlockOutline
public org.bukkit.Location configureBlockOutline(org.bukkit.Location corner1, org.bukkit.Location corner2) Configure this effect to outline the cuboid region defined by corner1, corner2 and return the location to play at to center on those blocks.- Parameters:
corner1- The first corner of the cuboid regioncorner2- The second corner of the cuboid region- Returns:
- A location that, when used in
VelocityParticleEffect.play(Particle, Location), will make this effect outline the cuboid region defined
-
setScaleAmount
Set whether or not to use the "amount" field as points-per-block- Parameters:
scaleAmount- True to make amount be points-per-block- Returns:
- The same particle effect
-
setX
Set the size of the region in the X axis- Parameters:
x- The new size in the X axis- Returns:
- The same particle effect
-
setY
Set the size of the region in the Y axis- Parameters:
y- The new size in the Y axis- Returns:
- The same particle effect
-
setZ
Set the size of the region in the Z axis- Parameters:
z- The new size in the Z axis- Returns:
- The same particle effect
-
setX
Set the provider for the region in the X axis- Parameters:
x- The new size in the X axis- Returns:
- The same particle effect
-
setY
Set the size of the region in the Y axis- Parameters:
y- The new size in the Y axis- Returns:
- The same particle effect
-
setZ
Set the size of the region in the Z axis- Parameters:
z- The new size in the Z axis- Returns:
- The same particle effect
-
setXYZ
Set the size of the region in the all 3 axes, making the region a cube- Parameters:
size- The new size in the all axes- Returns:
- The same particle effect
-
setXYZ
Set the provider to be used for all- Parameters:
size- The new size in the all axes- Returns:
- The same particle effect
-
setXYZ
Set the size of the region in each axis defined by the X, Y, and Z components of a given vector- Parameters:
xyz- The vector representing the size of the region- Returns:
- The same particle effect
-
setRotation
- Parameters:
rotation- The rotation in degrees- Returns:
- The same particle effect
-
setRotation
Set the rotation provider directly- Parameters:
rotation- The rotation in degrees- Returns:
- The same particle effect
-
setAbout
- Parameters:
about- The vector about which to rotate- Returns:
- The same particle effect
-
setAbout
Set the about vector provider directly- Parameters:
about- The vector about which to rotate- Returns:
- The same particle effect
-
writeToConfig
Description copied from class:WbsParticleEffectSave this effect in a config that can be read byWbsParticleEffect.buildParticleEffect(ConfigurationSection, WbsSettings, String)- Overrides:
writeToConfigin classVelocityParticleEffect- Parameters:
section- The section to write topath- The field/path inside the given section
-