diff options
author | Jake <[email protected]> | 2021-11-23 17:09:49 -0800 |
---|---|---|
committer | MiniDigger | Martin <[email protected]> | 2021-11-30 19:26:33 +0100 |
commit | e481692afdb08c4486866bc856919c585d6d9646 (patch) | |
tree | 66774ecbddc504c3b0fb9460139b6dc8c367d03d /patches/api/0063-Improve-the-Saddle-API-for-Horses.patch | |
parent | 7665ae86d65b964822b307c085fc86c0fcc442f2 (diff) | |
download | Paper-e481692afdb08c4486866bc856919c585d6d9646.tar.gz Paper-e481692afdb08c4486866bc856919c585d6d9646.zip |
move extra plugins patch up & more work
Diffstat (limited to 'patches/api/0063-Improve-the-Saddle-API-for-Horses.patch')
-rw-r--r-- | patches/api/0063-Improve-the-Saddle-API-for-Horses.patch | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/patches/api/0063-Improve-the-Saddle-API-for-Horses.patch b/patches/api/0063-Improve-the-Saddle-API-for-Horses.patch new file mode 100644 index 0000000000..85814456bf --- /dev/null +++ b/patches/api/0063-Improve-the-Saddle-API-for-Horses.patch @@ -0,0 +1,83 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar <[email protected]> +Date: Sat, 10 Dec 2016 16:12:48 -0500 +Subject: [PATCH] Improve the Saddle API for Horses + +Not all horses with Saddles have armor. This lets us break up the horses with saddles +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 +new file mode 100644 +index 0000000000000000000000000000000000000000..163ffe8ff76ded6265d865901d5110fb6a56950d +--- /dev/null ++++ b/src/main/java/org/bukkit/inventory/ArmoredHorseInventory.java +@@ -0,0 +1,21 @@ ++package org.bukkit.inventory; ++ ++import org.jetbrains.annotations.Nullable; ++ ++public interface ArmoredHorseInventory extends AbstractHorseInventory { ++ ++ /** ++ * Gets the item in the horse's armor slot. ++ * ++ * @return the armor item ++ */ ++ @Nullable ++ ItemStack getArmor(); ++ ++ /** ++ * Sets the item in the horse's armor slot. ++ * ++ * @param stack the new item ++ */ ++ void setArmor(@Nullable ItemStack stack); ++} +diff --git a/src/main/java/org/bukkit/inventory/HorseInventory.java b/src/main/java/org/bukkit/inventory/HorseInventory.java +index 608e99c4207405bf9dd88d44ad8e82eefa19e45c..53498debe4cfb80592ef3025270bc8e5df4a5fec 100644 +--- a/src/main/java/org/bukkit/inventory/HorseInventory.java ++++ b/src/main/java/org/bukkit/inventory/HorseInventory.java +@@ -5,20 +5,4 @@ import org.jetbrains.annotations.Nullable; + /** + * An interface to the inventory of a Horse. + */ +-public interface HorseInventory extends AbstractHorseInventory { +- +- /** +- * Gets the item in the horse's armor slot. +- * +- * @return the armor item +- */ +- @Nullable +- ItemStack getArmor(); +- +- /** +- * Sets the item in the horse's armor slot. +- * +- * @param stack the new item +- */ +- void setArmor(@Nullable ItemStack stack); +-} ++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 2fa2c9d07ecbafaf2396d913af90f1f4d432b238..5ac1afb8a213fa0fe344db4730ecbc5de6eed445 100644 +--- a/src/main/java/org/bukkit/inventory/LlamaInventory.java ++++ b/src/main/java/org/bukkit/inventory/LlamaInventory.java +@@ -6,7 +6,7 @@ import org.jetbrains.annotations.Nullable; + /** + * 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 +new file mode 100644 +index 0000000000000000000000000000000000000000..7944f26a3e2a92601c3be0e55c00c39cc16cf177 +--- /dev/null ++++ b/src/main/java/org/bukkit/inventory/SaddledHorseInventory.java +@@ -0,0 +1,3 @@ ++package org.bukkit.inventory; ++ ++public interface SaddledHorseInventory extends AbstractHorseInventory {} |