Skip to content

Commit b310c3e

Browse files
Fix Javadoc Errors / Warnings (#3265)
Companion to CitizensDev/CitizensAPI#90
1 parent d004fa9 commit b310c3e

File tree

10 files changed

+26
-19
lines changed

10 files changed

+26
-19
lines changed

main/src/main/java/net/citizensnpcs/Metrics.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
/**
3939
* bStats collects some data for plugin authors.
4040
* <p>
41-
* Check out https://bStats.org/ to learn more about bStats!
41+
* Check out <a href="https://bStats.org/">bStats.org</a> to learn more about bStats!
4242
*/
4343

4444
public class Metrics {
@@ -471,11 +471,11 @@ public String toString() {
471471
}
472472

473473
/**
474-
* Escapes the given string like stated in https://www.ietf.org/rfc/rfc4627.txt.
474+
* Escapes the given string like stated in <a href="https://www.ietf.org/rfc/rfc4627.txt">IETF RFC4627</a>.
475475
*
476476
* <p>
477-
* This method escapes only the necessary characters '"', '\'. and '\u0000' - '\u001F'. Compact escapes are not
478-
* used (e.g., '\n' is escaped as "\u000a" and not as "\n").
477+
* This method escapes only the necessary characters '"', '&#92;'. and '&#92;u0000' - '&#92;u001F'.
478+
* Compact escapes are not used (e.g., '&#92;n' is escaped as "&#92;u000a" and not as "&#92;n").
479479
*
480480
* @param value
481481
* The value to escape.

main/src/main/java/net/citizensnpcs/npc/skin/Skin.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ public class Skin {
4646
*
4747
* @param skinName
4848
* The name of the player the skin belongs to.
49-
* @param forceUpdate
5049
*/
5150
Skin(String skinName) {
5251
this.skinName = skinName.toLowerCase(Locale.ROOT);

main/src/main/java/net/citizensnpcs/npc/skin/SkinUpdateTracker.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ public class SkinUpdateTracker {
4343

4444
/**
4545
* Constructor.
46-
*
47-
* @param registries
48-
* Map of other registries.
4946
*/
5047
public SkinUpdateTracker() {
5148
updater.runTaskTimer(CitizensAPI.getPlugin(), 1, 1);

main/src/main/java/net/citizensnpcs/trait/Controllable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
/**
3131
* Persists the controllable status for /npc controllable
32-
*
32+
* <p>
3333
* A controllable {@link NPC} can be mounted by a {@link Player} using right click or /npc mount and moved around using
3434
* e.g. arrow keys.
3535
*/

main/src/main/java/net/citizensnpcs/trait/EntityPoseTrait.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ private EntityPose(int id) {
5555
this.id = id;
5656
}
5757

58-
@Deprecated
5958
/**
60-
* Internal minecraft ID
59+
* @return Internal minecraft ID
6160
*/
61+
@Deprecated
6262
public int id() {
6363
return id;
6464
}

main/src/main/java/net/citizensnpcs/trait/HologramTrait.java

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ private void reloadLineHolograms() {
283283
* Removes the line at the specified index
284284
*
285285
* @param idx
286+
* Line Index
286287
*/
287288
public void removeLine(int idx) {
288289
if (idx < 0 || idx >= lines.size())
@@ -595,12 +596,18 @@ public static interface HologramRenderer {
595596
void destroy();
596597

597598
/**
598-
* @return Any associated hologram entities. Used in {@link #getEntities()}.
599+
* Gets hologram entities associated with the Hologram Trait.
600+
* @implNote Known implementations:
601+
* <ul>
602+
* <li>{@link ItemRenderer#getEntities()}</li>
603+
* <li>{@link SingleEntityHologramRenderer#getEntities()}</li>
604+
* </ul>
605+
* @return Any associated hologram entities.
599606
*/
600607
Collection<Entity> getEntities();
601608

602609
/**
603-
* If {@link NPC.Metadata.HOLOGRAM_RENDERER} is set on any entity and ProtocolLib is enabled, this method will
610+
* If {@link NPC.Metadata#HOLOGRAM_RENDERER} is set on any entity and ProtocolLib is enabled, this method will
604611
* be called to modify the name per-player. Note: this should be async-safe. This method is fragile and may be
605612
* moved elsewhere.
606613
*
@@ -613,7 +620,7 @@ public static interface HologramRenderer {
613620
String getPerPlayerText(NPC hologram, Player viewer);
614621

615622
/**
616-
* If {@link NPC.Metadata.HOLOGRAM_RENDERER} is set on any entity and ProtocolLib is enabled, returns whether
623+
* If {@link NPC.Metadata#HOLOGRAM_RENDERER} is set on any entity and ProtocolLib is enabled, returns whether
617624
* the NPC should be considered sneaking or not to the viewing player. Presently called only when player first
618625
* sees the NPC (i.e. not proactively).Note: this should be async-safe. This method is fragile and may be moved
619626
* elsewhere.
@@ -629,7 +636,7 @@ default boolean isSneaking(NPC npc, Player player) {
629636
}
630637

631638
/**
632-
* If {@link NPC.Metadata.HOLOGRAM_RENDERER} is set on any entity, called when it is seen for the first time by
639+
* If {@link NPC.Metadata#HOLOGRAM_RENDERER} is set on any entity, called when it is seen for the first time by
633640
* a Player.
634641
*
635642
* @param hologram
@@ -879,7 +886,7 @@ public void render(NPC npc, Vector3d offset) {
879886
}
880887

881888
/**
882-
* Hologram spawning is delegated to {@link #createNPC(Entity, String, Vector3d)}
889+
* Hologram spawning is delegated to {@link #createNPC(NPC, String, Vector3d)}
883890
*/
884891
protected abstract void render0(NPC npc, Vector3d offset);
885892

main/src/main/java/net/citizensnpcs/trait/RotationTrait.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,9 @@ public void rotateToFace(Location target) {
462462
* Rotate to have the given yaw and pitch
463463
*
464464
* @param yaw
465+
* Side-to-side rotation along the y-axis
465466
* @param pitch
467+
* Up-and-down rotation perpendicular to the y-axis
466468
*/
467469
public void rotateToHave(float yaw, float pitch) {
468470
t = 0;

main/src/main/java/net/citizensnpcs/trait/text/Text.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ public void setItemInHandPattern(String pattern) {
251251
* Set the range in blocks before text will be sent.
252252
*
253253
* @param range
254+
* Range blocks (or meters)
254255
*/
255256
public void setRange(double range) {
256257
this.range = range;

main/src/main/java/net/citizensnpcs/trait/waypoint/WaypointProvider.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public interface WaypointProvider extends Persistable {
1313
* @param sender
1414
* The player to link the editor with
1515
* @param args
16+
* the {@link CommandContext}, or arguments, to be parsed.
1617
* @return The editor
1718
*/
1819
public WaypointEditor createEditor(CommandSender sender, CommandContext args);

main/src/main/java/net/citizensnpcs/trait/waypoint/triggers/WaypointTriggerPrompt.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
/**
77
* Marker interface for waypoint trigger prompts.
8-
*
8+
* <p>
99
* Prompts are expected to return to the prompt specified under the {@link #RETURN_PROMPT_KEY} key in the
1010
* {@link ConversationContext} and to set the specified trigger under {@link #CREATED_TRIGGER_KEY} prior to returning.
11-
*
12-
* If the returned trigger is <code>null</code> then the prompt is assumed to have failed and an error message will be
11+
* <p>
12+
* If the returned trigger is {@code null} then the prompt is assumed to have failed and an error message will be
1313
* displayed.
1414
*/
1515
public interface WaypointTriggerPrompt extends Prompt {

0 commit comments

Comments
 (0)