diff --git a/plugins/fancyholograms/fh-api/src/main/java/com/fancyinnovations/fancyholograms/api/HologramController.java b/plugins/fancyholograms/fh-api/src/main/java/com/fancyinnovations/fancyholograms/api/HologramController.java index 2cadc6e1..99a7ee65 100644 --- a/plugins/fancyholograms/fh-api/src/main/java/com/fancyinnovations/fancyholograms/api/HologramController.java +++ b/plugins/fancyholograms/fh-api/src/main/java/com/fancyinnovations/fancyholograms/api/HologramController.java @@ -13,13 +13,13 @@ import java.util.Collection; public interface HologramController { /** - * Shows the hologram to the given players, if they should see it, and it is not already shown to them. + * Shows the hologram to the given players if they should see it, and it is not yet shown to them. */ @ApiStatus.Internal void showHologramTo(@NotNull final Hologram hologram, @NotNull final Player... players); /** - * Hides the hologram from the given players, if they should not see it, and it is shown to them. + * Hides the hologram from the given players if they should not see it, and it is shown to them. */ @ApiStatus.Internal void hideHologramFrom(@NotNull final Hologram hologram, @NotNull final Player... players); @@ -38,7 +38,7 @@ public interface HologramController { void updateHologramData(@NotNull final Hologram hologram, @NotNull final Player... players); /** - * Spawns the hologram to the given players, if they should see it, and it is not already shown to them. + * Spawns the hologram to the given players if they should see it, and it is not yet shown to them. * Hide the hologram from the players that should not see it. */ void refreshHologram(@NotNull final Hologram hologram, @NotNull final Player... players); diff --git a/plugins/fancyholograms/fh-api/src/main/java/com/fancyinnovations/fancyholograms/api/data/builder/BlockHologramBuilder.java b/plugins/fancyholograms/fh-api/src/main/java/com/fancyinnovations/fancyholograms/api/data/builder/BlockHologramBuilder.java index 98203acf..8ed2256c 100644 --- a/plugins/fancyholograms/fh-api/src/main/java/com/fancyinnovations/fancyholograms/api/data/builder/BlockHologramBuilder.java +++ b/plugins/fancyholograms/fh-api/src/main/java/com/fancyinnovations/fancyholograms/api/data/builder/BlockHologramBuilder.java @@ -22,6 +22,11 @@ public class BlockHologramBuilder extends HologramBuilder { return new BlockHologramBuilder(name, location); } + /** + * Sets the block material for the block hologram. + * + * @param block the material of the block + */ public BlockHologramBuilder block(Material block) { ((BlockHologramData) data).setBlock(block); return this; diff --git a/plugins/fancyholograms/fh-api/src/main/java/com/fancyinnovations/fancyholograms/api/data/builder/HologramBuilder.java b/plugins/fancyholograms/fh-api/src/main/java/com/fancyinnovations/fancyholograms/api/data/builder/HologramBuilder.java index ec59d1b7..36382d90 100644 --- a/plugins/fancyholograms/fh-api/src/main/java/com/fancyinnovations/fancyholograms/api/data/builder/HologramBuilder.java +++ b/plugins/fancyholograms/fh-api/src/main/java/com/fancyinnovations/fancyholograms/api/data/builder/HologramBuilder.java @@ -39,21 +39,43 @@ public abstract class HologramBuilder { // The following methods are setters for the HologramData class + /** + * Sets the visibility distance for the hologram + * + * @param distance the visibility distance in blocks + */ public HologramBuilder visibilityDistance(int distance) { data.setVisibilityDistance(distance); return this; } + /** + * Sets the visibility mode for the hologram + * + * @param visibility the visibility mode + */ public HologramBuilder visibility(Visibility visibility) { data.setVisibility(visibility); return this; } + /** + * Sets whether the hologram is persistent (remains after server restarts) + * Default is true. + * + * @param persistent true if the hologram should be persistent, false otherwise + */ public HologramBuilder persistent(boolean persistent) { data.setPersistent(persistent); return this; } + /** + * Sets the name of the NPC to which the hologram is linked. + * It will become the NPC's display name. + * + * @param linkedNpcName the name of the NPC to link to + */ public HologramBuilder linkedNpcName(String linkedNpcName) { data.setLinkedNpcName(linkedNpcName); return this; @@ -61,6 +83,8 @@ public abstract class HologramBuilder { /** * Adds a trait to the hologram. + * + * @param trait the class of the trait to add */ public final HologramBuilder trait(Class trait) { data.addTrait(trait); @@ -70,36 +94,76 @@ public abstract class HologramBuilder { // The following methods are specific to the DisplayHologramData class + /** + * Sets the display billboard mode for the hologram. + * + * @param billboard the billboard mode + */ public HologramBuilder billboard(Display.Billboard billboard) { data.setBillboard(billboard); return this; } + /** + * Sets the display transform for the hologram. + * + * @param x the factor to scale on the x-axis + * @param y the factor to scale on the y-axis + * @param z the factor to scale on the z-axis + */ public HologramBuilder scale(float x, float y, float z) { data.setScale(new Vector3f(x, y, z)); return this; } + /** + * Moves the hologram by the specified amounts along each axis. + * + * @param x the amount to move along the x-axis + * @param y the amount to move along the y-axis + * @param z the amount to move along the z-axis + */ public HologramBuilder translation(float x, float y, float z) { data.setTranslation(new Vector3f(x, y, z)); return this; } + /** + * Sets the brightness for the hologram. + * + * @param blockLight the block light level (0-15) + * @param skyLight the skylight level (0-15) + */ public HologramBuilder brightness(int blockLight, int skyLight) { data.setBrightness(new Display.Brightness(blockLight, skyLight)); return this; } + /** + * Sets the shadow properties for the hologram. + * + * @param shadowRadius the radius of the shadow + */ public HologramBuilder shadowRadius(float shadowRadius) { data.setShadowRadius(shadowRadius); return this; } + /** + * Sets the shadow strength for the hologram. + * + * @param shadowStrength the strength of the shadow + */ public HologramBuilder shadowStrength(float shadowStrength) { data.setShadowStrength(shadowStrength); return this; } + /** + * Sets the interpolation duration for the hologram. + * + * @param interpolationDuration the duration in ticks + */ public HologramBuilder interpolationDuration(int interpolationDuration) { data.setInterpolationDuration(interpolationDuration); return this; diff --git a/plugins/fancyholograms/fh-api/src/main/java/com/fancyinnovations/fancyholograms/api/data/builder/ItemHologramBuilder.java b/plugins/fancyholograms/fh-api/src/main/java/com/fancyinnovations/fancyholograms/api/data/builder/ItemHologramBuilder.java index 41287593..e80ece6f 100644 --- a/plugins/fancyholograms/fh-api/src/main/java/com/fancyinnovations/fancyholograms/api/data/builder/ItemHologramBuilder.java +++ b/plugins/fancyholograms/fh-api/src/main/java/com/fancyinnovations/fancyholograms/api/data/builder/ItemHologramBuilder.java @@ -22,6 +22,11 @@ public class ItemHologramBuilder extends HologramBuilder { return new ItemHologramBuilder(name, location); } + /** + * Sets the item stack for the item hologram. + * + * @param item the item stack to be displayed + */ public ItemHologramBuilder item(ItemStack item) { ((ItemHologramData) data).setItemStack(item); return this;