Spazzy Chat GUI?

Discussion in 'Plugin Development' started by thebigdolphin1, May 5, 2013.

Thread Status:
Not open for further replies.
  1. I currently have Chat-GUI kinda thing for a plugin im making, its meant to send the message to re-update the chat every second/when an event is triggered.

    On MCCTF theres No 'Chat spaz' at all, whereas, with my GUI, it keeps spazzing out/not showing all at once, and flickers, which gets annoying.
    Here is my code:

    Code:
    String message = line20 + "\n" + ChatColor.RESET + ChatColor.RESET + line19 + "\n" + ChatColor.RESET + line18 + "\n" + ChatColor.RESET + line17 + "\n" + ChatColor.RESET + line16 + "\n" + ChatColor.RESET + line15 + "\n" + ChatColor.RESET + line14 + "\n" + ChatColor.RESET + line13 + "\n" + ChatColor.RESET + line12 + "\n" + ChatColor.RESET + line11 + "\n" + ChatColor.RESET + line10 + "\n" + ChatColor.RESET + line9 + "\n" + ChatColor.RESET + line8 + "\n" + ChatColor.RESET + line7 + "\n" + ChatColor.RESET + line6 + "\n" + ChatColor.RESET + line5 + "\n" + ChatColor.RESET + line4 + "\n" + ChatColor.RESET + line3 + "\n" + ChatColor.RESET + line2 + "\n" + ChatColor.RESET + line1;
    p.sendMessage(message);
    line 1 to 20 are the lines of the chat, which are set earlier on before this code (not really relevant).
     
  2. Offline

    Ultimate_n00b

    Erm... why do you have your code like that?
    Just have it loop a few times, instead of copying and pasting/typing it all..
     
  3. Ultimate_n00b
    Im trying to make it the least laggy as possible, and it needs to always show in the chat, like MCCTF.
     
  4. Offline

    Ultimate_n00b

    Why would it be less laggy that way?
     
  5. Ultimate_n00b
    94.23.1.6:25591
    That server has the plugin running, and look at the chat.
     
  6. Offline

    Ultimate_n00b

    I understand what you want.
    I was just mentioning you could use a loop to add the blank lines.
     
  7. Offline

    Ultimate_n00b

    Erm..
     
  8. Offline

    Superkabii

    You're not going to lag your server by using a loop. This would have little if no effect on the performance, since you're still performing the same task.

    Consider how using so much concatenation is your largest performance problem here, and even that wouldn't likely create considerable lag.
     
  9. Superkabii
    It doesnt lag the server, but the chat lags/spazzes out.
    Go on the ip I sent somewhere above and you'll see.
     
  10. Offline

    ZeusAllMighty11

    Unless you're running on a toaster 2.0, you shouldn't lag because of a for loop that adds blank lines.
     
  11. Offline

    Superkabii

    *ahem*

    No. The majority of this has been about it being less laggy to do the chat this way, though it was suggested to just loop and send seperate messages.
     
  12. Offline

    ice374

    By spazzy chat do you mean ChatColor.MAGIC ?
     
  13. Offline

    chasechocolate

    I think he means it looks funny because players are constantly being sent messages.
     
    Ultimate_n00b likes this.
  14. Offline

    Ultimate_n00b

    Most likes in my life xD
     
    thebigdolphin1 likes this.
Thread Status:
Not open for further replies.

Share This Page