Solved Dynamic text with blocks.

Discussion in 'Plugin Development' started by DrMedia, Dec 6, 2013.

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


    Hi there. I'm currently a developer of a server network and have been asked to create a hub plugin. I've done it all but there is one thing I'm stumped on; how to create dynamic text with blocks that changes ever x seconds? I've seen it before on a few servers but haven't really played with anything like this before. Basically, the server owners want it to display text along the lines "Welcome to UprisingMC", "Minigames", that changes between the two every 25 seconds and also centers them both (at a location). If anybody could give me a head start or snippet, I would greatly appreciate it.
  2. Offline


    InGames maps changing eveyr X sec .
  3. Offline


  4. Offline


    Also, why in Plugin requests? o_o
  5. Offline


    Accidentally put in wrong section; iPad.
  6. Offline

    Windy Day

    I believe you would have better luck posting this here:
    Also, I'm not trying to be rude but just because you don't seem to familiar with these forums, try not to ask for code too much, your are supposed to go and try yourself then comeback and ask questions if you run into a problem. However, you it is fine to ask the best way to approach something, which you kind of did. There is not really easy way to do something like location.generateText() but there are really two ways to approach this. One being you could manually make a method like displayName(), diplayWebsite(), etc. and add to a preset location, then set the block to something, add again, set the new block and so on. This would mean you would need to rewrite the code when you wanted to change text and would take a long time to code. The way I would do it is, you can make a config file to save locations in. Then you can allow people to select an area like in world edit and do something like /savetext and save all the blocks in the cuboid they just defined. (look here for ideas on how to do that: or you can do a search). Then you schedule a repeating task that runs ever so often (20L = one second). And then you can retrieve a random saved region to load and change all the block to the same that they were when they were saved. Hence making it appear that the text is changing but also allowing to change the text displayed easier and not preset.
  7. Offline


    I've been on these forums for over a year :p I wasn't asking, it's just that I haven't played with things like this before. I know many developers are experienced in this, so I was asking for a 'boost'. Anyway, I've figured out how I'm going to accomplish it.
  8. Offline

    Windy Day

    Sorry, as I said I wasn't trying to offend you. Also, it was a long reply to type so I didn't see that it was a mistake till after I replied, if I had seen that before I wouldn't have said that. Good luck.
    DrMedia likes this.
  9. Offline


    Moved to correct section.
  10. Offline


    DrMedia So would you mind sharing how you did it ? This can help others who encounter the same problem as well.
  11. Offline


    Will do. Don't have access to my computer at the moment but will post ASAP.
    itsCrafted likes this.
Thread Status:
Not open for further replies.

Share This Page