Solved Change a block for a single player

Discussion in 'Spigot Plugin Development' started by Okx, May 23, 2016.

  1. Okx

    Okx

    Well, I want to make a certain player see a block that isn't really there. Don't mind about hitboxes.

    Note: This is probably using packets, and I've heard that packets get swapped around often so if you provide a link with how packets are swapped around and how I can update plugins using packets, that would be great (also tell me how you came up with the code so I don't need to ask for help with packets in the future).
     
  2. 4chan

    Supporter

    Some guy on YouTube has a packet series IIRC. He went through this.

    You did no research.
     
  3. 4chan

    Supporter

    GOOOOOGLEEEEE!
     
  4. I believe it's because the byte value for the data is deprecated and will eventually be replaced. For the meantime this method still works and nothing new has been presented that will supersede it.
     
  5. Okx

    Okx

    Alright, thanks.
     
  6. 4chan

    Supporter

    Never use deprecated code.
     
    • Optimistic Optimistic x 1
  7. Wrong.

    The old Bukkit team used deprecations wrongly. Yes, you are not supposed to normally use deprecated methods but that's not the case here. Bukkit went on a deprecation spree and deprecated literally everything containing a magic number. This was a move to inform plugin devs of a pending change brought down by Mojang. No alternatives have been made for most of these deprecated methods and are still safe and advised to use. There have been a lot of changes sincee this first happened, including the Microsoft takeover. It may or may not still ever happen. Here we are on version 1.9.4 and magic numbers are still around...

    Now, there's also other methods that are deprecated that never will be removed. Like the Server#getPlayer(String) method. It was deprecated imply to inform devs about the transition to UUIDs. It was planned to be removed after enough time had passed, but that team is now dead and spigot seems to be real slow at making any actual changes to the API in any direction.

    Welcome to the Bukkit project, where a lot of things don't make sense.
     
  8. 4chan

    Supporter

    OK then, I will correct myself.

    Never use deprecated network code because it's a lot more fun to do it yourself and know how it works.*
     
    • Optimistic Optimistic x 1