mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 18:45:54 +01:00
9907cedecb
Bump Adventure to 4.6.0 fixes #5216 fixes #5261 fixes #5287
59 lines
1.9 KiB
Diff
59 lines
1.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Matthew 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 24751b5c4e3bc24bdfa85af8f6fcba37413aa002..e0d0537606d4f9a3fe588ebf7d02f314c0359335 100644
|
|
--- a/src/main/java/org/bukkit/entity/Boat.java
|
|
+++ b/src/main/java/org/bukkit/entity/Boat.java
|
|
@@ -1,5 +1,6 @@
|
|
package org.bukkit.entity;
|
|
|
|
+import org.bukkit.Material;
|
|
import org.bukkit.TreeSpecies;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
@@ -103,4 +104,14 @@ public interface Boat extends Vehicle {
|
|
*/
|
|
@Deprecated
|
|
public void setWorkOnLand(boolean workOnLand);
|
|
+
|
|
+ // 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 95c79c5fa0c4e30201f887da6467ce5f81c8a255..53b042f8ebbbf6ee77435b93d4e89371375cc515 100644
|
|
--- a/src/main/java/org/bukkit/entity/Minecart.java
|
|
+++ b/src/main/java/org/bukkit/entity/Minecart.java
|
|
@@ -1,5 +1,6 @@
|
|
package org.bukkit.entity;
|
|
|
|
+import org.bukkit.Material;
|
|
import org.bukkit.block.data.BlockData;
|
|
import org.bukkit.material.MaterialData;
|
|
import org.bukkit.util.Vector;
|
|
@@ -143,4 +144,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
|
|
}
|