aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-API-Patches/0051-Fix-upstream-javadoc-warnings-and-errors.patch
blob: b3c61fd1ece7b01d2be4314a3f6860096bccbb89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
From 0073358c87abe5e1b89363c51a06ff694a01f965 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 10 Jun 2017 16:59:40 -0500
Subject: [PATCH] Fix upstream javadoc warnings and errors

Upstream still refuses to use Java 8 with the API so they are likely unaware these are even issues.

diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java
index ffebffd8b..f5e3929aa 100644
--- a/src/main/java/org/bukkit/NamespacedKey.java
+++ b/src/main/java/org/bukkit/NamespacedKey.java
@@ -39,8 +39,8 @@ public final class NamespacedKey {
     /**
      * Create a key in a specific namespace.
      *
-     * @param namespace
-     * @param key
+     * @param namespace String representing a grouping of keys
+     * @param key Name for this specific key
      * @deprecated should never be used by plugins, for internal use only!!
      */
     @Deprecated
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 846b0619a..84abeb216 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -1666,6 +1666,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
      * @param count the number of particles
      * @param data the data to use for the particle or null,
      *             the type of this depends on {@link Particle#getDataType()}
+     * @param <T> Type
      */
     public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data);
 
@@ -1681,6 +1682,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
      * @param count the number of particles
      * @param data the data to use for the particle or null,
      *             the type of this depends on {@link Particle#getDataType()}
+     * @param <T> Type
      */
     public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data);
 
@@ -1730,6 +1732,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
      * @param offsetZ the maximum random offset on the Z axis
      * @param data the data to use for the particle or null,
      *             the type of this depends on {@link Particle#getDataType()}
+     * @param <T> Type
      */
     public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
 
@@ -1749,6 +1752,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
      * @param offsetZ the maximum random offset on the Z axis
      * @param data the data to use for the particle or null,
      *             the type of this depends on {@link Particle#getDataType()}
+     * @param <T> Type
      */
     public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
 
@@ -1804,6 +1808,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
      *              particle used (normally speed)
      * @param data the data to use for the particle or null,
      *             the type of this depends on {@link Particle#getDataType()}
+     * @param <T> Type
      */
     public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
 
@@ -1825,6 +1830,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
      *              particle used (normally speed)
      * @param data the data to use for the particle or null,
      *             the type of this depends on {@link Particle#getDataType()}
+     * @param <T> Type
      */
     public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
 
@@ -1847,6 +1853,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
      * @param force whether to send the particle to players within an extended
      *              range and encourage their client to render it regardless of
      *              settings
+     * @param <T> Particle data type
      */
     public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force);
 
@@ -1871,6 +1878,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
      * @param force whether to send the particle to players within an extended
      *              range and encourage their client to render it regardless of
      *              settings
+     * @param <T> Particle data type
      */
     public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force);
 
diff --git a/src/main/java/org/bukkit/entity/AbstractHorse.java b/src/main/java/org/bukkit/entity/AbstractHorse.java
index 2f1956724..234aa9dd2 100644
--- a/src/main/java/org/bukkit/entity/AbstractHorse.java
+++ b/src/main/java/org/bukkit/entity/AbstractHorse.java
@@ -25,7 +25,7 @@ public interface AbstractHorse extends Animals, Vehicle, InventoryHolder, Tameab
     public Horse.Variant getVariant();
 
     /**
-     * @param variant
+     * @param variant Variant to set
      * @deprecated you are required to spawn a different entity
      */
     @Deprecated
diff --git a/src/main/java/org/bukkit/entity/AreaEffectCloud.java b/src/main/java/org/bukkit/entity/AreaEffectCloud.java
index d258e734e..123d87954 100644
--- a/src/main/java/org/bukkit/entity/AreaEffectCloud.java
+++ b/src/main/java/org/bukkit/entity/AreaEffectCloud.java
@@ -141,6 +141,7 @@ public interface AreaEffectCloud extends Entity {
      * @param particle the new particle type
      * @param data the data to use for the particle or null,
      *             the type of this depends on {@link Particle#getDataType()}
+     * @param <T> the particle data type // Paper
      */
     <T> void setParticle(@NotNull Particle particle, @Nullable T data);
 
diff --git a/src/main/java/org/bukkit/entity/Guardian.java b/src/main/java/org/bukkit/entity/Guardian.java
index 98af0563c..ec6890ae6 100644
--- a/src/main/java/org/bukkit/entity/Guardian.java
+++ b/src/main/java/org/bukkit/entity/Guardian.java
@@ -12,7 +12,7 @@ public interface Guardian extends Monster {
     public boolean isElder();
 
     /**
-     * @param shouldBeElder
+     * @param shouldBeElder Sets whether the Guardian is an Elder
      * @deprecated Must spawn a new {@link ElderGuardian}.
      */
     @Deprecated
diff --git a/src/main/java/org/bukkit/entity/Horse.java b/src/main/java/org/bukkit/entity/Horse.java
index 734f5ac7b..5efa4e606 100644
--- a/src/main/java/org/bukkit/entity/Horse.java
+++ b/src/main/java/org/bukkit/entity/Horse.java
@@ -154,7 +154,7 @@ public interface Horse extends AbstractHorse {
     public boolean isCarryingChest();
 
     /**
-     * @param chest
+     * @param chest Sets whether the Horse is carrying a chest
      * @deprecated see {@link ChestedHorse}
      */
     @Deprecated
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 219556ed5..c21785d58 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -438,7 +438,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
      *
      * Use supplied alternative character to the section symbol to represent legacy color codes.
      *
-     * @param alternateChar Alternate symbol such as '&'
+     * @param alternateChar Alternate symbol such as '&amp;'
      * @param message The message to send
      */
     public void sendActionBar(char alternateChar, @NotNull String message);
@@ -505,6 +505,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
     /**
      * Update the subtitle of titles displayed to the player
      *
+     * @param subtitle Subtitle to set
      * @deprecated Use {@link #updateTitle(Title)}
      */
     @Deprecated
@@ -513,6 +514,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
     /**
      * Update the subtitle of titles displayed to the player
      *
+     * @param subtitle Subtitle to set
      * @deprecated Use {@link #updateTitle(Title)}
      */
     @Deprecated
@@ -521,6 +523,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
     /**
      * Show the given title to the player, along with the last subtitle set, using the last set times
      *
+     * @param title Title to set
      * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)}
      */
     @Deprecated
@@ -529,6 +532,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
     /**
      * Show the given title to the player, along with the last subtitle set, using the last set times
      *
+     * @param title Title to set
      * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)}
      */
     @Deprecated
@@ -1428,6 +1432,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
      * @param count the number of particles
      * @param data the data to use for the particle or null,
      *             the type of this depends on {@link Particle#getDataType()}
+     * @param <T> Type
      */
     public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data);
 
@@ -1443,6 +1448,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
      * @param count the number of particles
      * @param data the data to use for the particle or null,
      *             the type of this depends on {@link Particle#getDataType()}
+     * @param <T> Type
      */
     public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data);
 
@@ -1492,6 +1498,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
      * @param offsetZ the maximum random offset on the Z axis
      * @param data the data to use for the particle or null,
      *             the type of this depends on {@link Particle#getDataType()}
+     * @param <T> Type
      */
     public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
 
@@ -1511,6 +1518,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
      * @param offsetZ the maximum random offset on the Z axis
      * @param data the data to use for the particle or null,
      *             the type of this depends on {@link Particle#getDataType()}
+     * @param <T> Type
      */
     public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
 
@@ -1566,6 +1574,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
      *              particle used (normally speed)
      * @param data the data to use for the particle or null,
      *             the type of this depends on {@link Particle#getDataType()}
+     * @param <T> Type
      */
     public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
 
@@ -1587,6 +1596,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
      *              particle used (normally speed)
      * @param data the data to use for the particle or null,
      *             the type of this depends on {@link Particle#getDataType()}
+     * @param <T> Type
      */
     public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
 
diff --git a/src/main/java/org/bukkit/entity/Skeleton.java b/src/main/java/org/bukkit/entity/Skeleton.java
index 2a0b01097..2ac30c0f6 100644
--- a/src/main/java/org/bukkit/entity/Skeleton.java
+++ b/src/main/java/org/bukkit/entity/Skeleton.java
@@ -19,6 +19,7 @@ public interface Skeleton extends Monster {
     public SkeletonType getSkeletonType();
 
     /**
+     * @param type Type to set
      * @deprecated Must spawn a new subtype variant
      */
     @Deprecated
diff --git a/src/main/java/org/bukkit/entity/Zombie.java b/src/main/java/org/bukkit/entity/Zombie.java
index 756f285eb..ee2e70c67 100644
--- a/src/main/java/org/bukkit/entity/Zombie.java
+++ b/src/main/java/org/bukkit/entity/Zombie.java
@@ -32,7 +32,7 @@ public interface Zombie extends Monster {
     public boolean isVillager();
 
     /**
-     * @param flag
+     * @param flag Sets whether the Zombie is a villager
      * @deprecated must spawn {@link ZombieVillager}.
      */
     @Deprecated
@@ -40,7 +40,7 @@ public interface Zombie extends Monster {
     public void setVillager(boolean flag);
 
     /**
-     * @param profession
+     * @param profession Sets the ZombieVillager's profession
      * @see ZombieVillager#getVillagerProfession()
      */
     @Deprecated
diff --git a/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java b/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
index 8d4c70031..b493173e2 100644
--- a/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
@@ -29,6 +29,7 @@ public class PlayerLoginEvent extends PlayerEvent {
      * @param hostname The hostname that was used to connect to the server
      * @param address The address the player used to connect, provided for
      *     timing issues
+     * @param realAddress The unspoofed, actual address, that the player used to connect
      */
     public PlayerLoginEvent(@NotNull final Player player, @NotNull final String hostname, @NotNull final InetAddress address, final @NotNull InetAddress realAddress) { // Spigot
         super(player);
@@ -52,6 +53,7 @@ public class PlayerLoginEvent extends PlayerEvent {
      *     timing issues
      * @param result The result status for this event
      * @param message The message to be displayed if result denies login
+     * @param realAddress The unspoofed, actual address, that the player used to connect
      */
     public PlayerLoginEvent(@NotNull final Player player, @NotNull String hostname, @NotNull final InetAddress address, @NotNull final Result result, @NotNull final String message, @NotNull final InetAddress realAddress) { // Spigot
         this(player, hostname, address, realAddress); // Spigot
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index 07d2b4cfe..cbcbe8c8a 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -132,10 +132,10 @@ public interface ItemFactory {
      * Apply a material change for an item meta. Do not use under any
      * circumstances.
      *
-     * @param meta
-     * @param material
+     * @param meta meta
+     * @param material material
      * @return updated material
-     * @throws IllegalArgumentException
+     * @throws IllegalArgumentException exception
      * @deprecated for internal use only
      */
     @Deprecated
diff --git a/src/main/java/org/bukkit/inventory/Merchant.java b/src/main/java/org/bukkit/inventory/Merchant.java
index 668e91958..5ff1f93d1 100644
--- a/src/main/java/org/bukkit/inventory/Merchant.java
+++ b/src/main/java/org/bukkit/inventory/Merchant.java
@@ -35,7 +35,7 @@ public interface Merchant {
      *
      * @param i the index
      * @return the recipe
-     * @throws IndexOutOfBoundsException
+     * @throws IndexOutOfBoundsException Throws when specified index is larger than Merchant's inventory
      */
     @NotNull
     MerchantRecipe getRecipe(int i) throws IndexOutOfBoundsException;
@@ -45,7 +45,7 @@ public interface Merchant {
      *
      * @param i the index
      * @param recipe the recipe
-     * @throws IndexOutOfBoundsException
+     * @throws IndexOutOfBoundsException Throws when specified index is larger than Merchant's inventory
      */
     void setRecipe(int i, @NotNull MerchantRecipe recipe) throws IndexOutOfBoundsException;
 
diff --git a/src/main/java/org/bukkit/potion/Potion.java b/src/main/java/org/bukkit/potion/Potion.java
index 63b7c70ce..a57f70ec6 100644
--- a/src/main/java/org/bukkit/potion/Potion.java
+++ b/src/main/java/org/bukkit/potion/Potion.java
@@ -79,6 +79,7 @@ public class Potion {
     }
 
     /**
+     * @param name Unused, always uses {@link PotionType#WATER}
      * @deprecated
      */
     @Deprecated
diff --git a/src/main/java/org/bukkit/potion/PotionBrewer.java b/src/main/java/org/bukkit/potion/PotionBrewer.java
index 9f913e1ee..254bd6f3e 100644
--- a/src/main/java/org/bukkit/potion/PotionBrewer.java
+++ b/src/main/java/org/bukkit/potion/PotionBrewer.java
@@ -38,6 +38,8 @@ public interface PotionBrewer {
      * a potion with the given type.
      *
      * @param type The type of the potion
+     * @param upgraded Whether the potion is upgraded
+     * @param extended Whether the potion is extended
      * @return The list of effects
      */
     @NotNull
diff --git a/src/main/java/org/bukkit/potion/PotionType.java b/src/main/java/org/bukkit/potion/PotionType.java
index 9b0fcf2da..e83e4b4fd 100644
--- a/src/main/java/org/bukkit/potion/PotionType.java
+++ b/src/main/java/org/bukkit/potion/PotionType.java
@@ -72,6 +72,7 @@ public enum PotionType {
     }
 
     /**
+     * @return Damage value associated with this PotionType, broken
      * @deprecated Non-functional
      */
     @Deprecated
@@ -84,6 +85,8 @@ public enum PotionType {
     }
 
     /**
+     * @param damage Damage value associated with a PotionType
+     * @return PotionType for given damage value, broken
      * @deprecated Non-functional
      */
     @Deprecated
@@ -94,6 +97,8 @@ public enum PotionType {
     }
 
     /**
+     * @param effectType EffectType
+     * @return Associated PotionType
      * @deprecated Misleading
      */
     @Deprecated
-- 
2.21.0