How To Use Packets To Make Players Of The Same Team Have Blue Wool On Their Heads

Discussion in 'Plugin Development' started by Cloaking_Ocean, Aug 13, 2014.

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

    Cloaking_Ocean

    So I've heard about packets and how complicated they are and how u have to have specific versions of a jar and such. I've read a thread like this before but the only answer was that is was a difficult topic. I would like to learn how to do this for my next private plugin. Any help is appreciated and I do have pretty good Knowledge of Java. Thanks in advance.
     
  2. Cloaking_Ocean Don't use packets unless

    a. You need to
    and b. You know what you're doing

    You don't need to use packets for this, and doing so provides no real benefit anyway, so use the BukkitAPI (setHelmet())
     
  3. Offline

    Cloaking_Ocean

    AdamQpzm

    I'm sorry if i didn't explain right but what i meant is that one player sees a pereson who is on his team as wearing a blue colored wool, and another person who isn't on their team sees that person without a wool block. This is just an example. This would be like if an owner of a faction saw his members with blue wool on their heads and non-members didn't.

    Also, if I never learn about packets i'll never know what i'm doing thus i can never use them. So I believe i should try to learn.
     
  4. Offline

    Cirno

    Use ProtocolLib; don't start using direct creation and interaction with Packets until you're familiar with how they work. You can create malicious packets accidentally or purposefully that can crash the client instantaneously.
     
    AdamQpzm and Cloaking_Ocean like this.
  5. Cloaking_Ocean Fair enough, that makes more sense now. Yes, displaying different equipment to different players would require packets. You can find the packet you'll need to send somewhere on this page. I could link you the exact one, but it's good to learn how to use that page if you're going to use packets :)

    EDIT: Ah yes, as Cirno says you should use ProtocolLib. It's a magical tool I never really get round to using.
     
    Cloaking_Ocean likes this.
  6. Offline

    Cloaking_Ocean

    AdamQpzm likes this.
Thread Status:
Not open for further replies.

Share This Page