Package studio.magemonkey.fabled.hook
Class DisguiseHook
java.lang.Object
studio.magemonkey.fabled.hook.DisguiseHook
Handles calling functions from Lib's Disguise
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddisguiseMisc(org.bukkit.entity.LivingEntity target, String type, int data) Disguises the target as a miscellaneous thingstatic voiddisguiseMisc(org.bukkit.entity.LivingEntity target, String type, org.bukkit.Material mat) Disguises the target as a miscellaneous thingstatic voiddisguiseMob(org.bukkit.entity.LivingEntity target, String type, boolean adult) Disguises the target as a mobstatic voiddisguisePlayer(org.bukkit.entity.LivingEntity target, String player) Disguises the target as a playerstatic me.libraryaddict.disguise.utilities.reflection.FakeBoundingBoxgetFakeBoundingBox(org.bukkit.entity.Entity entity) Gets the server-side hitbox of a disguised entity, as (width, height, depth).static booleanChecks whether disguise hitboxes can be read from the installed LibsDisguises versionstatic booleanisServerBoundingBoxEnabled(org.bukkit.entity.Entity entity) Checks whether the entity's disguise replaces its server-side hitboxstatic voidremoveDisguise(org.bukkit.entity.LivingEntity target) Removes all disguises from the target
-
Constructor Details
-
DisguiseHook
public DisguiseHook()
-
-
Method Details
-
isBoundingBoxSupported
public static boolean isBoundingBoxSupported()Checks whether disguise hitboxes can be read from the installed LibsDisguises version- Returns:
- true if LibsDisguises 26.x or newer is installed
-
isServerBoundingBoxEnabled
public static boolean isServerBoundingBoxEnabled(org.bukkit.entity.Entity entity) Checks whether the entity's disguise replaces its server-side hitbox- Parameters:
entity- disguised entity- Returns:
- true if the disguise's hitbox should be used
-
disguiseMob
Disguises the target as a mob- Parameters:
target- target to disguisetype- type of mob to disguise asadult- whether the mob is an adult
-
disguisePlayer
Disguises the target as a player- Parameters:
target- target to disguiseplayer- player to disguise as
-
disguiseMisc
Disguises the target as a miscellaneous thing- Parameters:
target- target to disguisetype- disguise typedata- disguise data value
-
disguiseMisc
public static void disguiseMisc(org.bukkit.entity.LivingEntity target, String type, org.bukkit.Material mat) Disguises the target as a miscellaneous thing- Parameters:
target- target to disguisetype- disguise typemat- disguise material value
-
removeDisguise
public static void removeDisguise(org.bukkit.entity.LivingEntity target) Removes all disguises from the target- Parameters:
target- target to remove disguises from
-
getFakeBoundingBox
public static me.libraryaddict.disguise.utilities.reflection.FakeBoundingBox getFakeBoundingBox(org.bukkit.entity.Entity entity) Gets the server-side hitbox of a disguised entity, as (width, height, depth).- Parameters:
entity- disguised entity- Returns:
- the disguise's bounding box, or null if it isn't known
-