Properly fix JavaDoc linting issues

Fixes our own, and upstream's, issues with the stricter Java 8 JavaDoc
linter.

Also removes the destroystokyo-release maven repository. I'm not sure
why I added it originally, but it's unnecessary now.
This commit is contained in:
Zach Brown
2017-06-10 17:11:10 -05:00
parent a22ed886b5
commit 3b5e6cd48f
12 changed files with 520 additions and 125 deletions

View File

@@ -5,14 +5,23 @@ Subject: [PATCH] Custom replacement for eaten items
diff --git a/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java b/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
index 8ab76b1d..7d28155b 100644
--- a/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java
@@ -0,0 +0,0 @@ import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.inventory.ItemStack;
+import javax.annotation.Nullable;
+
/**
* This event will fire when a player is finishing consuming an item (food,
* potion, milk bucket).
@@ -0,0 +0,0 @@ public class PlayerItemConsumeEvent extends PlayerEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private boolean isCancelled = false;
private ItemStack item;
+ private ItemStack replacement; // Paper
+ @Nullable private ItemStack replacement; // Paper
/**
* @param player the player consuming
@@ -24,7 +33,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ /**
+ * Return the custom item stack that will replace the consumed item, or null if no
+ * custom replacement has been set (which means the default replacement will be used).
+ *
+ * @return The custom item stack that will replace the consumed item or null
+ */
+ @Nullable
+ public ItemStack getReplacement() {
+ return this.replacement;
+ }
@@ -32,8 +44,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ /**
+ * Set a custom item stack to replace the consumed item. Pass null to clear any custom
+ * stack that has been set and use the default replacement.
+ *
+ * @param replacement Replacement item to set, null to clear any custom stack and use default
+ */
+ public void setReplacement(ItemStack replacement) {
+ public void setReplacement(@Nullable ItemStack replacement) {
+ this.replacement = replacement;
+ }
+ // Paper end