Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-4503

Jukebox RecordItem is not only a Material

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • None
    • Irrelevant

    • 1.13-Latest
    • Yes

      Hello JIRA people,

      the Jukebox block has a method setPlaying(Material) and a Method getPlaying():Material , while that is a good idea it might as well be an ItemStack in both cases because jukeboxes DO store the ItemMeta and/or Attributes of the record item.

      While there are various ways of obtaining what is inside of the jukebox because it’s rather easy to get the NBT of the TileEntityJukebox-
      It is next to impossible to get that TileEntity itself to set or edit its NBT and half of the time a set method executed in that context behaves wierdly (while attempting to set a named record for example inside the jukebox)

      Context to better understand this; I am currently working on a plugin that adds custom music disks and I need to be able to put ItemStacks inside of jukeboxes without making them ‚play‘ in game sense;

      So what I would suggest is another three interaction methods for Jukeboxes:
      1: Jukebox#getRecordItem():ItemStack
      2: Jukebox#setRecordItem(ItemStack recordItem):Boolean
      3: Jukebox#setRecordItem(ItemStack recordItem, boolean startPlaying):Boolean

      To the JIRA Mods: You don’t have to take your time to implement this, I already did but I want to hear your feedback before I make an attempt to contribute this.

      Thanks -Julia

            Unassigned Unassigned
            RSTJulia Julia Fox
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: