Create/Remove text with blocks.

Discussion in 'Plugin Development' started by DrJava, Jan 31, 2014.

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

    DrJava

    Hi there.
    I have seen servers such as Mineplex and others have text that is auto generated and changes on a timer.
    I am curious as to how they do this. I believe that they set the blocks from air to a new block, but how do they put it on a timer, generate the text to be centered, etc?

    The_Doctor_123
    mattrick

    Every single post of mine has to be accepted because the shitty staff have put restrictions on my account; I will just edit this main post.

    Thanks for the help you two.

    And yes Doc, all my posts have to be accepted by staff.

    Garris0n Nobody has told me why.

    mattrick So theoretically, if I just send that go every player on the server, it wouldn't use as much resources as actually placing/removing the block?

    mattrick ah, okay. Thanks.
     
  2. Offline

    maxben34

    They just use a repeating task for a counter and manually map out the lettering and use setType of the blocks at each location.
    Yes it must take a while to do this, but I doubt there is an easier way.
     
  3. Offline

    The_Doctor_123

    DrJava
    You'll need to define templates for characters in blocks. For example, and "M" might look like
    Code:
    1100011
    1010101
    1010101
    1001001
    1001001
    As for centering, you do this:
    Code:
    Start = lengthOfArea / 2 - lengthOfText / 2
    Are you serious?
     
  4. Offline

    mattrick

    DrJava
    You can use player.sendBlockChange(); to change the blocks to what you want them to look like, and only the player that you sent the change to can see it.
     
  5. Offline

    Garris0n

    Wait why?
     
  6. Offline

    HyrulesLegend


     
  7. Offline

    Garris0n

    I meant why did they put a restriction on his account...
     
  8. Offline

    mattrick

    DrJava
    No, but if you want it only to display to some players (different classes or something), you can use that.
     
Thread Status:
Not open for further replies.

Share This Page