Package me.libraryaddict.disguise
Class DisguiseAPI
java.lang.Object
me.libraryaddict.disguise.DisguiseAPI
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddCustomDisguise(String disguiseName, String disguiseInfo) static voidaddGameProfile(String profileName, com.github.retrooper.packetevents.protocol.player.UserProfile gameProfile) static DisguiseconstructDisguise(org.bukkit.entity.Entity entity) static DisguiseconstructDisguise(org.bukkit.entity.Entity entity, boolean doEquipment, boolean displayExtraAnimations) static voiddisguiseEntity(org.bukkit.command.CommandSender commandSender, org.bukkit.entity.Entity entity, Disguise disguise) static voiddisguiseEntity(org.bukkit.entity.Entity entity, Disguise disguise) static voiddisguiseIgnorePlayers(org.bukkit.entity.Entity entity, Disguise disguise, String... playersToNotSeeDisguise) static voiddisguiseIgnorePlayers(org.bukkit.entity.Entity entity, Disguise disguise, Collection playersToNotSeeDisguise) static voiddisguiseIgnorePlayers(org.bukkit.entity.Entity entity, Disguise disguise, List<String> playersToNotSeeDisguise) Deprecated.static voiddisguiseIgnorePlayers(org.bukkit.entity.Entity entity, Disguise disguise, org.bukkit.entity.Player... playersToNotSeeDisguise) static intdisguiseNextEntity(Disguise disguise) Disguise the next entity to spawn, this means you need to spawn an entity immediately after calling this.static voiddisguiseToAll(org.bukkit.entity.Entity entity, Disguise disguise) Disguise this entity with this disguisestatic voiddisguiseToPlayers(org.bukkit.entity.Entity entity, Disguise disguise, String... playersToViewDisguise) static voiddisguiseToPlayers(org.bukkit.entity.Entity entity, Disguise disguise, Collection playersToViewDisguise) static voiddisguiseToPlayers(org.bukkit.entity.Entity entity, Disguise disguise, List<String> playersToViewDisguise) Deprecated.static voiddisguiseToPlayers(org.bukkit.entity.Entity entity, Disguise disguise, org.bukkit.entity.Player... playersToViewDisguise) static DisguisegetCustomDisguise(String disguiseName) static DisguisegetDisguise(org.bukkit.entity.Entity disguised) Get the disguise of a entitystatic DisguisegetDisguise(org.bukkit.entity.Player observer, org.bukkit.entity.Entity disguised) Get the disguise of a entitystatic Disguise[]getDisguises(org.bukkit.entity.Entity disguised) Get the disguises of a entitystatic intstatic StringgetRawCustomDisguise(String disguiseName) static intstatic booleanhasActionBarPreference(org.bukkit.entity.Entity entity) static booleanhasSelfDisguisePreference(org.bukkit.entity.Entity entity) static booleanisActionBarShown(org.bukkit.entity.Entity entity) Deprecated.static booleanisDisguised(org.bukkit.entity.Entity disguised) Is this entity disguisedstatic booleanisDisguised(org.bukkit.entity.Player observer, org.bukkit.entity.Entity disguised) Is this entity disguisedstatic booleanisDisguiseInUse(Disguise disguise) static booleanisNotifyBarShown(org.bukkit.entity.Entity entity) Returns true if the entity wants to see the action bar / boss barstatic booleanisSelfDisguised(org.bukkit.entity.Player player) static booleanisViewSelfToggled(org.bukkit.entity.Entity entity) Returns true if the entitiy has /disguiseviewself toggled on.static StringparseToString(Disguise disguise) static StringparseToString(Disguise disguise, boolean outputSkin) static voidremoveCustomDisguise(String disguiseName) static voidsetActionBarShown(org.bukkit.entity.Player player, boolean isShown) static voidsetViewDisguiseToggled(org.bukkit.entity.Entity entity, boolean canSeeSelfDisguises) Set whether this player can see their own disguise or not.static voidundisguiseToAll(org.bukkit.command.CommandSender sender, org.bukkit.entity.Entity entity) Undisguise the entity.static voidundisguiseToAll(org.bukkit.entity.Entity entity) Undisguise the entity.
-
Method Details
-
getEntityAttachmentId
public static int getEntityAttachmentId() -
addCustomDisguise
public static void addCustomDisguise(String disguiseName, String disguiseInfo) throws DisguiseParseException - Throws:
DisguiseParseException
-
addGameProfile
public static void addGameProfile(String profileName, com.github.retrooper.packetevents.protocol.player.UserProfile gameProfile) -
getRawCustomDisguise
-
getCustomDisguise
-
removeCustomDisguise
-
constructDisguise
-
constructDisguise
public static Disguise constructDisguise(org.bukkit.entity.Entity entity, boolean doEquipment, boolean displayExtraAnimations) -
disguiseEntity
-
disguiseEntity
public static void disguiseEntity(org.bukkit.command.CommandSender commandSender, org.bukkit.entity.Entity entity, Disguise disguise) -
disguiseIgnorePlayers
public static void disguiseIgnorePlayers(org.bukkit.entity.Entity entity, Disguise disguise, Collection playersToNotSeeDisguise) -
disguiseIgnorePlayers
@Deprecated public static void disguiseIgnorePlayers(org.bukkit.entity.Entity entity, Disguise disguise, List<String> playersToNotSeeDisguise) Deprecated. -
disguiseIgnorePlayers
public static void disguiseIgnorePlayers(org.bukkit.entity.Entity entity, Disguise disguise, org.bukkit.entity.Player... playersToNotSeeDisguise) -
disguiseIgnorePlayers
-
disguiseNextEntity
Disguise the next entity to spawn, this means you need to spawn an entity immediately after calling this.- Parameters:
disguise-- Returns:
-
disguiseToAll
Disguise this entity with this disguise- Parameters:
entity-disguise-
-
disguiseToPlayers
public static void disguiseToPlayers(org.bukkit.entity.Entity entity, Disguise disguise, Collection playersToViewDisguise) -
disguiseToPlayers
@Deprecated public static void disguiseToPlayers(org.bukkit.entity.Entity entity, Disguise disguise, List<String> playersToViewDisguise) Deprecated. -
disguiseToPlayers
public static void disguiseToPlayers(org.bukkit.entity.Entity entity, Disguise disguise, org.bukkit.entity.Player... playersToViewDisguise) -
disguiseToPlayers
-
getDisguise
Get the disguise of a entity- Parameters:
disguised-- Returns:
-
parseToString
-
parseToString
-
getDisguise
public static Disguise getDisguise(org.bukkit.entity.Player observer, org.bukkit.entity.Entity disguised) Get the disguise of a entity- Parameters:
observer-disguised-- Returns:
-
getDisguises
Get the disguises of a entity- Parameters:
disguised-- Returns:
-
getSelfDisguiseId
public static int getSelfDisguiseId() -
isDisguised
public static boolean isDisguised(org.bukkit.entity.Entity disguised) Is this entity disguised- Parameters:
disguised-- Returns:
-
isDisguised
public static boolean isDisguised(org.bukkit.entity.Player observer, org.bukkit.entity.Entity disguised) Is this entity disguised- Parameters:
observer-disguised-- Returns:
-
isDisguiseInUse
-
isSelfDisguised
public static boolean isSelfDisguised(org.bukkit.entity.Player player) -
isViewSelfToggled
public static boolean isViewSelfToggled(org.bukkit.entity.Entity entity) Returns true if the entitiy has /disguiseviewself toggled on.- Parameters:
entity-- Returns:
-
isActionBarShown
Deprecated. -
isNotifyBarShown
public static boolean isNotifyBarShown(org.bukkit.entity.Entity entity) Returns true if the entity wants to see the action bar / boss bar- Parameters:
entity-- Returns:
-
hasSelfDisguisePreference
public static boolean hasSelfDisguisePreference(org.bukkit.entity.Entity entity) -
hasActionBarPreference
public static boolean hasActionBarPreference(org.bukkit.entity.Entity entity) -
undisguiseToAll
public static void undisguiseToAll(org.bukkit.entity.Entity entity) Undisguise the entity. This doesn't let you cancel the UndisguiseEvent if the entity is no longer valid. Aka removed from the world.- Parameters:
entity-
-
undisguiseToAll
public static void undisguiseToAll(org.bukkit.command.CommandSender sender, org.bukkit.entity.Entity entity) Undisguise the entity. This doesn't let you cancel the UndisguiseEvent if the entity is no longer valid. Aka removed from the world.- Parameters:
entity-
-
setViewDisguiseToggled
public static void setViewDisguiseToggled(org.bukkit.entity.Entity entity, boolean canSeeSelfDisguises) Set whether this player can see their own disguise or not.- Parameters:
entity-canSeeSelfDisguises-
-
setActionBarShown
public static void setActionBarShown(org.bukkit.entity.Player player, boolean isShown)
-