mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-03 23:07:40 +01:00
#491: Add support to change block's lid state
By: jameslfc19 <jameslfc19@gmail.com>
This commit is contained in:
parent
3d462cfcdf
commit
7278ee0293
@ -5,4 +5,4 @@ import org.bukkit.loot.Lootable;
|
|||||||
/**
|
/**
|
||||||
* Represents a captured state of a Barrel.
|
* Represents a captured state of a Barrel.
|
||||||
*/
|
*/
|
||||||
public interface Barrel extends Container, Lootable { }
|
public interface Barrel extends Container, Lootable, Lidded { }
|
||||||
|
@ -7,7 +7,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
/**
|
/**
|
||||||
* Represents a captured state of a chest.
|
* Represents a captured state of a chest.
|
||||||
*/
|
*/
|
||||||
public interface Chest extends Container, Lootable {
|
public interface Chest extends Container, Lootable, Lidded {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the inventory of the chest block represented by this block state.
|
* Gets the inventory of the chest block represented by this block state.
|
||||||
|
16
paper-api/src/main/java/org/bukkit/block/Lidded.java
Normal file
16
paper-api/src/main/java/org/bukkit/block/Lidded.java
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
package org.bukkit.block;
|
||||||
|
|
||||||
|
public interface Lidded {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the block's animated state to open and prevents it from being closed
|
||||||
|
* until {@link #close()} is called.
|
||||||
|
*/
|
||||||
|
void open();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the block's animated state to closed even if a player is currently
|
||||||
|
* viewing this block.
|
||||||
|
*/
|
||||||
|
void close();
|
||||||
|
}
|
@ -7,7 +7,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
/**
|
/**
|
||||||
* Represents a captured state of a ShulkerBox.
|
* Represents a captured state of a ShulkerBox.
|
||||||
*/
|
*/
|
||||||
public interface ShulkerBox extends Container, Lootable {
|
public interface ShulkerBox extends Container, Lootable, Lidded {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the {@link DyeColor} corresponding to this ShulkerBox
|
* Get the {@link DyeColor} corresponding to this ShulkerBox
|
||||||
|
Loading…
Reference in New Issue
Block a user