#704: Added explicit API to stop a Jukebox from playing

This commit is contained in:
Matthew Miller 2020-07-10 09:02:21 +10:00 committed by md_5
parent dba91d2ab6
commit 93cfb195ca
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -77,6 +77,11 @@ public class CraftJukebox extends CraftBlockEntityState<TileEntityJukeBox> imple
return getHandle().get(BlockJukeBox.HAS_RECORD); return getHandle().get(BlockJukeBox.HAS_RECORD);
} }
@Override
public void stopPlaying() {
getWorld().playEffect(getLocation(), Effect.RECORD_PLAY, Material.AIR);
}
@Override @Override
public boolean eject() { public boolean eject() {
requirePlaced(); requirePlaced();