Hide dropped items from some players

Discussion in 'Plugin Development' started by Pr07o7yp3, Jan 14, 2014.

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


    Ok, I have started to write plugin for PVP 1 vs 1.
    But instead to make 10-15 arenas for every couple, I want to make just one arena and every couples to play in this arena. I'll hide them each other so I'll simulate every couple is alone in the arena.
    The problem are the dropped items.

    Lets see an example:
    There are 4 players. Player1 vs Player2 and Player3 vs Player4.
    Player1 can see Player2 and vice versa but they cannot see Player3 and Player4.
    So, if Player1 kill Player2, Player2 will drop some items. I just want these items to be hidden for Player3 and Player4, only Player1 to can see it.

    Is it possible? If yes I'll be very grateful if you help me. :)
  2. Listen to playerdeathevent and clear the drops.
  3. Offline


    Did you read my thread?
  4. oh... I am afraid you could not hide items due to Bukkit's restrictions. You could do that through packets though
  5. Offline


  6. Offline


    AFAIK it's not possible to hide specific entities without packets.

    However, it would be much better to
    a) Just make the drops unable to be picked up for the other players or
    b) Just make separate arenas. Once you get a large amount of players, remember that although Bukkit isn't letting the client know there's players in the arena, Bukkit still knows. Arrows will drop out of mid air, and sword hits may hit other people, and not count in the 1v1 match
  7. Offline


  8. Offline


    zombiekiller753, I know about the arrows and I'll forbid using bows.
    I don't think swords will interact with hidden players!?

    TryB4, Ty, I'll take a look.
Thread Status:
Not open for further replies.

Share This Page