Text under the Name

Discussion in 'Plugin Development' started by BaumwolleHD, Aug 4, 2013.

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

    BaumwolleHD

    Hello, I tried to put a text , in my case Admin under the name of ops like this:


    Code:java
    1. if(event.getPlayer().isOp()) {
    2. int lenght = event.getPlayer().getName().length()-16;
    3. String endstring = "";
    4. if(event.getPlayer().getName().length() != 16) {
    5. for (int i = 0; i > lenght; i++) {
    6. endstring = endstring + " ";
    7. }
    8. } else {
    9. endstring = "";
    10. }
    11. event.getPlayer().setDisplayName(event.getPlayer().getDisplayName()+endstring+"Admin");
    12. }


    But if i use this code in my PlayerJoinEvent ops are stuck at loading terrain.

    Please help

    #Edit 1

    I now use scoreboard but can I get rid of the 0?

    Please i need help fast

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 3, 2016
  2. Offline

    BaumwolleHD

    I now use scoreboard but can I get rid of the 0?
     
  3. Offline

    kreashenz

    You can't get rid of that 0 at the bottom. Why not create admin levels or something?
     
Thread Status:
Not open for further replies.

Share This Page