From 28333dc9b53b30c894aa68338a24e894ea64327f Mon Sep 17 00:00:00 2001 From: Madeline Miller Date: Thu, 31 Dec 2020 12:48:38 +1000 Subject: [PATCH] Add API to get Material from Boats and Minecarts --- paper-api/src/main/java/org/bukkit/entity/Boat.java | 10 ++++++++++ .../src/main/java/org/bukkit/entity/Minecart.java | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/Boat.java b/paper-api/src/main/java/org/bukkit/entity/Boat.java index b77e4ed7f5..9e8224d7e0 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Boat.java +++ b/paper-api/src/main/java/org/bukkit/entity/Boat.java @@ -181,4 +181,14 @@ public interface Boat extends Vehicle { ON_LAND, IN_AIR; } + + // Paper start + /** + * Gets the {@link Material} that represents this Boat type. + * + * @return the boat material. + */ + @NotNull + public Material getBoatMaterial(); + // Paper end } diff --git a/paper-api/src/main/java/org/bukkit/entity/Minecart.java b/paper-api/src/main/java/org/bukkit/entity/Minecart.java index d9ad5fd48e..c3c94a5694 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Minecart.java +++ b/paper-api/src/main/java/org/bukkit/entity/Minecart.java @@ -1,6 +1,7 @@ package org.bukkit.entity; import org.bukkit.GameRule; +import org.bukkit.Material; import org.bukkit.block.data.BlockData; import org.bukkit.material.MaterialData; import org.bukkit.util.Vector; @@ -148,4 +149,14 @@ public interface Minecart extends Vehicle { * @return the current block offset for this minecart. */ public int getDisplayBlockOffset(); + + // Paper start + /** + * Gets the {@link Material} that represents this Minecart type. + * + * @return the minecart material. + */ + @NotNull + public Material getMinecartMaterial(); + // Paper end }