mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 09:17:36 +01:00
SPIGOT-4503: Add API to insert complete ItemStack into Jukebox
By: md_5 <git@md-5.net>
This commit is contained in:
parent
cf8cbb0713
commit
c078950291
@ -1,6 +1,7 @@
|
|||||||
package org.bukkit.block;
|
package org.bukkit.block;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a captured state of a jukebox.
|
* Represents a captured state of a jukebox.
|
||||||
@ -8,9 +9,9 @@ import org.bukkit.Material;
|
|||||||
public interface Jukebox extends BlockState {
|
public interface Jukebox extends BlockState {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the record being played.
|
* Gets the record inserted into the jukebox.
|
||||||
*
|
*
|
||||||
* @return The record Material, or AIR if none is playing
|
* @return The record Material, or AIR if none is inserted
|
||||||
*/
|
*/
|
||||||
public Material getPlaying();
|
public Material getPlaying();
|
||||||
|
|
||||||
@ -21,6 +22,20 @@ public interface Jukebox extends BlockState {
|
|||||||
*/
|
*/
|
||||||
public void setPlaying(Material record);
|
public void setPlaying(Material record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the record item inserted into the jukebox.
|
||||||
|
*
|
||||||
|
* @return a copy of the inserted record, or an air stack if none
|
||||||
|
*/
|
||||||
|
public ItemStack getRecord();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the record being played.
|
||||||
|
*
|
||||||
|
* @param record the record to insert or null/AIR to empty
|
||||||
|
*/
|
||||||
|
public void setRecord(ItemStack record);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the jukebox is playing a record.
|
* Checks if the jukebox is playing a record.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user