diff --git a/api/src/main/java/com/clubobsidian/dynamicgui/api/effect/ParticleWrapper.java b/api/src/main/java/com/clubobsidian/dynamicgui/api/effect/ParticleWrapper.java index 6fcc5aeeb..237d77692 100644 --- a/api/src/main/java/com/clubobsidian/dynamicgui/api/effect/ParticleWrapper.java +++ b/api/src/main/java/com/clubobsidian/dynamicgui/api/effect/ParticleWrapper.java @@ -42,10 +42,20 @@ public ParticleWrapper(@NotNull ParticleData data) { this.data = Objects.requireNonNull(data); } + /** + * Gets the ParticleData for the particle effect + * + * @return the ParticleData object + */ public ParticleData getData() { return this.data; } + /** + * Spawns the particle effect for the player + * + * @param player the player to spawn the effect for + */ public void spawnEffect(@NotNull PlayerWrapper player) { Objects.requireNonNull(player); player.playEffect(this.data); @@ -53,6 +63,11 @@ public void spawnEffect(@NotNull PlayerWrapper player) { public static class ParticleData { + /** + * Creates a ParticleData object from a string + * @param str the string to create the ParticleData object from + * @return ParticleData object from the given string + */ public static ParticleData fromString(@NotNull String str) { Objects.requireNonNull(str); if (str.contains(",")) { diff --git a/api/src/main/java/com/clubobsidian/dynamicgui/api/effect/SoundWrapper.java b/api/src/main/java/com/clubobsidian/dynamicgui/api/effect/SoundWrapper.java index b1c6e1baa..4f6ca267f 100644 --- a/api/src/main/java/com/clubobsidian/dynamicgui/api/effect/SoundWrapper.java +++ b/api/src/main/java/com/clubobsidian/dynamicgui/api/effect/SoundWrapper.java @@ -44,10 +44,20 @@ public SoundWrapper(@NotNull SoundData data) { this.data = Objects.requireNonNull(data); } + /** + * Gets the SoundData for the sound effect + * + * @return the SoundData object + */ public SoundData getData() { return this.data; } + /** + * Plays the sound to the player + * + * @param player the player to play the sound to + */ public void playSoundToPlayer(@NotNull PlayerWrapper player) { Objects.requireNonNull(player); player.playSound(this.data); @@ -55,6 +65,11 @@ public void playSoundToPlayer(@NotNull PlayerWrapper player) { public static class SoundData { + /** + * Creates a SoundData object from a string + * @param str The string to create the SoundData object from + * @return SoundData object from the string + */ public static SoundData fromString(@NotNull String str) { Objects.requireNonNull(str); if (str.contains(",")) { @@ -82,15 +97,29 @@ private SoundData(@NotNull String sound, float volume, float pitch) { this.volume = volume; this.pitch = pitch; } - + /** + * Gets the sound name + * + * @return the sound name + */ public String getSound() { return this.sound; } + /** + * Gets the volume of the sound + * + * @return the volume of the sound + */ public float getVolume() { return this.volume; } + /** + * Gets the pitch of the sound + * + * @return the pitch of the sound + */ public float getPitch() { return this.pitch; } diff --git a/api/src/main/java/com/clubobsidian/dynamicgui/api/enchantment/EnchantmentWrapper.java b/api/src/main/java/com/clubobsidian/dynamicgui/api/enchantment/EnchantmentWrapper.java index 34be5db5d..38085a759 100644 --- a/api/src/main/java/com/clubobsidian/dynamicgui/api/enchantment/EnchantmentWrapper.java +++ b/api/src/main/java/com/clubobsidian/dynamicgui/api/enchantment/EnchantmentWrapper.java @@ -44,14 +44,25 @@ public EnchantmentWrapper(@NotNull String enchant, int level) { this.level = level; } + /** + * Gets the enchantment + * @return String enchantment + */ public String getEnchant() { return this.enchant; } + /** + * Gets the level of the enchantment + * @return int level of the enchantment + */ public int getLevel() { return this.level; } + /** + * Static builder for the enchantment wrapper + */ public static class Builder { private transient String enchantment; diff --git a/api/src/main/java/com/clubobsidian/dynamicgui/api/entity/EntityWrapper.java b/api/src/main/java/com/clubobsidian/dynamicgui/api/entity/EntityWrapper.java index cbfd5eac0..a34dc0229 100644 --- a/api/src/main/java/com/clubobsidian/dynamicgui/api/entity/EntityWrapper.java +++ b/api/src/main/java/com/clubobsidian/dynamicgui/api/entity/EntityWrapper.java @@ -29,6 +29,10 @@ public EntityWrapper(@NotNull T entity) { this.entity = Objects.requireNonNull(entity); } + /** + * Get the UUID of the entity + * @return the UUID of the entity + */ public abstract UUID getUniqueId(); /** diff --git a/api/src/main/java/com/clubobsidian/dynamicgui/api/plugin/DynamicGuiPlugin.java b/api/src/main/java/com/clubobsidian/dynamicgui/api/plugin/DynamicGuiPlugin.java index 3a90ceb34..3f64b70fe 100644 --- a/api/src/main/java/com/clubobsidian/dynamicgui/api/plugin/DynamicGuiPlugin.java +++ b/api/src/main/java/com/clubobsidian/dynamicgui/api/plugin/DynamicGuiPlugin.java @@ -52,14 +52,23 @@ default Permission getPermission() { File getDataFolder(); + /** + * @return the DynamicGUI config file + */ default File getConfigFile() { return new File(this.getDataFolder(), "config.yml"); } + /** + * @return the default gui folder + */ default File getGuiFolder() { return new File(this.getDataFolder(), "guis"); } + /** + * @return the default macro folder + */ default File getMacroFolder() { return new File(this.getDataFolder(), "macros"); } diff --git a/api/src/main/java/com/clubobsidian/dynamicgui/api/proxy/Proxy.java b/api/src/main/java/com/clubobsidian/dynamicgui/api/proxy/Proxy.java index 6db8ea19a..30cf3a4f1 100644 --- a/api/src/main/java/com/clubobsidian/dynamicgui/api/proxy/Proxy.java +++ b/api/src/main/java/com/clubobsidian/dynamicgui/api/proxy/Proxy.java @@ -37,6 +37,11 @@ public enum Proxy { this.aliases = aliases; } + /** + * Returns a proxy from its string alias + * @param proxyStr + * @return + */ public static Proxy fromString(final String proxyStr) { String localeStr = proxyStr.toLowerCase(Locale.ROOT); for (Proxy proxy : Proxy.values()) { @@ -49,11 +54,19 @@ public static Proxy fromString(final String proxyStr) { return Proxy.NONE; } + /** + * Gets the aliases of a proxy + * @return The aliases of the proxy + */ public String[] getAliases() { return this.aliases; } + /** + * Gets the protocol of the proxy + * @return The protocol of the proxy + */ public Protocol getProtocol() { return this.protocol; } diff --git a/api/src/main/java/com/clubobsidian/dynamicgui/api/replacer/Replacer.java b/api/src/main/java/com/clubobsidian/dynamicgui/api/replacer/Replacer.java index 52b7c9788..a83b67dfc 100644 --- a/api/src/main/java/com/clubobsidian/dynamicgui/api/replacer/Replacer.java +++ b/api/src/main/java/com/clubobsidian/dynamicgui/api/replacer/Replacer.java @@ -32,12 +32,28 @@ public Replacer(String toReplace, boolean listener) { this.listener = listener; } + /** + * Gets the string to replace + * + * @return The string to replace + */ public String getToReplace() { return this.toReplace; } + /** + * Replaces the toReplace string with the replacement + * @param text + * @param playerWrapper + * @return + */ public abstract String replacement(String text, PlayerWrapper playerWrapper); + /** + * Gets if the replacer has a listener + * + * @return If the replacer has a listener + */ public boolean hasListener() { return this.listener; } diff --git a/api/src/main/java/com/clubobsidian/dynamicgui/api/world/LocationWrapper.java b/api/src/main/java/com/clubobsidian/dynamicgui/api/world/LocationWrapper.java index 649095bac..97cd22403 100644 --- a/api/src/main/java/com/clubobsidian/dynamicgui/api/world/LocationWrapper.java +++ b/api/src/main/java/com/clubobsidian/dynamicgui/api/world/LocationWrapper.java @@ -38,18 +38,38 @@ public LocationWrapper(int x, int y, int z, WorldWrapper world) { this.world = world; } + /** + * Gets the x coordinate of the location + * + * @return x coordinate of the location + */ public int getX() { return this.x; } + /** + * Gets the y coordinate of the location + * + * @return y coordinate of the location + */ public int getY() { return this.y; } + /** + * Gets the z coordinate of the location + * + * @return z coordinate of the location + */ public int getZ() { return this.z; } + /** + * Gets the WorldWrapper for the location + * + * @return world of the location + */ public WorldWrapper getWorld() { return this.world; } diff --git a/api/src/main/java/com/clubobsidian/dynamicgui/api/world/WorldWrapper.java b/api/src/main/java/com/clubobsidian/dynamicgui/api/world/WorldWrapper.java index 62beaa90f..cc0072647 100644 --- a/api/src/main/java/com/clubobsidian/dynamicgui/api/world/WorldWrapper.java +++ b/api/src/main/java/com/clubobsidian/dynamicgui/api/world/WorldWrapper.java @@ -31,14 +31,29 @@ public WorldWrapper(String name) { this.name = name; } + /** + * Gets the name of the world + * + * @return The name of the world + */ public String getName() { return this.name; } public abstract T getWorld(); + /** + * Sets the gamerule key of the world to the specified gamerule value + * @param key + * @param value + */ public abstract void setGameRule(String key, String value); + /** + * Gets value of the gamerule for the world + * @param rule + * @return gamerule value + */ public abstract String getGameRule(String rule); @Override