public interface DisguiseAPI
Bukkit.getServicesManager().getRegistration(DisguiseAPI.class).getProvider();
Modifier and Type | Method | Description |
---|---|---|
boolean |
canSeeThrough(org.bukkit.OfflinePlayer player) |
Indicates whether a given player can see through disguises.
|
boolean |
disguise(org.bukkit.entity.LivingEntity livingEntity,
Disguise disguise) |
Disguise a living entity.
Calling disguise(livingEntity, disguise) is equivalent to calling disguise(livingEntity, disguise, true) .This function must only be accessed synchronously. |
boolean |
disguise(org.bukkit.entity.LivingEntity livingEntity,
Disguise disguise,
boolean fireEvent) |
Disguise a living entity.
This function must only be accessed synchronously. |
boolean |
disguise(org.bukkit.entity.Player player,
Disguise disguise) |
Disguise a player.
Calling disguise(player, disguise) is equivalent to calling disguise(player, disguise, true) .This function must only be accessed synchronously. |
boolean |
disguise(org.bukkit.entity.Player player,
Disguise disguise,
boolean fireEvent) |
Disguise a player.
This function must only be accessed synchronously. |
boolean |
disguise(org.bukkit.OfflinePlayer offlinePlayer,
Disguise disguise) |
Disguise an offline player.
Calling disguise(offlinePlayer, disguise) is equivalent to calling disguise(offlinePlayer, disguise, true) .This function must only be accessed synchronously. |
boolean |
disguise(org.bukkit.OfflinePlayer offlinePlayer,
Disguise disguise,
boolean fireEvent) |
Disguise an offline player.
This function must only be accessed synchronously. |
Disguise |
getDisguise(org.bukkit.entity.LivingEntity livingEntity) |
Get a copy of a living entity's current disguise.
|
Disguise |
getDisguise(org.bukkit.entity.Player player) |
Get a copy of a player's current disguise.
|
Disguise |
getDisguise(org.bukkit.OfflinePlayer offlinePlayer) |
Get a copy of an offline player's current disguise.
|
java.util.Set<java.lang.Object> |
getDisguisedEntities() |
Get a Set of all disguised players (online and offline) and entities.
Each element of this Set is an instance of either OfflinePlayer or LivingEntity. |
int |
getNumberOfDisguisedPlayers() |
Get the number of online players who are disguised.
|
Sounds |
getSoundsForEntity(DisguiseType type) |
Gets the
Sounds for a specific entity type. |
boolean |
hasPermission(org.bukkit.entity.Player player,
Disguise disguise) |
Indicates whether a given player has the required permissions to carry the given disguise.
|
boolean |
hasPermission(org.bukkit.entity.Player player,
DisguiseType type) |
Indicates whether a given player has the required permissions to disguise as the given disguise type.
This function will always return false for DisguiseType.PLAYER . |
boolean |
isDisguised(org.bukkit.entity.LivingEntity livingEntity) |
Indicates whether a living entity is disguised.
|
boolean |
isDisguised(org.bukkit.entity.Player player) |
Indicates whether a player is disguised.
|
boolean |
isDisguised(org.bukkit.OfflinePlayer offlinePlayer) |
Indicates whether an offline player is disguised.
|
boolean |
isDisguisedTo(org.bukkit.entity.LivingEntity livingEntity,
org.bukkit.entity.Player observer) |
Indicates whether a living entity is disguised and the disguise is visible to a given observer.
Calling this function is similar to: api.isDisguised(livingEntity) && api.getDisguise(livingEntity).isVisibleTo(observer) |
boolean |
isDisguisedTo(org.bukkit.entity.Player player,
org.bukkit.entity.Player observer) |
Indicates whether a player is disguised and the disguise is visible to a given observer.
Calling this function is similar to: api.isDisguised(player) && api.getDisguise(player).isVisibleTo(observer) |
boolean |
isDisguisedTo(org.bukkit.OfflinePlayer offlinePlayer,
org.bukkit.entity.Player observer) |
Indicates whether an offline player is disguised and the disguise is visible to a given observer.
Calling this function is similar to: api.isDisguised(offlinePlayer) && api.getDisguise(offlinePlayer).isVisibleTo(observer) |
boolean |
isSoundsEnabled() |
Indicates whether the disguised players' sounds are currently replaced.
|
void |
setSeeThrough(org.bukkit.OfflinePlayer player,
boolean seeThrough) |
Sets whether a given player can see through disguises.
|
void |
setSoundsEnabled(boolean enabled) |
Sets whether the disguised players' sounds are replaced.
|
boolean |
setSoundsForEntity(DisguiseType type,
Sounds sounds) |
Sets the
Sounds for a specific entity type. |
boolean |
undisguise(org.bukkit.entity.LivingEntity livingEntity) |
Undisguise a living entity.
Calling undisguise(livingEntity) is equivalent to calling undisguise(livingEntity, true) .This function must only be accessed synchronously. |
boolean |
undisguise(org.bukkit.entity.LivingEntity livingEntity,
boolean fireEvent) |
Undisguise a living entity.
This function must only be accessed synchronously. |
boolean |
undisguise(org.bukkit.entity.Player player) |
Undisguise a player.
Calling undisguise(player) is equivalent to calling undisguise(player, true) .This function must only be accessed synchronously. |
boolean |
undisguise(org.bukkit.entity.Player player,
boolean fireEvent) |
Undisguise a player.
This function must only be accessed synchronously. |
boolean |
undisguise(org.bukkit.OfflinePlayer offlinePlayer) |
Undisguise an offline player.
Calling undisguise(offlinePlayer) is equivalent to calling undisguise(offlinePlayer, true) .This function must only be accessed synchronously. |
boolean |
undisguise(org.bukkit.OfflinePlayer offlinePlayer,
boolean fireEvent) |
Undisguise an offline player.
This function must only be accessed synchronously. |
void |
undisguiseAll() |
Undisguise everyone (includes online and offline players as well as entities).
This function must only be accessed synchronously. |
boolean disguise(org.bukkit.OfflinePlayer offlinePlayer, Disguise disguise)
disguise(offlinePlayer, disguise)
is equivalent to calling disguise(offlinePlayer, disguise, true)
.false
, if another plugin denies the disguiseboolean disguise(org.bukkit.entity.Player player, Disguise disguise)
disguise(player, disguise)
is equivalent to calling disguise(player, disguise, true)
.false
, if another plugin denies the disguiseboolean disguise(org.bukkit.entity.LivingEntity livingEntity, Disguise disguise)
disguise(livingEntity, disguise)
is equivalent to calling disguise(livingEntity, disguise, true)
.false
, if another plugin denies the disguiseboolean disguise(org.bukkit.OfflinePlayer offlinePlayer, Disguise disguise, boolean fireEvent)
fireEvent
- whether an event (OfflinePlayerDisguiseEvent or DisguiseEvent) shall be firedfalse
, if another plugin denies the disguiseboolean disguise(org.bukkit.entity.Player player, Disguise disguise, boolean fireEvent)
fireEvent
- whether an event (DisguiseEvent) shall be firedfalse
, if another plugin denies the disguiseboolean disguise(org.bukkit.entity.LivingEntity livingEntity, Disguise disguise, boolean fireEvent)
fireEvent
- whether an event (EntityDisguiseEvent) shall be firedfalse
, if another plugin denies the disguiseboolean undisguise(org.bukkit.OfflinePlayer offlinePlayer)
undisguise(offlinePlayer)
is equivalent to calling undisguise(offlinePlayer, true)
.false
, if another plugin denies the undisguiseboolean undisguise(org.bukkit.entity.Player player)
undisguise(player)
is equivalent to calling undisguise(player, true)
.false
, if another plugin denies the undisguiseboolean undisguise(org.bukkit.entity.LivingEntity livingEntity)
undisguise(livingEntity)
is equivalent to calling undisguise(livingEntity, true)
.false
, if another plugin denies the undisguiseboolean undisguise(org.bukkit.OfflinePlayer offlinePlayer, boolean fireEvent)
fireEvent
- whether an event (OfflinePlayerUndisguiseEvent or UndisguiseEvent) shall be firedfalse
, if another plugin denies the undisguiseboolean undisguise(org.bukkit.entity.Player player, boolean fireEvent)
fireEvent
- whether an event (UndisguiseEvent) shall be firedfalse
, if another plugin denies the undisguiseboolean undisguise(org.bukkit.entity.LivingEntity livingEntity, boolean fireEvent)
fireEvent
- whether an event (EntityUndisguiseEvent) shall be firedfalse
, if another plugin denies the undisguisevoid undisguiseAll()
boolean isDisguised(org.bukkit.OfflinePlayer offlinePlayer)
boolean isDisguised(org.bukkit.entity.Player player)
boolean isDisguised(org.bukkit.entity.LivingEntity livingEntity)
boolean isDisguisedTo(org.bukkit.OfflinePlayer offlinePlayer, org.bukkit.entity.Player observer)
api.isDisguised(offlinePlayer) && api.getDisguise(offlinePlayer).isVisibleTo(observer)
offlinePlayer
- the offline player to checkobserver
- the observing playertrue
, if and only if the offline player is disguised and the disguise is visible to the given observerboolean isDisguisedTo(org.bukkit.entity.Player player, org.bukkit.entity.Player observer)
api.isDisguised(player) && api.getDisguise(player).isVisibleTo(observer)
player
- the player to checkobserver
- the observing playertrue
, if and only if the player is disguised and the disguise is visible to the given observerboolean isDisguisedTo(org.bukkit.entity.LivingEntity livingEntity, org.bukkit.entity.Player observer)
api.isDisguised(livingEntity) && api.getDisguise(livingEntity).isVisibleTo(observer)
livingEntity
- the living entity to checkobserver
- the observing playertrue
, if and only if the living entity is disguised and the disguise is visible to the given observerDisguise getDisguise(org.bukkit.OfflinePlayer offlinePlayer)
Disguise getDisguise(org.bukkit.entity.Player player)
Disguise getDisguise(org.bukkit.entity.LivingEntity livingEntity)
int getNumberOfDisguisedPlayers()
Sounds getSoundsForEntity(DisguiseType type)
Sounds
for a specific entity type.type
- the entity/disguise typeboolean setSoundsForEntity(DisguiseType type, Sounds sounds)
Sounds
for a specific entity type.type
- the entity/disguise typesounds
- the soundstrue
, if the sounds have been setboolean isSoundsEnabled()
true
, if they are replacedvoid setSoundsEnabled(boolean enabled)
enabled
- true
, if they shall be replacedboolean hasPermission(org.bukkit.entity.Player player, DisguiseType type)
false
for DisguiseType.PLAYER
.player
- the playertype
- the disguise typetrue
, if and only if the player has the required permissionsboolean hasPermission(org.bukkit.entity.Player player, Disguise disguise)
player
- the playerdisguise
- the disguisetrue
, if and only if the player has all required permissions for the given disguise (including subtype permissions)boolean canSeeThrough(org.bukkit.OfflinePlayer player)
player
- the playertrue
, if the player can see through disguisesvoid setSeeThrough(org.bukkit.OfflinePlayer player, boolean seeThrough)
player
- the playerseeThrough
- true
, if the player shall see through disguisesjava.util.Set<java.lang.Object> getDisguisedEntities()