Solved [1.11.x] Custom WorldBorder for each player

Discussion in 'Spigot Plugin Development' started by darkshadow22mc, Apr 13, 2017.

  1. Hello mates! I'm trying to make a system which makes what the title says, I want a custom WorldBorder for each player. I know it's possible due to a server has that system in his SkyWars plugin.

    I've already Googled it with some useless results, if you can help me out I'll be grateful!
  2. Well it is as easy as for example having the border on a Map for each player and then add some listeners so player's can't get out of it, also if you want the border to be visible you would have to send packets to each player with their own border data.
  3. Is not for a minigame, it's for survival so the world must be the same. I'll look for a NMS solution.
  4. Protocol works in this situation.
    Send packets per player for each border
  5. When did i say the world had to be different ? When i said "WorldBorder" on the Map i mean't a custom WorldBorder with the basic stuff like the center, and X, Z stuff, and maybe a method to check if the player is within range.
  6. I've already thought on that solution, use a PlayerMoveEvent and then check if X < i, but I want it to be fancier (and also, it would lagg less)

    I will only use my own plugin, but thank you, I'll try sending packets to each player!
  7. Fancier ? I see no real problem with it, that's kinda how WorldBorder plugins work, so there aren't many other ways of doing it, you will have to both use Packets if ypu want players to see a border and also another system to don't let them get out of it.
  8. Okay, anyways, I have never used NMS and after Googling it I've found this, if someone can explain me how to use it I'll be grateful!
  9. INFORMATION EDITED, I've been Googling for a while and I've found this:

    Code (Text):
    distance = max(min(resizeSpeed * 1000 * warningTime, abs(targetDiameter - currentDiameter)), warningDistance);
    if (playerDistance < distance) {
        warning = 1.0 - playerDistance / distance;
    } else {
        warning = 0.0;
    On this page: , but I don't understand how does that work (as I said, I've never used NMS). I know is not NSM, only a script with a bunch of vars xD
  10. ¬°bump! Someone can help me please? I've been looking for a solution during the whole day :p
  11. @Ploxh4D solved my problema. Thank you!

    QS; TL;