Limb Module
Overview
The limb module allows you to hide the ArmorPiece
and BodyPart
limbs of a player.
- Adds the ability to hide individual armor pieces and body parts of a player.
- Select certain body parts and armor pieces to hide without needing to do any complex integration.
Hide select body parts and armor pieces!
Integration
Hiding an armor piece of a player
public void hideArmorExample(Player viewer, Player target) {
Optional<ApolloPlayer> apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId());
apolloPlayerOpt.ifPresent(apolloPlayer -> {
this.limbModule.hideArmorPieces(apolloPlayer,
target.getUniqueId(),
EnumSet.of(ArmorPiece.HELMET, ArmorPiece.LEGGINGS)
);
});
}
hideArmorPieces
Parameters
ApolloPlayer Viewer
- The player(s) that you wish to see the hidden armor piece.
UUID Target
- The player UUID you want to hide the armor piece of.
ArmorPiece.TYPE
- The armor piece types you wish to hide on the
target
player. See the armor pieces section for more.
- The armor piece types you wish to hide on the
Resetting an armor piece of a player
public void resetArmorExample(Player viewer, Player target) {
Optional<ApolloPlayer> apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId());
apolloPlayerOpt.ifPresent(apolloPlayer -> {
this.limbModule.resetArmorPieces(apolloPlayer,
target.getUniqueId(),
EnumSet.of(ArmorPiece.HELMET, ArmorPiece.LEGGINGS)
);
});
}
resetArmorPieces
Parameters
ApolloPlayer Viewer
- The player(s) that you want to reset the armor piece for.
UUID Target
- The players UUID you want to reset the armor piece of.
ArmorPiece.TYPE
- The type of armor piece(s) you want to reset on the
target
player. See the armor pieces section for more.
- The type of armor piece(s) you want to reset on the
Hiding a body part of a player
public void hideBodyExample(Player viewer, Player target) {
Optional<ApolloPlayer> apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId());
apolloPlayerOpt.ifPresent(apolloPlayer -> {
this.limbModule.hideBodyParts(apolloPlayer,
target.getUniqueId(),
EnumSet.of(BodyPart.HEAD, BodyPart.RIGHT_ARM)
);
});
}
hideBodyParts
Parameters
ApolloPlayer Viewer
- The player(s) you want to see the hidden body part.
UUID Target
- The players UUID you want to hide the body part of.
BodyPart.TYPE
- The type of body part(s) you want to hide on the
target
player. See the body parts section for more.
- The type of body part(s) you want to hide on the
Resetting a body part of a player
public void resetBodyExample(Player viewer, Player target) {
Optional<ApolloPlayer> apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId());
apolloPlayerOpt.ifPresent(apolloPlayer -> {
this.limbModule.resetBodyParts(apolloPlayer,
target.getUniqueId(),
EnumSet.of(BodyPart.HEAD, BodyPart.RIGHT_ARM)
);
});
}
resetBodyParts
Parameters
ApolloPlayer Viewer
- The player(s) you want to reset the body part for.
UUID Target
- The players UUID you want to reset the body part of.
BodyPart.TYPE
- The type of body part(s) you want to reset on the
target
player. See the body parts section for more.
- The type of body part(s) you want to reset on the
ArmorPiece
Types
HELMET
CHESTPLATE
LEGGINGS
BOOTS
BodyPart
Types
HEAD
TORSO
LEFT_ARM
RIGHT_ARM
LEFT_LEG
RIGHT_LEG