Update B/CB

This commit is contained in:
Shane Freeder 2018-02-08 10:07:27 +00:00
parent 18ee843380
commit 89a61a21ef
No known key found for this signature in database
GPG key ID: A3F61EA5A085289C
5 changed files with 46 additions and 84 deletions

View file

@ -1,4 +1,4 @@
From a1287cf6e3c7863a7d815a7951b355c2b7bfa58a Mon Sep 17 00:00:00 2001 From 712103d9db1ebca6fc45f8fdd8b8b123735cb630 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 10 Jun 2017 16:59:40 -0500 Date: Sat, 10 Jun 2017 16:59:40 -0500
Subject: [PATCH] Fix upstream javadoc warnings and errors Subject: [PATCH] Fix upstream javadoc warnings and errors
@ -6,7 +6,7 @@ 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. 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 diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java
index 9597a9d8..478f2c3c 100644 index 19632d17..de1b1112 100644
--- a/src/main/java/org/bukkit/NamespacedKey.java --- a/src/main/java/org/bukkit/NamespacedKey.java
+++ b/src/main/java/org/bukkit/NamespacedKey.java +++ b/src/main/java/org/bukkit/NamespacedKey.java
@@ -27,8 +27,8 @@ public final class NamespacedKey { @@ -27,8 +27,8 @@ public final class NamespacedKey {
@ -73,10 +73,10 @@ index 8d29dcbd..0bc47dd6 100644
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data); public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data);
diff --git a/src/main/java/org/bukkit/entity/AbstractHorse.java b/src/main/java/org/bukkit/entity/AbstractHorse.java diff --git a/src/main/java/org/bukkit/entity/AbstractHorse.java b/src/main/java/org/bukkit/entity/AbstractHorse.java
index 0e615711..e912299b 100644 index 10757454..6d5410ea 100644
--- a/src/main/java/org/bukkit/entity/AbstractHorse.java --- a/src/main/java/org/bukkit/entity/AbstractHorse.java
+++ b/src/main/java/org/bukkit/entity/AbstractHorse.java +++ b/src/main/java/org/bukkit/entity/AbstractHorse.java
@@ -21,7 +21,7 @@ public interface AbstractHorse extends Animals, Vehicle, InventoryHolder, Tameab @@ -22,7 +22,7 @@ public interface AbstractHorse extends Animals, Vehicle, InventoryHolder, Tameab
public Horse.Variant getVariant(); public Horse.Variant getVariant();
/** /**
@ -335,7 +335,7 @@ index 60470b88..76313d4d 100644
*/ */
@Deprecated @Deprecated
diff --git a/src/main/java/org/bukkit/scoreboard/Team.java b/src/main/java/org/bukkit/scoreboard/Team.java diff --git a/src/main/java/org/bukkit/scoreboard/Team.java b/src/main/java/org/bukkit/scoreboard/Team.java
index 170ae21a..c0de37a7 100644 index 92174e81..ac5cc32c 100644
--- a/src/main/java/org/bukkit/scoreboard/Team.java --- a/src/main/java/org/bukkit/scoreboard/Team.java
+++ b/src/main/java/org/bukkit/scoreboard/Team.java +++ b/src/main/java/org/bukkit/scoreboard/Team.java
@@ -84,7 +84,7 @@ public interface Team { @@ -84,7 +84,7 @@ public interface Team {
@ -348,5 +348,5 @@ index 170ae21a..c0de37a7 100644
ChatColor getColor() throws IllegalStateException; ChatColor getColor() throws IllegalStateException;
-- --
2.15.0 2.16.1

View file

@ -1,4 +1,4 @@
From ff1048377c614b8a6f32c6d32d80b8ef8183650f Mon Sep 17 00:00:00 2001 From 5b40b7e3f882c44f18249d89dbbeb93298af3535 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 10 Dec 2016 16:12:48 -0500 Date: Sat, 10 Dec 2016 16:12:48 -0500
Subject: [PATCH] Improve the Saddle API for Horses Subject: [PATCH] Improve the Saddle API for Horses
@ -8,13 +8,13 @@ and access their saddle state separately from an interface shared with Armor.
diff --git a/src/main/java/org/bukkit/inventory/ArmoredHorseInventory.java b/src/main/java/org/bukkit/inventory/ArmoredHorseInventory.java diff --git a/src/main/java/org/bukkit/inventory/ArmoredHorseInventory.java b/src/main/java/org/bukkit/inventory/ArmoredHorseInventory.java
new file mode 100644 new file mode 100644
index 00000000..037479de index 00000000..a39b9544
--- /dev/null --- /dev/null
+++ b/src/main/java/org/bukkit/inventory/ArmoredHorseInventory.java +++ b/src/main/java/org/bukkit/inventory/ArmoredHorseInventory.java
@@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
+package org.bukkit.inventory; +package org.bukkit.inventory;
+ +
+public interface ArmoredHorseInventory extends Inventory { +public interface ArmoredHorseInventory extends AbstractHorseInventory {
+ +
+ /** + /**
+ * Gets the item in the horse's armor slot. + * Gets the item in the horse's armor slot.
@ -31,21 +31,14 @@ index 00000000..037479de
+ void setArmor(ItemStack stack); + void setArmor(ItemStack stack);
+} +}
diff --git a/src/main/java/org/bukkit/inventory/HorseInventory.java b/src/main/java/org/bukkit/inventory/HorseInventory.java diff --git a/src/main/java/org/bukkit/inventory/HorseInventory.java b/src/main/java/org/bukkit/inventory/HorseInventory.java
index a71efb83..b4b95ab5 100644 index a73c9850..e14c1277 100644
--- a/src/main/java/org/bukkit/inventory/HorseInventory.java --- a/src/main/java/org/bukkit/inventory/HorseInventory.java
+++ b/src/main/java/org/bukkit/inventory/HorseInventory.java +++ b/src/main/java/org/bukkit/inventory/HorseInventory.java
@@ -3,33 +3,4 @@ package org.bukkit.inventory; @@ -3,19 +3,4 @@ package org.bukkit.inventory;
/** /**
* An interface to the inventory of a Horse. * An interface to the inventory of a Horse.
*/ */
-public interface HorseInventory extends Inventory { -public interface HorseInventory extends AbstractHorseInventory {
-
- /**
- * Gets the item in the horse's saddle slot.
- *
- * @return the saddle item
- */
- ItemStack getSaddle();
- -
- /** - /**
- * Gets the item in the horse's armor slot. - * Gets the item in the horse's armor slot.
@ -55,44 +48,35 @@ index a71efb83..b4b95ab5 100644
- ItemStack getArmor(); - ItemStack getArmor();
- -
- /** - /**
- * Sets the item in the horse's saddle slot.
- *
- * @param stack the new item
- */
- void setSaddle(ItemStack stack);
-
- /**
- * Sets the item in the horse's armor slot. - * Sets the item in the horse's armor slot.
- * - *
- * @param stack the new item - * @param stack the new item
- */ - */
- void setArmor(ItemStack stack); - void setArmor(ItemStack stack);
-} -}
+public interface HorseInventory extends ArmoredHorseInventory, SaddledHorseInventory {} +public interface HorseInventory extends AbstractHorseInventory, ArmoredHorseInventory {}
diff --git a/src/main/java/org/bukkit/inventory/LlamaInventory.java b/src/main/java/org/bukkit/inventory/LlamaInventory.java
index 9b3dcf3f..7856a7f2 100644
--- a/src/main/java/org/bukkit/inventory/LlamaInventory.java
+++ b/src/main/java/org/bukkit/inventory/LlamaInventory.java
@@ -5,7 +5,7 @@ import org.bukkit.entity.Llama;
/**
* An interface to the inventory of a {@link Llama}.
*/
-public interface LlamaInventory extends AbstractHorseInventory {
+public interface LlamaInventory extends SaddledHorseInventory {
/*
* Gets the item in the llama's decor slot.
diff --git a/src/main/java/org/bukkit/inventory/SaddledHorseInventory.java b/src/main/java/org/bukkit/inventory/SaddledHorseInventory.java diff --git a/src/main/java/org/bukkit/inventory/SaddledHorseInventory.java b/src/main/java/org/bukkit/inventory/SaddledHorseInventory.java
new file mode 100644 new file mode 100644
index 00000000..010dc364 index 00000000..7944f26a
--- /dev/null --- /dev/null
+++ b/src/main/java/org/bukkit/inventory/SaddledHorseInventory.java +++ b/src/main/java/org/bukkit/inventory/SaddledHorseInventory.java
@@ -0,0 +1,18 @@ @@ -0,0 +1,3 @@
+package org.bukkit.inventory; +package org.bukkit.inventory;
+ +
+public interface SaddledHorseInventory { +public interface SaddledHorseInventory extends AbstractHorseInventory {}
+
+ /**
+ * Gets the item in the horse's saddle slot.
+ *
+ * @return the saddle item
+ */
+ ItemStack getSaddle();
+
+ /**
+ * Sets the item in the horse's saddle slot.
+ *
+ * @param stack the new item
+ */
+ void setSaddle(ItemStack stack);
+}
-- --
2.15.1 2.16.1

View file

@ -1,4 +1,4 @@
From ceab391a41c2fe5e4a02dd1ffe57a7501227127c Mon Sep 17 00:00:00 2001 From 3f12b606939ebb9cd6e9221474e59baa4795f1c2 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 10 Dec 2016 16:24:06 -0500 Date: Sat, 10 Dec 2016 16:24:06 -0500
Subject: [PATCH] Improve the Saddle API for Horses Subject: [PATCH] Improve the Saddle API for Horses
@ -7,13 +7,13 @@ Not all horses with Saddles have armor. This lets us break up the horses with sa
and access their saddle state separately from an interface shared with Armor. and access their saddle state separately from an interface shared with Armor.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
index 62c7d44c7..64d75459a 100644 index 14d041680..e56bef334 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
@@ -6,6 +6,7 @@ import net.minecraft.server.EntityHorseAbstract; @@ -6,6 +6,7 @@ import net.minecraft.server.EntityHorseAbstract;
import org.apache.commons.lang.Validate; import org.apache.commons.lang.Validate;
import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.inventory.CraftInventory; import org.bukkit.craftbukkit.inventory.CraftInventoryAbstractHorse;
+import org.bukkit.craftbukkit.inventory.CraftSaddledInventory; +import org.bukkit.craftbukkit.inventory.CraftSaddledInventory;
import org.bukkit.entity.AbstractHorse; import org.bukkit.entity.AbstractHorse;
import org.bukkit.entity.AnimalTamer; import org.bukkit.entity.AnimalTamer;
@ -21,67 +21,45 @@ index 62c7d44c7..64d75459a 100644
@@ -92,6 +93,6 @@ public abstract class CraftAbstractHorse extends CraftAnimals implements Abstrac @@ -92,6 +93,6 @@ public abstract class CraftAbstractHorse extends CraftAnimals implements Abstrac
@Override @Override
public Inventory getInventory() { public AbstractHorseInventory getInventory() {
- return new CraftInventory(getHandle().inventoryChest); - return new CraftInventoryAbstractHorse(getHandle().inventoryChest);
+ return new CraftSaddledInventory(getHandle().inventoryChest); + return new CraftSaddledInventory(getHandle().inventoryChest);
} }
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java
index 5adbd7437..2f6852404 100644 index 173818e68..2f6852404 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java
@@ -4,24 +4,16 @@ import net.minecraft.server.IInventory; @@ -4,7 +4,7 @@ import net.minecraft.server.IInventory;
import org.bukkit.inventory.HorseInventory; import org.bukkit.inventory.HorseInventory;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
-public class CraftInventoryHorse extends CraftInventory implements HorseInventory { -public class CraftInventoryHorse extends CraftInventoryAbstractHorse implements HorseInventory {
+public class CraftInventoryHorse extends CraftSaddledInventory implements HorseInventory { +public class CraftInventoryHorse extends CraftSaddledInventory implements HorseInventory {
public CraftInventoryHorse(IInventory inventory) { public CraftInventoryHorse(IInventory inventory) {
super(inventory); super(inventory);
}
- public ItemStack getSaddle() {
- return getItem(0);
- }
-
public ItemStack getArmor() {
return getItem(1);
}
- public void setSaddle(ItemStack stack) {
- setItem(0, stack);
- }
-
public void setArmor(ItemStack stack) {
setItem(1, stack);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java
new file mode 100644 new file mode 100644
index 000000000..615010c40 index 000000000..99cfbaf90
--- /dev/null --- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java
@@ -0,0 +1,20 @@ @@ -0,0 +1,15 @@
+package org.bukkit.craftbukkit.inventory; +package org.bukkit.craftbukkit.inventory;
+ +
+import net.minecraft.server.IInventory; +import net.minecraft.server.IInventory;
+
+import org.bukkit.inventory.AbstractHorseInventory;
+import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.ItemStack;
+import org.bukkit.inventory.SaddledHorseInventory; +import org.bukkit.inventory.SaddledHorseInventory;
+ +
+public class CraftSaddledInventory extends CraftInventory implements SaddledHorseInventory { +public class CraftSaddledInventory extends CraftInventoryAbstractHorse implements SaddledHorseInventory {
+ +
+ public CraftSaddledInventory(IInventory inventory) { + public CraftSaddledInventory(IInventory inventory) {
+ super(inventory); + super(inventory);
+ } + }
+ +
+ public ItemStack getSaddle() {
+ return getItem(0);
+ }
+
+ public void setSaddle(ItemStack stack) {
+ setItem(0, stack);
+ }
+} +}
-- --
2.15.1 2.16.1

@ -1 +1 @@
Subproject commit 2b1f48cd2c88434401001efcae22b0de9f61ba37 Subproject commit d9006fb04c37444226a867b64c14cb4cfe830610

@ -1 +1 @@
Subproject commit c7656468e4601fb70e0d7049c4b947e16034546f Subproject commit e3b4cf5c282c04edb644a9cf499d021bd76edc9a