From 8c69edd891b11fe07ba239870a0365e39539c6a1 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 14 Dec 2024 11:39:29 +1100 Subject: [PATCH] Update spawner/vault documentation to clarify distance value is not squared --- src/main/java/org/bukkit/block/TrialSpawner.java | 8 ++++---- src/main/java/org/bukkit/block/Vault.java | 16 ++++++++-------- .../java/org/bukkit/spawner/BaseSpawner.java | 8 ++++---- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/main/java/org/bukkit/block/TrialSpawner.java b/src/main/java/org/bukkit/block/TrialSpawner.java index 2d46d85a..db97f51a 100644 --- a/src/main/java/org/bukkit/block/TrialSpawner.java +++ b/src/main/java/org/bukkit/block/TrialSpawner.java @@ -28,7 +28,7 @@ public interface TrialSpawner extends TileState { public void setCooldownLength(int ticks); /** - * Get the maximum distance(squared) a player can be in order for this + * Get the maximum distance a player can be in order for this * spawner to be active. *
* If this value is less than or equal to 0, this spawner is always active @@ -36,19 +36,19 @@ public interface TrialSpawner extends TileState { *
* Default value is 16. * - * @return the maximum distance(squared) a player can be in order for this + * @return the maximum distance a player can be in order for this * spawner to be active. */ public int getRequiredPlayerRange(); /** - * Set the maximum distance (squared) a player can be in order for this + * Set the maximum distance a player can be in order for this * spawner to be active. *
* Setting this value to less than or equal to 0 will make this spawner * always active (given that there are players online). * - * @param requiredPlayerRange the maximum distance (squared) a player can be + * @param requiredPlayerRange the maximum distance a player can be * in order for this spawner to be active. */ public void setRequiredPlayerRange(int requiredPlayerRange); diff --git a/src/main/java/org/bukkit/block/Vault.java b/src/main/java/org/bukkit/block/Vault.java index ad6b8b66..201e1c8a 100644 --- a/src/main/java/org/bukkit/block/Vault.java +++ b/src/main/java/org/bukkit/block/Vault.java @@ -13,37 +13,37 @@ import org.jetbrains.annotations.Nullable; public interface Vault extends TileState { /** - * Gets the distance(squared) at which a player must enter for this vault to + * Gets the distance at which a player must enter for this vault to * activate. * - * @return the distance(squared) at which a player must enter for this vault + * @return the distance at which a player must enter for this vault * to activate. */ double getActivationRange(); /** - * Sets the distance(squared) at which a player must enter for this vault to + * Sets the distance at which a player must enter for this vault to * activate. * - * @param range the distance(squared) at which a player must enter for this + * @param range the distance at which a player must enter for this * vault to activate. */ void setActivationRange(double range); /** - * Gets the distance(squared) at which a player must exit for the vault to + * Gets the distance at which a player must exit for the vault to * deactivate. * - * @return the distance(squared) at which a player must exit for the vault + * @return the distance at which a player must exit for the vault * to deactivate. */ double getDeactivationRange(); /** - * Sets the distance(squared) at which a player must exit for this vault to + * Sets the distance at which a player must exit for this vault to * deactivate. * - * @param range the distance(squared) at which a player must exit for this + * @param range the distance at which a player must exit for this * vault to deactivate. */ void setDeactivationRange(double range); diff --git a/src/main/java/org/bukkit/spawner/BaseSpawner.java b/src/main/java/org/bukkit/spawner/BaseSpawner.java index 553aa2dc..58a50e70 100644 --- a/src/main/java/org/bukkit/spawner/BaseSpawner.java +++ b/src/main/java/org/bukkit/spawner/BaseSpawner.java @@ -50,7 +50,7 @@ public interface BaseSpawner { public void setDelay(int delay); /** - * Get the maximum distance(squared) a player can be in order for this + * Get the maximum distance a player can be in order for this * spawner to be active. *
* If this value is less than or equal to 0, this spawner is always active @@ -58,19 +58,19 @@ public interface BaseSpawner { *
* Default value is 16. * - * @return the maximum distance(squared) a player can be in order for this + * @return the maximum distance a player can be in order for this * spawner to be active. */ public int getRequiredPlayerRange(); /** - * Set the maximum distance (squared) a player can be in order for this + * Set the maximum distance a player can be in order for this * spawner to be active. *
* Setting this value to less than or equal to 0 will make this spawner * always active (given that there are players online). * - * @param requiredPlayerRange the maximum distance (squared) a player can be + * @param requiredPlayerRange the maximum distance a player can be * in order for this spawner to be active. */ public void setRequiredPlayerRange(int requiredPlayerRange);