geforkt von Mirrors/Paper
1143b63663
* Add Position * move Position patch to start
52 Zeilen
1.7 KiB
Diff
52 Zeilen
1.7 KiB
Diff
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 ebab99bd0c4bc6ca19ba92ece93a5f903b38f9b3..fbe0a946d821e479fd3097021058d95732ace1b3 100644
|
|
--- a/src/main/java/org/bukkit/entity/Boat.java
|
|
+++ b/src/main/java/org/bukkit/entity/Boat.java
|
|
@@ -174,4 +174,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 7f9c4d4b430a3f0276461346ff2621bacf864075..bc1e62759c995a1463ebcd10d73c7d502c9acc45 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;
|
|
@@ -147,4 +148,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
|
|
}
|