Class Disguise
java.lang.Object
me.libraryaddict.disguise.disguisetypes.Disguise
- Direct Known Subclasses:
TargetedDisguise
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longIf set, how long before disguise expires -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCustomData(String key, Object data) protected voidbooleanabstract Disguiseclone()protected voidprotected voidSeems I do this method so I can make cleaner constructors on disguises..protected voidint[]getCustomData(String key) double@NotNull me.libraryaddict.disguise.utilities.sounds.DisguiseSoundCategorylongabstract doubleString[]intgetType()Get the disguise typegetUUID()booleanhasCustomData(String key) booleanbooleanbooleanWill a disguised player appear in tabbooleanDeprecated.booleanDeprecated.booleanbooleanbooleanbooleanInternal usebooleanDeprecated.booleanCan the disguised view themselves as the disguisebooleanDeprecated.booleanDeprecated.booleanDeprecated.booleanintplayAnimation(me.libraryaddict.disguise.utilities.animations.DisguiseAnimation animation) Plays an animation to all players currently in range of this disguise, no validation is run.voidplayAnimation(org.bukkit.entity.Player observer, me.libraryaddict.disguise.utilities.animations.DisguiseAnimation animation) Plays an animation to the specific player, no validation is run.booleanRemoves the disguise and undisguises the entity if its using this disguise.booleanremoveDisguise(boolean disguiseBeingReplaced) booleanremoveDisguise(org.bukkit.command.CommandSender sender) booleanremoveDisguise(org.bukkit.command.CommandSender sender, boolean disguiseBeingReplaced) Removes the disguise and undisguises the entity if it's using this disguise.protected voidsendArmorStands(String[] oldName) voidsetBossBar(org.bukkit.boss.BarColor color, org.bukkit.boss.BarStyle style) voidsetBossBarColor(org.bukkit.boss.BarColor color) voidsetBossBarStyle(org.bukkit.boss.BarStyle style) voidsetDisguiseName(String name) setEntity(org.bukkit.entity.Entity entity) Set the entity of the disguise.voidsetExpires(long timeToExpire) setHearSelfDisguise(boolean hearSelfDisguise) setHideArmorFromSelf(boolean hideArmor) setHideHeldItemFromSelf(boolean hideHeldItem) voidsetHidePlayer(boolean hidePlayerInTab) setKeepDisguiseOnPlayerDeath(boolean keepDisguise) setModifyBoundingBox(boolean modifyBox) voidsetMultiName(String... name) voidsetReplaceSounds(boolean areSoundsReplaced) voidsetScalePlayerToDisguise(boolean scalePlayerToDisguise) voidsetSelfDisguiseVisible(boolean selfDisguiseVisible) voidsetTallDisguisesVisible(boolean tallDisguisesVisible) Deprecated.voidsetTallSelfDisguise(DisguiseConfig.TallSelfDisguise tallSelfDisguise) voidsetTallSelfDisguisesScaling(boolean tallSelfDisguisesScaling) Deprecated.setUpsideDown(boolean upsideDown) setVelocitySent(boolean sendVelocity) setViewSelfDisguise(boolean viewSelfDisguise) Deprecated.setWatcher(FlagWatcher newWatcher) Deprecated.booleanbooleanstartDisguise(org.bukkit.command.CommandSender commandSender) boolean
-
Field Details
-
disguiseExpires
protected long disguiseExpiresIf set, how long before disguise expires
-
-
Constructor Details
-
Disguise
-
-
Method Details
-
clone
-
getCustomData
-
getUUID
-
getMultiNameLength
public int getMultiNameLength() -
setDisguiseName
-
getEffectiveSoundCategory
@NotNull public @NotNull me.libraryaddict.disguise.utilities.sounds.DisguiseSoundCategory getEffectiveSoundCategory() -
getMultiName
-
setMultiName
-
getHeight
public abstract double getHeight() -
getDisguiseScale
public double getDisguiseScale() -
sendArmorStands
-
getArmorstandIds
public int[] getArmorstandIds() -
addCustomData
-
hasCustomData
-
getCustomData
-
clone
-
createDisguise
protected void createDisguise()Seems I do this method so I can make cleaner constructors on disguises.. -
isDisguiseExpired
public boolean isDisguiseExpired() -
getExpires
public long getExpires() -
setExpires
public void setExpires(long timeToExpire) -
setNotifyBar
-
setBossBarColor
public void setBossBarColor(org.bukkit.boss.BarColor color) -
setBossBarStyle
public void setBossBarStyle(org.bukkit.boss.BarStyle style) -
setBossBar
public void setBossBar(org.bukkit.boss.BarColor color, org.bukkit.boss.BarStyle style) -
isUpsideDown
public boolean isUpsideDown() -
setUpsideDown
-
doPeriodicTick
protected void doPeriodicTick() -
setEntity
Set the entity of the disguise. Only used for internal things.- Parameters:
entity-- Returns:
- disguise
-
canScaleDisguise
public boolean canScaleDisguise() -
setScalePlayerToDisguise
public void setScalePlayerToDisguise(boolean scalePlayerToDisguise) -
adjustTallSelfDisguiseScale
protected void adjustTallSelfDisguiseScale() -
getType
Get the disguise type- Returns:
- disguiseType
-
setWatcher
Deprecated.Deprecated as this isn't used as it should be -
isHidePlayer
public boolean isHidePlayer()Will a disguised player appear in tab -
setHidePlayer
public void setHidePlayer(boolean hidePlayerInTab) -
isHidingArmorFromSelf
Deprecated. -
isHidingHeldItemFromSelf
Deprecated. -
setHideArmorFromSelf
-
setHideHeldItemFromSelf
-
setKeepDisguiseOnPlayerDeath
-
isMiscDisguise
public boolean isMiscDisguise() -
isMobDisguise
public boolean isMobDisguise() -
setModifyBoundingBox
-
isPlayerDisguise
public boolean isPlayerDisguise() -
isCustomDisguise
public boolean isCustomDisguise() -
isRemoveDisguiseOnDeath
@Internal public boolean isRemoveDisguiseOnDeath()Internal use -
isSelfDisguiseSoundsReplaced
Deprecated. -
isSelfDisguiseVisible
public boolean isSelfDisguiseVisible()Can the disguised view themselves as the disguise- Returns:
- viewSelfDisguise
-
setSelfDisguiseVisible
public void setSelfDisguiseVisible(boolean selfDisguiseVisible) -
isSoundsReplaced
Deprecated. -
setVelocitySent
-
removeDisguise
public boolean removeDisguise()Removes the disguise and undisguises the entity if its using this disguise.- Returns:
- removeDiguise
-
removeDisguise
public boolean removeDisguise(org.bukkit.command.CommandSender sender) -
removeDisguise
public boolean removeDisguise(boolean disguiseBeingReplaced) -
removeDisguise
public boolean removeDisguise(org.bukkit.command.CommandSender sender, boolean disguiseBeingReplaced) Removes the disguise and undisguises the entity if it's using this disguise.- Parameters:
disguiseBeingReplaced- If the entity's disguise is being replaced with another- Returns:
-
setHearSelfDisguise
-
setReplaceSounds
-
setViewSelfDisguise
Deprecated.Can the disguised view themselves as the disguise- Parameters:
viewSelfDisguise-- Returns:
-
startDisguise
public boolean startDisguise() -
startDisguise
public boolean startDisguise(org.bukkit.command.CommandSender commandSender) -
stopDisguise
public boolean stopDisguise() -
setTallSelfDisguise
-
setTallSelfDisguisesScaling
Deprecated. -
isTallSelfDisguisesScaling
Deprecated. -
setTallDisguisesVisible
Deprecated. -
isTallDisguisesVisible
Deprecated.Returns true if the self disguise will never check for height before blocking the player's view -
playAnimation
public void playAnimation(org.bukkit.entity.Player observer, me.libraryaddict.disguise.utilities.animations.DisguiseAnimation animation) Plays an animation to the specific player, no validation is run.Some reasons to validate are - Animation is not relevant for this disguise type - Disguise is not a living entity, which may kick/crash players - Player is not in range (can't see entity) - Player does not see this disguise - Disguise is not active
- Parameters:
observer-animation-
-
playAnimation
public int playAnimation(me.libraryaddict.disguise.utilities.animations.DisguiseAnimation animation) Plays an animation to all players currently in range of this disguise, no validation is run.Some reasons to validate are - Animation is not relevant for this disguise type - Disguise is not a living entity, which may kick/crash players - Player is not in range (can't see entity) - Player does not see this disguise - Disguise is not active
- Parameters:
animation-- Returns:
- Count of players that saw the animation
-