Apollo
Developers
Modules
Limb

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.

Limb Module Example

Hide select body parts and armor pieces!

Integration

Sample Code

Explore each integration by cycling through each tab, to find the best fit for your requirements and needs.

Hide Armor Pieces

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)
        );
    });
}

Reset Armor Pieces

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)
        );
    });
}

Hide Body Parts

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)
        );
    });
}

Reset Body Parts

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)
        );
    });
}

hideArmorPieces & resetArmorPieces Parameters

  1. Recipients recipients
    • A list of all the player(s) you want to be able to see the updated armor pieces.
  2. UUID Target
    • The player UUID you want to hide the armor piece of.
  3. ArmorPiece.TYPE
    • The armor piece types you wish to hide on the target player. See the armor pieces section for more.

hideBodyParts & resetBodyParts Parameters

  1. Recipients recipients
    • A list of all the player(s) you want to be able to see the updated armor pieces.
  2. UUID Target
    • The players UUID you want to reset the body part of.
  3. BodyPart.TYPE
    • The type of body part(s) you want to reset on the target player. See the body parts section for more.

ArmorPiece Types

  • HELMET
  • CHESTPLATE
  • LEGGINGS
  • BOOTS

BodyPart Types

  • HEAD
  • TORSO
  • LEFT_ARM
  • RIGHT_ARM
  • LEFT_LEG
  • RIGHT_LEG