spigot world help

Discussion in 'Spigot Plugin Development' started by snowyCoder, Jul 2, 2015.

  1. hello, i need to create a minigame where a player occupies a 2x2 chunk area, i need spigot to send ONLY those 4 chunks and NOT the rest of the world, can i? there is an event like "onChunkSend"? must i rewrite all spigot only for this?
     
    #1 snowyCoder, Jul 2, 2015
    Last edited: Jul 2, 2015
  2. I think that if you use protocollib you can maybe listen for the packet and change it. Or maybe the easiest way is to set the view distance of the server to 2. You might need to rewrite a small part of the server because I think the view distance can't be below 3
     
  3. thanks, i'll try
     
  4. Where can I find spigot's source code?
     
  5. when using the build tools you can find the source in there, but sometimes the best would be to use a java decompiler. And the best one I know as of today is fernflower
     
    • Funny Funny x 1
  6. sothatsit

    Patron

    Maybe also modify the packers when it sends the chunks around the 2x2 area to send solid barrier blocks, that way people won't glitch if they work out of their chunk.
     
  7. You're on the right track, bram. However, using ProtocolLib, you can intercept the MapChunkBulk packet, and prevent it from sending if it is out of your criteria range.
     
  8. Serializator

    Supporter

  9. Serializator

    Supporter

    • Winner Winner x 1
  10. @Serializator
    I have been bested... I bring great shame to my family. *slice*
     
    • Winner Winner x 1
  11. I used java jdk-gui but the it gives me a source full of errors...
     
  12. sothatsit

    Patron

    They avoid the dmca by getting the user to combine the sources and compiling instead of them doing it.
     
  13. thanks!