Solved Spectator Inventory 1.8

Discussion in 'Plugin Development' started by Rexcantor64, Nov 22, 2015.

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


    I'm making a skywars plugin (for my server) and I need help on gamemode 3 part. If you know, you can teleport to people selecting some items on inv (by minecraft default). But, you can teleport to everyone on my sever, so they can leave the arena. I need to only show the players playing. Is there any way to do that?

    eg.: cubecraft network
  2. Offline


    Add all players in game
    Loop through them
    Teleport on click
  3. Offline


    It's not that.
    On minecraft 1.8, there is already a teleport system and I don't know how to edit that.
    I want to hide player that aren't ingame.
    I will post a screenshot soon...
  4. Offline


    Most of the servers that use that are on bungeecoord
  5. Offline


  6. Offline


    Anyone can help me???
    I need that...
    Is always a way!
  7. Offline


    You can't edit that feature, you have to re-create it yourself.

    You'll need to:

    1. Keep a Collection of the players in your arena.
    2. Create a command or something that opens a GUI
    3. Put the Player heads of the players in your Collection inside that GUI
    4. Handle the InventoryClickEvent so that when a player clicks on that head, it teleports them to that player.
  8. Offline


    The only problem is:

    • I already had that type of system. It had a lot of bugs with the projectils and with the blocks (the spectator can bug they and the player die)
    • I want to use 1.8 spectator system.
    • I want my plugin without bugs :p
    I really need to use 1.8 spectator system...
    I will try to find it...

    An idea:

    If I hide all players on the server (except others on the arena) with player.hidePlayer(targetPlayer) the will not show on the spectator menu?
  9. Offline


  10. hide players not in the area for the spectator using spectator.hidePlayer(other)
  11. Offline


    Thanks for all your help. It works.


    If you use player.hidePlayer(targetPlayer); that player will not appear on the spectator menu.
  12. Offline


    Handy to know, cheers
  13. People that leave or die or how ever u want to do it m i guess do the player die event and and just move them to a arraylist and. Hide that player

    I might be late on the post but still doesnt hurt to help

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Thread Status:
Not open for further replies.

Share This Page