[MECH] WorldBorder v1.7.2 - feature-rich world size limiting plugin [BukkitDev]

Discussion in 'Archived: Plugin Releases' started by Brettflan, Apr 4, 2011.

  1. Offline

    Brettflan

  2. Offline

    beecub

    Looks fine.
    Testing it instead of BorderGuard.
     
  3. Offline

    OrtwinS

    I might be missing something, but what features/improvements has this over Borderguard?

    -snip-, never mind


    Maybe you can explain?
     
  4. Offline

    MonsieurApple

    Add per-group manager groups on the same world (and different worlds) would be nice :D
     
  5. Offline

    Brettflan

    Off the top of my head:
    1. BorderGuard Lite is closed source. WorldBorder is open source, so anyone else is free to work on it or continue it if I suddenly disappeared for some reason.
    2. BorderGuard Lite has separate round and square border downloads, and if you mistakenly downloaded the wrong version for one upgrade, you would end up with the wrong border type. WorldBorder has both border types built in, and you can even switch on the fly if you like.
    3. WorldBorder allows you to set borders for worlds which you are not currently in, and lets you set them from the server console as well.
    4. WorldBorder should never kick you back to the spawn point unless you're in a distant spot in a nether world which has a completely solid chunk top-to-bottom with no place to stand. Further, it should stick you in the closest (vertically) safe place to stand, whether that's above or below your current level, and never stick you inside a block.
    5. This is just guesswork, but I expect WorldBorder's round border detection method is easier on the server than BorderGuard Lite's since WorldBorder's detection method is based on rBorder's excellent lightweight method. The square border detection should at least be on par.
    6. WorldBorder has full permission support and can be used by any Ops (and the server console), where BorderGuard Lite only works for the first person to use it in a world (as I understand it).
    7. WorldBorder can output a list of all borders in-game, and you can also change the border crossing message in-game.

    I mainly made this plugin because I was tired of rBorder and BorderGuard Lite not being updated in a timely manner, and BorderGuard Lite's source not being available where I could just update it myself as needed.


    So, permissions strictly for certain worlds, with a permission like "worldborder.myworld.set" or similar? That's a thought. I'll probably add something like that eventually.
     
  6. Offline

    MonsieurApple

    No I mean like set a border for each group. Like Group A can only go so far from x y z, but Group B can go farther from a different x y z.
     
  7. Offline

    OrtwinS


    Ah, you convinced me, very much.
    Put something like this in the first post, this explains a lot better.
    *clicks download button*
     
  8. Offline

    Brettflan

    Hmm, that would take some doing and would probably result in lowered server performance from having to constantly check the player's permission group every time they move. It's also not something I'm personally interested in for the plugin since I prefer the "one world border for everyone" concept. So, probably not going to happen, but I'll think on it a bit more.
    Anyway, the source is available, so anyone wanting to adapt the plugin that way is welcome to have at it. ;)

    Well, I don't really want to have a "reasons my plugin is better than his plugin" list in the first post. Besides, the information on how the plugin works is pretty much all in the first post, so it's possible to compare the features of the two plugins based on that.
    That said, another I missed from the list ( :p ):
    8. BorderGuard Lite will eject you from your vehicle when you hit a border. WorldBorder will kick your vehicle back with you still in it and simply set the vehicle's movement velocity to 0.
    This is actually one I've only tested with boats, so it actually might bear further testing with other vehicles.

    Olof is the real mastermind behind Factions, I just contribute fixes and the occasional extra feature. Thanks all the same, though. :)
     
  9. Offline

    EdGruberman

    Oh very nice! I created my own personal border plugin primarily because BorderGuard was closed source and wasn't updated soon enough to make me happy. (I also did it to learn Java and plugin development too...)

    I'm very excited to see someone else take the initiative here and open this solution up for all to be a part of. (And so I don't have to manage a thread related to my plug in now LOL).

    A++++ plugin, would download again! :)
     
  10. Offline

    Brettflan

    Absolutely. I'll be trying to keep it updated whenever new Recommended Builds come out, but others are welcome to release unofficial builds if I'm too slow. :)

    EDIT: I also see that the BorderGuard Lite author is now claiming that he has verified his plugin as faster than WorldBorder. Hah. Easy enough for him to state since his source is closed, right? Except, having used a java decompiler to view his source (they're easy to find and use, really), I don't see how that could be possible with all of the unnecessary repeated calculations he's making every time a player moves.
    I welcome disinterested third parties with programming skills to grab a java decompiler and do a comparison for themselves. ;)
     
  11. Offline

    EdGruberman

    Total border wars! I think he's assuming the whole synchronized map thing might be slower? Not sure. He's got enough string splitting going on to make my head spin though, I'm sure that can't be free actions either. But not sure on how it compares. He definitely repeats his code a lot. Also his code does not compensate for teleporting. (Well at least it'll let you teleport, generate chunks (if not already) THEN move you back in after you move again.)

    It does get me thinking thought that PLAYER_MOVE is a pretty common event to occur. I wonder what IS the best way to store border data for the quickest comparison on each event...
     
  12. Offline

    Euron

    Question: what happens if someone logs in on the outside of the border, by a significant distance? Where are they teleported?
     
  13. Offline

    EdGruberman

    Actually this is a concern with this plugin I think? If I'm reading the code right, the player will be teleported back 3 blocks at a time (along both axes eventually). It's possible though with that logic the player is never returned inside the border. (Edit: see below, it's smarter than I thought it was.)

    In my custom plugin I wrote, I did a single check to move the player back 3 spaces also along the breached axis, but then if that wasn't determined to be inside the border, checked their default spawn, if that also wasn't inside the border, I then sent them to the origin of the border.

    It's honestly hard to decide the best approach there.
     
  14. Offline

    Brettflan

    No, it finds the closest place 3 squares inside the border rather than just finding a place 3 squares back from the current location; it should be only a single teleport.

    So, if you log in outside the border by a significant distance, you'll just be teleported back 3 squares inside the edge of the border.
     
  15. Offline

    EdGruberman

    Ah good, that makes sense. Sorry for the confusion.
     
  16. Offline

    ledhead900

    Gotta say you really sum up what is better in this besides both border-guards had a big old fit when teleporting to worlds using mulitverse, where it would drop you at what seams be a random location based on the calculated distance out it think you where outside border by.

    If this does not do that and lest my players TP freely thru portals and to other worlds with out chucking a stink over it, and it allows an OP or relevent permissions group to pass thru the border.

    You instantly gain top points over Borderguard and Rborder.

    At least borderguard hated muli world last I checked but it appears to have fixed that now it just down to what ever one can do its job fastest.



    I'm no coder but I see flaws with that being fast already.

    Why check player movement at ALL when not needed that's a big waste of cycles right there.

    You really only to want to start position checking when your about 20 - 30 blocks from the border.

    Also you do not want a fixed Range to move player to since the border may very well end at a void or other un desired location. your best bet is to check for safest block that is within 5blocks of the border. Then if no block is found move back another 5
     
  17. Offline

    Brettflan

    @ledhead900 it currently doesn't allow anyone beyond the specified borders, Op or not. Otherwise, I hope it meets your expectations. :)

    I'd actually considered setting up a repeating task to run every half a second or so (I suppose the timing could be configurable) which would either check all players or maybe reference a list of players who are tagged as having moved since the last check. I'm not sure whether the performance would be improved significantly by that type of setup or not.
    It's a possibility, and I might try something like that in future. The current checks it runs on every player movement should be pretty lightweight already, though.
     
  18. Offline

    ledhead900


    Hmm It will do.

    Tho I'm not entirely convinced that constant checking is best way to go about ANY player movement event other then if it REALLY matters, Like players riding in minecarts or mob riding.

    If it were me Id create the plugin so the border has triggerarea 3-5 blocks around it and run checks ONLY within the trigger area this results in NEVER EVER checking players player movement.

    Instead it would only start running checks if a player entity was present within the triggerarea.

    Otherwise my other method would be to only check players who are within 5 blocks from the boarder via any other method.

    I guess I'm just one of the people who don't like constant checking if its avoidable.

    EDIT:

    Actually my other method would probably log each players coord as they log in ONCE! then do a check every 10mins there after if found past the border do its thing.

    But still Triggerzone I think at least is a better method.

    Tho I know nothing so do with this dribble as u please.
     
  19. Offline

    Brettflan

    @ledhead900 The only way to check a "zone" like that would be to set up a repeating task, basically what I was talking about above.
    As for only checking players who are within a certain distance of the border, how do you know which players are within that distance from the border? You have to check, of course. ;)

    I missed this earlier, but I've just tested WorldBorder 1.0 in CraftBukkit dev build 655 and it worked fine.
     
  20. Offline

    Euron

    Is there any possibility of you adding a feature to, instead of being forced back from a border, to be tp'd to a certain preset location, or spawn? If not, does anyone know a plugin with that feature already?
     
  21. Offline

    anon

    Will ever be support for multiple borders on the same world? ITs a nice feature, so you could run different groups away from each other. Also, a permission to ignore the border would fit well. :)
     
  22. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    8. Brettflan hasn't added code that sends a private message to notch advertising his site on any server that runs the plugin, unlike BoardGuard Lite. \o/

    I'm going to check this plugin out later, the more efficient system sounds like fun.
     
  23. Offline

    Kane

  24. Offline

    phondeux

    Bug;

    It will set a border when game active, but upon a server restart it completely forgets the border and world - you have to set it again. The world is called, "world.biome" and this is the config.yml file;
    Code:
    message: You have reached the edge of this world.
    debug-mode: false
    round-border: false
    worlds:
        world:
            biome:
                radius: 2000
                z: 17.65947898468193
                x: 28.951402047599213
            radius: 0
            z: 0.0
            x: 0.0
    Yeah, I noticed that it doesn't have my world name in there but instead considers the period as some kind of indentation marker.
     
  25. Offline

    Brettflan

    That's certainly possible to add, with practically no overhead. I'll probably add that option in future.

    The problem there is the need to check user group membership and consult different borders for different groups, which could add considerable overhead to the process. It's not something I'm currently planning to add, but I'll consider it.

    That's a bit beyond the scope of what I'm aiming for with this plugin. Doesn't WorldGuard basically have pretty much all of those capabilities, anyway?

    Ah, you're right, the configuration storage method used (the one built into bukkit) uses the period character to denote configuration node paths. I hadn't considered world names with periods in them; definitely a bug. I'll see about fixing that ASAP. Thanks for the report.
     
  26. Offline

    anon

    Well, the "group" restriction isnt really needed. I mean, multiple borders for everyone would be great. I would only need to set every group spawn point inside their own area, and everything would be good. It would also be very good as multiple borders could make a world with many different environments. Something like, a border on a desert, a border on a island, on a forest, etc etc etc. Then you move between them with warps, portals, or anything you want.
     
  27. Offline

    XAM

    It would be awesome if you could add an option for how many blocks you get knocked back. I would like to have 1 instead of 3 for an example.
     
  28. Offline

    Brettflan

    OK then.

    Download WorldBorder v1.0.1

    Changelog:
    • Bugfix: saving/loading data for worlds with periods (".") in the name wasn't working correctly.
     
  29. Offline

    Kane

    @Brettflan WorldGuard is something id like to not support for so many reasons. But mainly because no it has click to click regions. I don't want region support I want border support that start from spawn and work outwards. I thought I suggest it maybe as a extra plugin and such.

    There is already a LARGE demand for it too.

    http://forums.bukkit.org/threads/bo...ay-it-should-be-simple-easy-and-useful.11752/

    I mean check the other requests not near as many hehe :)

    Anyways just a suggestion. I will keep looking :(
     
  30. Offline

    Brettflan

    In that setup, it would still need to run through full border checks on all borders until it hit one which the player was inside; that would probably be even more strenuous than just checking a single border based on user group. The round border check in particular might be bad for multiple border checks. It begins with some extremely fast and non-strenuous calculations to determine if the player is clearly inside the border (think of a square inside your round border with the 4 corners of the square touching the edge of the circle, it checks that area first), but then has to work through further more strenuous calculations if the person is near or over a border. With it doing the whole process on several borders for every player movement... that doesn't sound pretty, and counteracts much of the efficiency behind the border checking algorithm.
    Even if I were to move it to running on a timer, it would still be that much more likely to actually impact server performance.

    That's sensible enough, and it wouldn't impact performance. I'll definitely add it in the next release.
     

Share This Page