Hello Spigot Community, I'm currently creating a Plugin wich involves the Actionbar... And i was wondering is there a way to recreate the Actionbar when you put a disc into a jukebox? Like this:
Do you mean the colour and such? Not without a mod (since action bar colours are limited to 16 colours). At most, you can send them in various colours to approximate the effect.
Oh woops. Might have misread the OP. Probably because my Whiskey laying next to me Sorry for the disturbance.
Yes that is what I'm trying to do... I also tried the idea with cycling the colors... But it suddenly stops somewhere and continues after like 4 seconds: Code (Java): List<String> colorlist = Arrays.asList("1","2","3","4","5","6","7","8","9","a","b","c","d","e"); runner2 = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() { public void run() { if(colorlist.size() > u) { for(Player all : Bukkit.getOnlinePlayers()) { sendActionBarMessage(all, "ยง" + colorlist.get(u) + toRCString(getConfig().getStringList("messages").get(i).replace("{player}", all.getName()).replace("&h", "")), 10, plugin); } u++; }else{ u = 0; } } }, 10, 10);
I believe there is a way to send music to players, could you not just cancel the interaction with jukeboxes and then play the music and add your own text?
This effect is not possible to create, because in source code of minecraft client it is defined. I think it is class GuiInGame.java if you have source code of minecraft client. So you can only simulate it by fast changing colors of your text.
I think it is possible with sending packets. Because if a player activates a disc the other players also get this messages, right? If yes, than you could just send a packet to the player to start the music and the bar should appear.