예제 #1
0
  /**
   * Gets the current music this Jukebox plays
   *
   * @return
   */
  public Music getMusic() {
    ItemStack current = inventory.getMusicSlot();
    if (!canPlay(current)) {
      return Music.NONE;
    }

    return ((MusicDisc) current.getSubMaterial()).getMusic();
  }
예제 #2
0
 public boolean canPlay(ItemStack item) {
   return item != null && this.canPlay(item.getSubMaterial());
 }