Skip to content

P | Utility: EntitySizeUtils

Sartaj Singh edited this page May 31, 2025 · 2 revisions

P | Utility: EntitySizeUtils


Table of Contents


1. Overview

EntitySizeUtils is a utility class in FXItems for changing the size of entities or players in-game, if the EntitySize plugin is present.
It provides methods to set an entity's scale or reset them to their default size.


2. What is EntitySizeUtils?

  • Allows you to make entities (including players) larger or smaller.
  • Depends on the EntitySize plugin for proper operation.
  • Commonly used for abilities, effects, or custom items that change a player's visual size.

3. Basic Usage

Set a player's size

EntitySizeUtils.setSize(player, 2.0f); // Double the player's size

Reset a player's size to normal

EntitySizeUtils.resetSize(player);

4. API Reference

/**
 * Sets the size (scale) of an entity.
 *
 * @param entity The entity to resize.
 * @param scale  The scale factor (e.g., 2.0 for double size, 0.5 for half size).
 */
public static void setSize(Entity entity, float scale);

/**
 * Resets an entity's size to default.
 *
 * @param entity The entity to reset.
 */
public static void resetSize(Entity entity);

5. Advanced Patterns

  • Ability Scaling:
    Use in custom item or ability logic to temporarily make players larger or smaller.
  • Visual Effects:
    Combine with particle or sound effects for dramatic transformations.
  • Check for Plugin:
    Always ensure EntitySize plugin is present before calling these methods.

6. Troubleshooting & Notes

  • If the EntitySize plugin is not installed, these methods may do nothing.
  • Scaling can affect hitboxes and interactions, so use carefully in PvP/PvE scenarios.
  • Resetting is important after temporary effects to avoid leaving players/entities at the wrong size.

7. See Also


Clone this wiki locally