mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 03:43:40 +01:00
Add Skull BlockState and Type enum. Adds BUKKIT-3258
By: meiskam <meiskam@gmail.com>
This commit is contained in:
parent
db2058e2d0
commit
7053beb776
2 changed files with 71 additions and 0 deletions
12
paper-api/src/main/java/org/bukkit/SkullType.java
Normal file
12
paper-api/src/main/java/org/bukkit/SkullType.java
Normal file
|
@ -0,0 +1,12 @@
|
|||
package org.bukkit;
|
||||
|
||||
/**
|
||||
* Represents the types of skulls
|
||||
*/
|
||||
public enum SkullType {
|
||||
SKELETON,
|
||||
WITHER,
|
||||
ZOMBIE,
|
||||
PLAYER,
|
||||
CREEPER;
|
||||
}
|
59
paper-api/src/main/java/org/bukkit/block/Skull.java
Normal file
59
paper-api/src/main/java/org/bukkit/block/Skull.java
Normal file
|
@ -0,0 +1,59 @@
|
|||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.SkullType;
|
||||
|
||||
/**
|
||||
* Represents a Skull
|
||||
*/
|
||||
public interface Skull extends BlockState {
|
||||
|
||||
/**
|
||||
* Checks to see if the skull has an owner
|
||||
*
|
||||
* @return true if the skull has an owner
|
||||
*/
|
||||
public boolean hasOwner();
|
||||
|
||||
/**
|
||||
* Gets the owner of the skull
|
||||
*
|
||||
* @return the owner if the skull
|
||||
*/
|
||||
public String getOwner();
|
||||
|
||||
/**
|
||||
* Sets the owner of the skull
|
||||
*
|
||||
* @param owner the new owner of the skull
|
||||
* @return true if the owner was successfully set
|
||||
*/
|
||||
public boolean setOwner(String name);
|
||||
|
||||
/**
|
||||
* Gets the rotation of the skull
|
||||
*
|
||||
* @return the rotation of the skull
|
||||
*/
|
||||
public BlockFace getRotation();
|
||||
|
||||
/**
|
||||
* Sets the rotation of the skull
|
||||
*
|
||||
* @param rotation the rotation of the skull
|
||||
*/
|
||||
public void setRotation(BlockFace rotation);
|
||||
|
||||
/**
|
||||
* Gets the type of skull
|
||||
*
|
||||
* @return the type of skull
|
||||
*/
|
||||
public SkullType getSkullType();
|
||||
|
||||
/**
|
||||
* Sets the type of skull
|
||||
*
|
||||
* @param skullType the type of skull
|
||||
*/
|
||||
public void setSkullType(SkullType skullType);
|
||||
}
|
Loading…
Reference in a new issue