Class DefaultParticleStyle
java.lang.Object
dev.esophose.playerparticles.styles.DefaultParticleStyle
- All Implemented Interfaces:
ParticleStyle
- Direct Known Subclasses:
ParticleStyleArrows,ParticleStyleBatman,ParticleStyleBeam,ParticleStyleBlockBreak,ParticleStyleBlockPlace,ParticleStyleCelebration,ParticleStyleChains,ParticleStyleCompanion,ParticleStyleCube,ParticleStyleDeath,ParticleStyleFeet,ParticleStyleFishing,ParticleStyleHalo,ParticleStyleHurt,ParticleStyleIcosphere,ParticleStyleInvocation,ParticleStyleMove,ParticleStyleNormal,ParticleStyleOrbit,ParticleStyleOutline,ParticleStyleOverhead,ParticleStylePoint,ParticleStylePopper,ParticleStylePulse,ParticleStyleQuadhelix,ParticleStyleRings,ParticleStyleSphere,ParticleStyleSpin,ParticleStyleSpiral,ParticleStyleSwords,ParticleStyleTeleport,ParticleStyleThick,ParticleStyleTrail,ParticleStyleTwins,ParticleStyleVortex,ParticleStyleWhirl,ParticleStyleWhirlwind,ParticleStyleWings
public abstract class DefaultParticleStyle extends java.lang.Object implements ParticleStyle
-
Field Summary
Fields Modifier and Type Field Description protected PlayerParticlesplayerParticles -
Constructor Summary
Constructors Modifier Constructor Description protectedDefaultParticleStyle(java.lang.String internalStyleName, boolean canBeFixedByDefault, boolean canToggleWithMovementByDefault, double fixedEffectOffsetByDefault) -
Method Summary
Modifier and Type Method Description booleancanBeFixed()Gets if the style can be used in a FixedParticleEffectbooleancanToggleWithCombat()Gets if the style can be hidden if the player is in combat with the toggle-on-combat settingbooleancanToggleWithMovement()Gets if the style can be displayed differently based on the toggle-on-move setting when the player is movingdoublegetFixedEffectOffset()The Y-axis offset to be applied when using '/pp fixed create looking'org.bukkit.MaterialgetGuiIconMaterial()protected abstract java.util.List<java.lang.String>getGuiIconMaterialNames()java.lang.StringgetInternalName()java.lang.StringgetName()booleanisEnabled()voidloadSettings(boolean reloadConfig)Loads the settings shared for each style then calls loadSettings(CommentedFileConfiguration)protected abstract voidloadSettings(CommentedFileConfiguration config)Loads the settings for this styleprotected abstract voidsetDefaultSettings(CommentedFileConfiguration config)Sets the default settings for this styleprotected voidsetIfNotExists(java.lang.String setting, java.lang.Object value, java.lang.String... comments)Sets a value to the config if it doesn't already existMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.esophose.playerparticles.styles.ParticleStyle
getParticles, getParticles, hasLongRangeVisibility, updateTimers
-
Field Details
-
Constructor Details
-
DefaultParticleStyle
protected DefaultParticleStyle(java.lang.String internalStyleName, boolean canBeFixedByDefault, boolean canToggleWithMovementByDefault, double fixedEffectOffsetByDefault)
-
-
Method Details
-
loadSettings
public final void loadSettings(boolean reloadConfig)Loads the settings shared for each style then calls loadSettings(CommentedFileConfiguration)- Parameters:
reloadConfig- If the settings should be reloaded or not
-
setIfNotExists
protected final void setIfNotExists(java.lang.String setting, java.lang.Object value, java.lang.String... comments)Sets a value to the config if it doesn't already exist- Parameters:
setting- The setting namevalue- The setting valuecomments- Comments for the setting
-
isEnabled
public final boolean isEnabled()- Specified by:
isEnabledin interfaceParticleStyle- Returns:
- true if the style is enabled, false otherwise
-
getInternalName
public final java.lang.String getInternalName()- Specified by:
getInternalNamein interfaceParticleStyle- Returns:
- The style's internal name that will always remain constant
-
getName
public final java.lang.String getName()- Specified by:
getNamein interfaceParticleStyle- Returns:
- The name that the style will display to the users as
-
getGuiIconMaterial
public final org.bukkit.Material getGuiIconMaterial()- Specified by:
getGuiIconMaterialin interfaceParticleStyle- Returns:
- The Material icon that represents this style in the GUI
-
canBeFixed
public final boolean canBeFixed()Description copied from interface:ParticleStyleGets if the style can be used in a FixedParticleEffect- Specified by:
canBeFixedin interfaceParticleStyle- Returns:
- If the style can be used in a FixedParticleEffect
-
canToggleWithMovement
public final boolean canToggleWithMovement()Description copied from interface:ParticleStyleGets if the style can be displayed differently based on the toggle-on-move setting when the player is moving- Specified by:
canToggleWithMovementin interfaceParticleStyle- Returns:
- True if it can be, otherwise False
-
canToggleWithCombat
public final boolean canToggleWithCombat()Description copied from interface:ParticleStyleGets if the style can be hidden if the player is in combat with the toggle-on-combat setting- Specified by:
canToggleWithCombatin interfaceParticleStyle- Returns:
- True if it can be, otherwise False
-
getFixedEffectOffset
public final double getFixedEffectOffset()Description copied from interface:ParticleStyleThe Y-axis offset to be applied when using '/pp fixed create looking'- Specified by:
getFixedEffectOffsetin interfaceParticleStyle- Returns:
- How far to move the style up or down to get it centered on the block properly
-
getGuiIconMaterialNames
protected abstract java.util.List<java.lang.String> getGuiIconMaterialNames()- Returns:
- A list of Strings to try to turn into Materials
-
setDefaultSettings
Sets the default settings for this style- Parameters:
config- The config to save to
-
loadSettings
Loads the settings for this style- Parameters:
config- The config to load from
-