Add API to get Material from Boats and Minecarts

This commit is contained in:
Madeline Miller 2020-12-31 12:48:38 +10:00
parent 0b52df89b3
commit 28333dc9b5
2 changed files with 21 additions and 0 deletions

View file

@ -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
}

View file

@ -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
}