diff --git a/src/main/java/eu/decentsoftware/holograms/api/holograms/Hologram.java b/src/main/java/eu/decentsoftware/holograms/api/holograms/Hologram.java index a129db2c..f2e99353 100644 --- a/src/main/java/eu/decentsoftware/holograms/api/holograms/Hologram.java +++ b/src/main/java/eu/decentsoftware/holograms/api/holograms/Hologram.java @@ -71,6 +71,9 @@ public class Hologram extends UpdatingHologramObject implements ITicked { CACHED_HOLOGRAMS = new ConcurrentHashMap<>(); } + /** + * @see eu.decentsoftware.holograms.api.DHAPI#getHologram(String) + */ public static Hologram getCachedHologram(@NonNull String name) { return CACHED_HOLOGRAMS.get(name); } @@ -248,6 +251,7 @@ public static Hologram fromFile(final @NotNull String filePath) throws LocationP * * @param name The name of the hologram. * @param location The location of the hologram. + * @see eu.decentsoftware.holograms.api.DHAPI#createHologram(String, Location) */ public Hologram(@NonNull String name, @NonNull Location location) { this(name, location, true); @@ -259,6 +263,7 @@ public Hologram(@NonNull String name, @NonNull Location location) { * @param name The name of the hologram. * @param location The location of the hologram. * @param saveToFile Whether the hologram should be saved to a file. + * @see eu.decentsoftware.holograms.api.DHAPI#createHologram(String, Location, boolean) */ public Hologram(@NonNull String name, @NonNull Location location, boolean saveToFile) { this(name, location, saveToFile ? new FileConfig(DECENT_HOLOGRAMS.getPlugin(), String.format("holograms/%s.yml", name)) : null); @@ -335,6 +340,8 @@ public String toString() { /** * This method calls {@link #destroy()} before deleting the hologram file. + * + * @see eu.decentsoftware.holograms.api.DHAPI#removeHologram(String) */ @Override public void delete() { @@ -406,6 +413,7 @@ public void setFacing(float facing) { * for the players, you have to call {@link #realignLines()} for that. * * @param location The new location of this hologram. + * @see eu.decentsoftware.holograms.api.DHAPI#moveHologram(Hologram, Location) */ @Override public void setLocation(@NonNull Location location) { @@ -533,15 +541,6 @@ public void onQuit(@NonNull Player player) { * Visibility Methods */ - /** - * Set default display state - * - * @param state state - */ - public void setDefaultVisibleState(boolean state) { - this.defaultVisibleState = state; - } - /** * @return Default display state */ @@ -680,6 +679,10 @@ public void updateAll() { updateAll(false); } + /** + * @param force If true, the line will be updated even if it does not need to be. + * @see eu.decentsoftware.holograms.api.DHAPI#updateHologram(String) + */ public void updateAll(boolean force) { synchronized (visibilityMutex) { if (isEnabled() && !hasFlag(EnumFlag.DISABLE_UPDATING)) { @@ -896,12 +899,18 @@ public void realignLines() { } } + /** + * @see eu.decentsoftware.holograms.api.DHAPI#addHologramPage(Hologram) + */ public HologramPage addPage() { HologramPage page = new HologramPage(this, pages.size()); pages.add(page); return page; } + /** + * @see eu.decentsoftware.holograms.api.DHAPI#insertHologramPage(Hologram, int) + */ public HologramPage insertPage(int index) { if (index < 0 || index > size()) return null; HologramPage page = new HologramPage(this, index); @@ -919,6 +928,9 @@ public HologramPage insertPage(int index) { return page; } + /** + * @see eu.decentsoftware.holograms.api.DHAPI#getHologramPage(Hologram, int) + */ public HologramPage getPage(int index) { if (index < 0 || index >= size()) return null; return pages.get(index); @@ -931,6 +943,9 @@ public HologramPage getPage(@NonNull Player player) { return null; } + /** + * @see eu.decentsoftware.holograms.api.DHAPI#removeHologramPage(Hologram, int) + */ public HologramPage removePage(int index) { if (index < 0 || index >= size()) { return null; diff --git a/src/main/java/eu/decentsoftware/holograms/api/holograms/HologramLine.java b/src/main/java/eu/decentsoftware/holograms/api/holograms/HologramLine.java index 9dbca705..18ef77d9 100644 --- a/src/main/java/eu/decentsoftware/holograms/api/holograms/HologramLine.java +++ b/src/main/java/eu/decentsoftware/holograms/api/holograms/HologramLine.java @@ -144,6 +144,9 @@ public static HologramLine fromMap(@NonNull Map map, @Nullable H * Constructors */ + /** + * @see eu.decentsoftware.holograms.api.DHAPI#createHologramLine(HologramPage, Location, String) + */ public HologramLine(@Nullable HologramPage parent, @NonNull Location location, @NotNull String content) { super(location); this.parent = parent; diff --git a/src/main/java/eu/decentsoftware/holograms/api/holograms/HologramPage.java b/src/main/java/eu/decentsoftware/holograms/api/holograms/HologramPage.java index 529d8605..efc2284e 100644 --- a/src/main/java/eu/decentsoftware/holograms/api/holograms/HologramPage.java +++ b/src/main/java/eu/decentsoftware/holograms/api/holograms/HologramPage.java @@ -155,6 +155,7 @@ public void realignLines() { * * @param line New line. * @return Boolean whether the operation was successful. + * @see eu.decentsoftware.holograms.api.DHAPI#addHologramLine(HologramPage, String) */ public boolean addLine(@NonNull HologramLine line) { lines.add(line); @@ -169,6 +170,7 @@ public boolean addLine(@NonNull HologramLine line) { * @param index Index of the new line. * @param line New line. * @return Boolean whether the operation was successful. + * @see eu.decentsoftware.holograms.api.DHAPI#insertHologramLine(Hologram, int, String) */ public boolean insertLine(int index, @NonNull HologramLine line) { if (index < 0 || index >= size()) { @@ -186,6 +188,7 @@ public boolean insertLine(int index, @NonNull HologramLine line) { * @param index Index of the line. * @param content Line's new content. * @return Boolean whether the operation was successful. + * @see eu.decentsoftware.holograms.api.DHAPI#setHologramLine(HologramPage, int, String) */ public boolean setLine(int index, @NonNull String content) { HologramLine line = getLine(index); @@ -210,6 +213,7 @@ public boolean setLine(int index, @NonNull String content) { * * @param index Index of the line. * @return The HologramLine or null if it wasn't found. + * @see eu.decentsoftware.holograms.api.DHAPI#getHologramLine(HologramPage, int) */ public HologramLine getLine(int index) { if (index < 0 || index >= size()) { @@ -223,6 +227,7 @@ public HologramLine getLine(int index) { * * @param index Index of the line. * @return The removed line or null if it wasn't found. + * @see eu.decentsoftware.holograms.api.DHAPI#removeHologramLine(HologramPage, int) */ public HologramLine removeLine(int index) { if (index < 0 || index >= size()) {