Per World Player List/ TabList

Discussion in 'Plugin Development' started by CaptainUniverse, Jul 31, 2014.

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

    CaptainUniverse

    I'm making a multiworld server and I need to know how to get a per world tablist. I want to do it myself so that I can have as few plugins as possible to lag the server. Can someone give me some code i can use onPlayerJoin or in SwitchWorld event so that everyone only sees in tab the people in their own world
     
  2. Offline

    jthort

    CaptainUniverse You can use getWorld for the player's location and then check the name. That way you can decide which player is in which world. As for the "SwitchWord Event" there is a playerChangedWorldEvent

    http://jd.bukkit.org/rb/doxygen/d0/...layer_1_1PlayerChangedWorldEvent.html#details
     
  3. Offline

    CaptainUniverse

    Thank you jthort but i still need to know how to do per world tablist. If you just told me how and I didn't even notice don't get mad I just started coding O_O
     
  4. Offline

    Goblom

    icedmoca likes this.
  5. Offline

    jthort

    No problem, I left that part out. I assume you mean the player list when you press tab when you say "per world tablist" You can send packets to blank out the users that are not in their specific world. I'm not experienced with this topic so i'm going to leave the details to be filled in by someone with more experienced in this subject.
     
  6. Offline

    CaptainUniverse

    Sorry Goblom can you give me some code please and thanks jthort
     
  7. Offline

    Goblom

    CaptainUniverse The Tab List shows all players on the server there is no way of changing that unless you use packets to send a different tab list. (Im not sure what packets have to be sent though)
     
  8. Offline

    samuel123abc

    CaptainUniverse You won't learn anything if you just get the code throw right in front of you.
     
  9. Offline

    CaptainUniverse

    Oh. . . But there is a porblem with using packets. When you want to do /msg for example you cant press TAB to fill in the players name is there any way to hide players name from the tablist without player.setPlayerListName(null) because it just leaves an empty space or without packets. If you must use packets can someone please explain how

    actually samuel123abc one learns the most from examples.

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

    jthort

  11. Offline

    CaptainUniverse

    ummm jthort im sorry but like i said in #9 I dont want to use playerlistName and on top of that there is a 16 char limit and some people have names 16 chars long if I want to set things in tab i'd rather use scoreboards. Can someone please explain how to use packets (sorry im demanding)
     
  12. Offline

    jthort

    You can create a method that filters the username if it's over 16 chars and concat it with "..." so something like

    Word - jthortblblblb...
     
  13. Offline

    CaptainUniverse

    Its alright jthort i'd rather use scoreboards which lets you go over 16 chars.

    Can someone please tell me how to use packets (Man sorry if im pissing you guys off im just again demanding)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
Thread Status:
Not open for further replies.

Share This Page