Overriding other plugin's actionbar

Discussion in 'Plugin Development' started by Hex_27, Oct 11, 2015.

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

    Hex_27

    Is it possible to override other plugin's actionbar to display something else?
     
  2. Offline

    mine-care

    @Hex_27 Action bar message? Just send a new packet :/
     
  3. Offline

    Hex_27

    @mine-care
    Yea... but then things happen, and other plugins may also send a packet, and ends up your actionbar only displays briefly. Is there a way to change that?
     
  4. Offline

    mine-care

    @Hex_27 you can always intercept the outgoing packet (Protocol Lib) or edit the code of the plugin you want to change the bar for but I don't regimend this.
     
  5. @Hex_27 @mine-care
    You could add a certain prefix to the message every time you send the packet, and when you intercept the packet you check if the message starts with the prefix: If it does, remove the prefix and don't cancel, if it doesn't cancel the packet.
     
  6. Offline

    Hex_27

    @mine-care
    @megamichiel But I don't wanna disrupt other plugins either. Is there a way to like... have one actionbar above another? (Two paragraphs kinda).
    Like
    Actionbar1
    Actionbar2

    Like that
     
  7. Offline

    SuperSniper

    @Hex_27 No that's not possible, unless you want to do something like this:

    Add an item in a player's hand for a brief moment
    Change name to the actionbar message you want
    remove item from hand

    but that would be very weird and unsuspecting for the player
     
  8. Offline

    mine-care

  9. Offline

    Hex_27

    I need a health bar for my rpg plugin. There's no better place to put it than an action bar. But I need it to be constant and uninterrupted. Any other way?
     
  10. @Hex_27
    You could also send a title packet with an empty title and put some stuff in the subtitle, but any further than what was suggested here is not possible.
     
  11. Offline

    teej107

    I haven't played with the action bar at all but does \n work?
     
  12. Offline

    boomboompower

    @teej107 Not if your trying to get a second bar.
     
  13. Offline

    teej107

    Well \n is what you use for a newline. I was just wondering if the client allowed it to show.
     
  14. Offline

    boomboompower

Thread Status:
Not open for further replies.

Share This Page