aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0225-Add-API-to-get-Material-from-Boats-and-Minecarts.patch
blob: 143ac8e614db3887a3799b123e60b26843624fe9 (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
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Madeline Miller <mnmiller1@me.com>
Date: Thu, 31 Dec 2020 12:48:38 +1000
Subject: [PATCH] Add API to get Material from Boats and Minecarts


diff --git a/src/main/java/org/bukkit/entity/Boat.java b/src/main/java/org/bukkit/entity/Boat.java
index dbdd2c1ad74a4d56e282736cd06d6937701f2e5c..a0fb3c44405f6362f8a1613661d507e448f7ba6b 100644
--- a/src/main/java/org/bukkit/entity/Boat.java
+++ b/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/src/main/java/org/bukkit/entity/Minecart.java b/src/main/java/org/bukkit/entity/Minecart.java
index 9125cc9f60258938946ee30932f0299edcd9573b..148d8cddba48a886eddef72a3de63d5eaa15949f 100644
--- a/src/main/java/org/bukkit/entity/Minecart.java
+++ b/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;
@@ -152,4 +153,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
 }