Re-playable Juke Box

Discussion in 'Archived: Plugin Requests' started by Phantom Index, Nov 24, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Phantom Index

    Could use a plugin developer, but for now I was hoping to just see a plugin that can allow a disc to be looped in a juke box. so i won;t have to keep taking the disc out and inserting it back in to replay the song.

    If someone is interested in bothering with this plugin, then you have my thanks.
     
  2. Same request as @Torrey Leonard has http://forums.bukkit.org/threads/infinite-jukebox.46878/

    I've played with the code @zhuowei made and created a (hopefully) working version of his one for 1.0.0.

    Can't test it in Minecraft self but server didn't give me error when starting the plugin.
    Usage is rightclicking an jukebox with a Gold or Green record. Other records aren't supported yet. Just tell me if this one works then I can change it for all discs!

    Download: http://dl.dropbox.com/u/1739265/RecordRepeat.jar
     
    zhuowei likes this.
  3. Offline

    Phantom Index

    I'll give it a shot

    Code:
    16:04:32 [SEVERE] Could not pass event PLAYER_INTERACT to RecordRepeatPlugin
    java.lang.ClassCastException: org.bukkit.material.MaterialData cannot be cast to org.bukkit.block.Jukebox
            at net.zhuoweizhang.recordrepeat.RecordRepeatPlayerListener.onPlayerInteract(RecordRepeatPlayerListener.java:35)
            at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:330)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:171)
            at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:266)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:592)
            at net.minecraft.server.Packet15Place.a(SourceFile:39)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:516)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    

    I get this on the console when I use a gold disc on it.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
  4. Grrr... I need Minecraft then to test it out. Will be this weekend! Sorry for the buggy one. Just can't start Minecraft here at work ;)
     
  5. Offline

    Phantom Index

    Ok
     
  6. Offline

    Onlyme

  7. Offline

    Phantom Index

    It's nice, but i only need replayable jukebox and nothing else.
     
  8. That's why I get this one done first and then go and add more stuff for the other!
     
  9. Offline

    Onlyme

    Aah, so a lite version. :)
     
    dadaemon likes this.
  10. Offline

    zhuowei

    Back in CB1000, when I made that plugin, Jukebox was a part of MaterialData; now it is a subclass of BlockState.
    Code:
    ((Jukebox)block.getState().getData())
    is now
    Code:
    ((Jukebox)block.getState())
    .
     
  11. Here it is! Record Repeat! Tested and all!

    No permissions, does all discs, saves JukeBoxes into config so they restart after the server reloads/restarts!
    The JukeBox repeats playing the disc until the it has been ejected.

    http://dl.dropbox.com/u/1739265/RecordRepeat.zip

    Just reply here if there are any bugs...
     
  12. Offline

    Dec64

    @dadaemon
    This happens on startup. Any ideas?
     
  13. Offline

    Phantom Index

    ty ^^

    One thing i noticed is when you logout it stops playing for you.. That bites...

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
  14. When you logout and you login it stops yes. Nothing I can do about that. Thats how Minecraft works. But the songs will start again when the original song ends.

    PS: Created a Bukkit Dev page for the plugin. Please report bugs/features through that.

    http://dev.bukkit.org/server-mods/recordrepeat/

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
  15. Offline

    Phantom Index

    Maybe we could somehow have it start playing with whatever disc is in the jukebox when the server is booted up. that will make it continues.
     
  16. It already does that :) (Doesn't it?)

    Just login, put a disc in a jukebox, then do a /reload on the console. It should play the disc after a few seconds after the server is reloaded.
     
  17. Offline

    Phantom Index

    I meant restarting the server, not reloading.
     
  18. Hehehe... It does :) But the problem probably is that you login after the song started. Again, that's the problem with MineCraft itself.

    PS: Just tested it on a vanilla Bukkit. When you place a disc in a jukebox, logoff, then log back in. The jukebox won't be playing. So sorry... That's how Minecraft works :(

    I can change it so that when someone logs in the disc restarts itself. But if someone relogs 10 times in a row it could get messy...
     
  19. Offline

    amunro

    Hey, firstly, great plugin. I have no idea why this isn't in the plugin list and is actually quite hard to find...but anyway, good job.

    One slight issue, one which I am guessing is down to minecraft, not the plugin. I have two jukeboxes within my city, they are not very close to each other, and you cannot hear one for a good 20 block radious around the other.

    For some reason, when one restarts, it cuts the other one out. Is there anyway to stop this?
     
  20. It is in the list. You just have to click on the top right on "Search on BukkitDev" :)

    The problem your reporting is something I have to look into. I've done multiple tests with standard Minecraft and there are some issues with playing music. (One starts the other stops. After relogging you have to wait until it repeats. And other stuff.)

    I will try and give it a try to fix this when I find the time. But don't have your hopes too high because I think it isn't solvable without client mods...
     
  21. Offline

    frankenboom

    hey how ya doin
    anyways
    I'm getting a lot of console spam...not sure exactly when it happens, but if you need me to I can try figuring it out for sure. Just as a guess, I think it starts spamming when the record is supposed to restart.
    The record does not restart, or it stops playing. If I can hear the record playing, it restarts normally and does not seem to start errors. If I'm in hearing distance of the record after the errors have started, the errors stop but it does not play. Reloading or putting in a new disc seems to stop that. The severe errors are scary :O and spammy.
    Thanks!
    http://pastebin.com/FH3ckqGk
     
Thread Status:
Not open for further replies.

Share This Page