Coder Social home page Coder Social logo

brettflan / worldborder Goto Github PK

View Code? Open in Web Editor NEW
139.0 17.0 209.0 1.12 MB

Bukkit plugin for maintaining borders for your worlds to limit their sizes, as well as generating missing chunks or trimming excess chunks.

Home Page: https://www.spigotmc.org/resources/worldborder.60905/

License: BSD 2-Clause "Simplified" License

Java 100.00%
worldborder minecraft-plugin bukkit-plugin java minecraft minecraft-server bukkit spigot-plugin

worldborder's Introduction

WorldBorder

This plugin is no longer being supported. Sorry, I just don't have the time or interest for it at this point. People are welcome to make their own forks of the project and continue it. The source is under the extremely permissive BSD license and as long as you maintain a link back to the original project somewhere (even in a text file somewhere in the project), you're welcome to do what you like with it.

More info is available on the Spigot Resource page for this plugin.

worldborder's People

Contributors

benjajaja avatar brettflan avatar brokkonaut avatar gbl avatar indiv0 avatar j0b10 avatar kagamul avatar lrflew avatar macalinao avatar mikeprimm avatar rourke750 avatar roycurtis avatar shadowranger avatar zeroerrors avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

worldborder's Issues

trim dont work

Bukkit/Spigot 1.11.2

the trim command don't work correctly .. not all chunks will remove after the default 208 blocks beyond the border

[Feature Request] Worldborder middle point teleport

Hello,

I have set my worldborder earlier, but I'd like to make my worldborder bigger soon.

Is there anyway for me to check where the middle of the worldborder is and where my worldborder radius is set too?

It would be nice to see what radius I have set it to and to teleport to the middlepoint so I can easily make it bigger.

Currently, I have no idea how I could safely extend the worldborder.

Thanks in advance,

Sikatsu

1.9+: All boats are changed to oak boats

1.9 introduced 6 boat types. If you ride a boat into the world border, the boat type is reset to oak boat.

It's caused by:
https://github.com/Brettflan/WorldBorder/blob/master/src/main/java/com/wimbli/WorldBorder/BorderCheckTask.java#L86

Since 1.9 boats does not visually glitch like before. So it would be possible to teleport the boat, too. (Then you'll have to call eject() a seconds time because the boat might have a second passenger.)

Or you could spawn a new boat and set the type of the old boat.

[Feature] auto pause fill on player connect

This request is for adding an optional auto-pause feature to the worldborder config.
If active, in case a worldborder fill is running, make it pause once a player connects, and resume once the last player disconnects, after an optional cooldown time.
This way, the system can automatically run at the optimal time without disrupting gameplay.

Boat duplication in 1.9

2 players riding a boat into the world border will make the boat split into 2 boats, giving 1 oak boat and 1 of whatever color. My theory for this is when it tries to teleport the players away from the border, it thinks the players are riding individual boats, not sharing one. So it moves the boat away with the players, spawning another boat since it thinks the player is riding one but it doesn't know it can put them inside the same one. Or I could have no idea what i'm talking about. Probably that second thing.

[Feature]: Visual Border

I know that the in-game world border gives a visual, but it doesn't have the ability to be circular. It it possible to use particles with your plugin to give a visual of the world border? I know it can be veeery resource heavy if the whole world border was covered in particles, but that could be solved by displaying the particles within the certain radius of a player.

[Req] Polygon shapes, multilayer shapes

The first part is an ability to set several shape points (like WG's poly selection) in CW or CCW order.

The second is to create shape by defining several subshapes and combining them with AND/OR/XOR/NOT/() operators. For e.g.: square shape [from -1000;-1000 to 1000;0] AND square shape [from -1000;-1000 to 0;1000]. Dynmap can show all subshapes (named) at the same time, no need to calculate exact final border.

Player is dismounted when world wrap is enabled

A played crossed the worldborder in a boat. They were dismounted from their boat and teleported to the other side of the world. Their boat continued on its original path and is now sitting outside the worldborder. The boat should come with the player, even if they are momentarily dismounted.

Bug with Spigot

There is a bedrock glitch, which is happening with portals that are too far from spawn (I don't have the exact distance) where once you go back in the Nether it'll teleport you to the edge of the world with an error message, and players will die in the bedrock/void.

WorldBorder Version: 1.8.6

Spigot Version: This server is running CraftBukkit version git-Spigot-047f737-744e1a1 (MC: 1.10.2) (Implementing API version 1.10.2-R0.1-SNAPSHOT)

Video: https://www.youtube.com/watch?v=4F6WDjT5CyY

[Request] Forge port

There's apparently zero mods at the moment which offer as much features as your plugin. It would be great to see nice round worlds on modded servers too so is there any chances for Forge port of this plugin?

Chunks generated outside WorldBorder?

I did a new Fullrender with Dynmap on one of my worlds because I updated to Dynmap 2.6Dev. Then I found a couple of single chunks outside of my Worldborder. This happend with older versions of Dynmap before. I´m sure there was no player near this area.

chunksoutsideworldborder

Any idea what can cause this?

Odd teleport in world_nether at 1.9

If I try to teleport form world to world_nether through a vanilla portal, it teleport me to somewhere else not in front of the nether portal with WorldBorder's message which is configured.

Here is my plugin list and WorldBorder's config file.

https://github.com/semaulhq/plugins.

It appear every spigot build after 1.9.

Worldborder fill not working correctly (I think?)

So I used /wb fill over the night. As seen in the logs it said ''task completed''. However when I run /wb fill again, it starts from 75%. So it's not completed then? I'm confused.

[WorldBorder] [Fill] 7791 more chunks processed (3621127 total, ~99.9%) (free mem: 3799 MB)
[WorldBorder] [Fill] task successfully completed for world "world2"! (free mem: 3717 MB)

WorldBorder with Spigot 1.11.2 does some weird things

I tried generating a world fill with a server instance of 8GB of memory and it seemed OK until it ran out of memory.. and then just sat there. No memory was ever freed and the generation could not continue. So I "wb fill cancel" and "stop" to shutdown the server. But then it got stuck on "Saving chunks for level 'world'/Overworld".

So I tried again but this time with 32GB of memory but this had the same problem. Memory usage just ticked up until there was no more memory available. Again, I canceled the fill, performed a "save-all" which completed instantly, and tried to stop the server but it hung on saving chunks again.

First of all, where is the memory going? And who isn't freeing it? I have ONLY WorldBorder and LagMeter loaded with no other plugins. Secondly, why is it hanging when the server stops? Are chunks not being written to disk by WorldBorder? Why did save-all work OK but the server still had chunks to save?

While I waited for the server to stop by itself, I examined the world's region folder. No new files were being written but the existing files were changing. But it wasn't just each file being touched once; it was often the SAME files being touched again and again. For example, I could filter by modification date, click on a file and watch it scroll away, and then watch it scroll past again as it is repeatedly modified.

Here is a screenshot of what I am describing:

https://www.youtube.com/watch?v=U0PRyGh9o2o

Is this a WorldBorder problem or a bug with Spigot's chunk generation?

Store the "bypass list" in a separate file

The list of players who can bypass a world's border is currently stored in WorldBorder's singular config.yml file. I suggest moving that list into a separate file so that the rest of the config can be managed separately with a tool like Ansible.

For context, the network I work on uses Ansible to generate and push config files to several servers, but the list of players who can bypass the world border is managed with WorldBorder's in-game commands. Separating the list of players from the config would allow the config file (which doesn't change very often) to be managed by Ansible while continuing to manage the bypass list in-game.

Feature: Set default border

Set a default border that is automatically created around the spawn point of each world.

This is especially useful for mods that generate can generate infinite new worlds, such as Galacticraft (space stations) or Mystcraft.

[Feature Request]

Dimension name wildcards so all dimensions starting with DIM have a set border size and any new dimensions also adhere to that border size as well.

[Feature] Multiple borders/limited bypass

It is useful to be able to define multiple borders on a world with permission nodes to bypass them individually. Or possibly just a permission node such as worldborder.bypass.5000 to be able to walk 5000 beyond the border. The use-case is for different groups to be able to explore further out on the map, not to replace worldguard or have different overlapping regions.

Also requested here: http://dev.bukkit.org/bukkit-plugins/worldborder/tickets/67-multiple-borders-per-world/

/fill memory leak?

at the begining there is 1.5 GB of free memory, but WB uses more and more RAM so after few hours, it stops filling due to low memory.... there is not any player or plugin except WB..

Low mem, doesn't restart

I'm running on a hosted server, with a memory limit of 386MB. WB pauses because it gets below the 200MB threshold, and then doesn't restart unless I restart the server because it never gets back up to the 500MB required to unpause. Is there a way to change the memory limits?

Any plans for a Sponge Port?

Sponge has a severe lack of world border plugins, so I was wondering if you'd be willing to port this plugin to sponge. If you need any assistance with that I'd be willing to contribute.

Percentage fail

Sometimes when filling worlds, percentage goes way over 100%

Example: [INFO] [WorldBorder] [Fill] 642 more map chunks processed (29823 total, §a133.4%§f)§6 (free mem: 800 MB)

Bad performance on teleports to extreme y-values

Teleporting outside a set WorldBorder (without bypass permissions) can cause the server to hang for a long period of time (potentially multiple minutes) if and only if the target location's Y coordinates are either extremely large or extremely small (I have not tested the latter, but it'll most likely suffer from the same issue).

How to reproduce:

  • set a WorldBorder of a reasonably small size
  • use the command /tp 9999999999999999 999999999999999 99999999999999
  • server (most likely) freezes (for a couple Minutes)

Why does it happen:
The Method BorderData.getSafeY, especially the

Expanding Y search method adapted from Acru's code in the Nether plugin

is not built to handle extreme Y-values correctly and causes huge performance issues because of this.

How to solve (suggestion, pull request):

  • make some checks for extreme Y-values and adjust them if neccessary before using the algorithm mentioned above
  • avoid using the algorithm if we don't have to (player is flying and teleporting above the non-nether world)
  • make absoluetely sure that the Y-value entering the algorithm will not cause invalid Y values in the getBlockTypeIdAt Method-calls (they get called for y, y+1 and in some cases y-1 in the isSafeSpot Method used by the algorithm)
  • further improve performance by making use of the getHighestBlockYAt Method that Bukkit provides instead of relying only on maximum world height alone

API: GetWorldBorder don't work with new worlds

Hello!

If I create a new world while the server is running and try to get the BorderData of that new world with the method GetWorldBorder(worldName) then the result is null.

Suggested result: If a world is not registered in the WorldBorder config and I execute the method GetWorldBorder then it will create the needed entries (if the world exists) so I can set borders on new worlds without reload the whole server via bukkit.

Best Regards,
neo

Log progress of fill jobs? or at least their completion?

Hi Mate,

Im developing an automated world creator via PHP, that talks to minecraft.

Is there any way you can check the progress of a fill job ? or perhaps have a log entry created when fill = 100%?

I really hope you can help me, world limiting is important when this tool is designed to create a dozen or so worlds for you... :)

See https://github.com/OneDayStudios/WorldEngine or https://github.com/OneDayStudios/WorldEngine/blob/master/plugins/worldborder.php directly.

I just want to say great work on the plugin :)

Insane lag/crashing/issues while filling in 1.11

WorldBorder crashing players online while filling in 1.11
Happens after a while online, client error is simply "null" ... server console showing no errors.

Happens if you're in the world you are filling or if you're not. Same thing.

Update:
Yup fill task is causing some insane lag.
This is with Nobody online what so ever, generating a normal world (not nether or end) http://i.imgur.com/S6wTWnd.png

[Improvement] Map pre-population

I've used the map-creation tool WorldPainter to create a custom-map. It pre-generates the chunks, whilst leaving the population to minecraft itself.

From the WorldPainter Wiki

When Minecraft generates land, it does so in two steps:

In step one, it calculates the biomes according to its own world generating algorithm and then generates the actual land mass, surface terrain (grass, sand, etc.), river or ocean water and caves. Since WorldPainter pre-generates the chunks, Minecraft never performs this step for those chunks.

In step two, the "populate" step, Minecraft adds underground resources (ores, lava and water lakes), creates the vegetation (trees, tall grass, mushrooms, flowers, lily pads, etc.), small lava and water lakes on the surface and structures (abandoned mines, NPC villages, strongholds, dungeons and desert and jungle temples). It does this according to the biome settings stored in the chunk. This second step can be performed by Minecraft on chunks generated by WorldPainter, because there is a flag for each chunk in the map data telling Minecraft whether that chunk has been populated yet.

As this map is rather large (30k by 30k) i'd love to be able to pre-populate it, as the population phase can still induce a significant strain on the server with mods installed.
I've tried to use the "force" method of filling to populate, it seems to have no affect whatsoever (i re-ran the dynmap render to see).

I hope you can add support for pre-population :)

Custom worlds with custom DIM IDs

Would it be possible for you guys to support custom worlds like Twilight Forest since it has the folder name DIM7 and not 1 or -1?

Example 1: /wb worldname DIMxy fill
Example 2: Let the plugin search through the world folder for folders starting with "DIM"

I just added some lines of code by myself to get it working on my server so there is no rush.

Feature request: world name in task completed message in logs?

Hi Mate,

Idiot here again... lol.

The task completed message doesnt show the world name - however the task started message does. Any chance of changing this?

It is possible to accurately get the completed message for the task started ... etc... but it requires additional coding and isnt flawless - i.e if a server stops half way through it will break.

Kind Regards,

Bysokar

1.7.9 spigot worldborder error

21.04 12:44:16 [Server] WARN [WorldBorder] Task #5 for WorldBorder v1.8.1 generated an exception
21.04 12:44:16 [Server] INFO java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
21.04 12:44:16 [Server] INFO at java.util.ArrayList.rangeCheck(ArrayList.java:653) ~[?:1.8.0_77]
21.04 12:44:16 [Server] INFO at java.util.ArrayList.set(ArrayList.java:444) ~[?:1.8.0_77]
21.04 12:44:16 [Server] INFO at net.minecraft.server.v1_7_R4.RegionFile.(RegionFile.java:66) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
21.04 12:44:16 [Server] INFO at net.minecraft.server.v1_7_R4.RegionFileCache.a(RegionFileCache.java:31) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
21.04 12:44:16 [Server] INFO at net.minecraft.server.v1_7_R4.ChunkRegionLoader.chunkExists(ChunkRegionLoader.java:41) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
21.04 12:44:16 [Server] INFO at net.minecraft.server.v1_7_R4.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:115) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
21.04 12:44:16 [Server] INFO at net.minecraft.server.v1_7_R4.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:102) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
21.04 12:44:16 [Server] INFO at org.bukkit.craftbukkit.v1_7_R4.CraftWorld.loadChunk(CraftWorld.java:248) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
21.04 12:44:16 [Server] INFO at com.wimbli.WorldBorder.WorldFillTask.run(WorldFillTask.java:198) ~[?:?]
21.04 12:44:16 [Server] INFO at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
21.04 12:44:16 [Server] INFO at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
21.04 12:44:16 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:641) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
21.04 12:44:16 [Server] INFO at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:289) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
21.04 12:44:16 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
21.04 12:44:16 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
21.04 12:44:16 [Server] INFO at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]

Everytime the world fill reaches 55-58% complete this error happens and it stops, restarting server starts the fill from 30-40% again.

Fill command causing exceptions

Using the newest BukkitForge build:

2013-02-11 00:26:11 [WARNUNG] [BukkitForge] Task #11 for WorldBorder v1.6.1 gene
rated an exception
java.lang.NullPointerException
        at org.bukkit.craftbukkit.CraftWorld.isChunkInUse(CraftWorld.java:367)
        at org.bukkit.craftbukkit.CraftWorld.unloadChunkRequest(CraftWorld.java:
295)
        at org.bukkit.craftbukkit.CraftWorld.unloadChunkRequest(CraftWorld.java:
291)
        at com.wimbli.WorldBorder.WorldFillTask.run(WorldFillTask.java:205)
        at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:52)
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(C
raftScheduler.java:346)
        at keepcalm.mods.bukkit.forgeHandler.SchedulerTickHandler.tickStart(Sche
dulerTickHandler.java:38)
        at cpw.mods.fml.common.SingleIntervalHandler.tickStart(SingleIntervalHan
dler.java:16)
        at cpw.mods.fml.common.FMLCommonHandler.tickStart(FMLCommonHandler.java:
119)
        at cpw.mods.fml.common.FMLCommonHandler.onPreServerTick(FMLCommonHandler
.java:287)
        at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:588)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:497)
        at fy.run(SourceFile:849)

Possible to fix that? Or do I have to ask the BukkitForge developers?

Maven

Out of curiosity, do you have the maven dependency details and a repo to hook into your plugin?

[FEATURE REQUEST] The ability to make a shifting world border.

Would it be possible to make a world border that automatically shifts a few blocks every once in a while? (Also would it be possible to have the option to display the word boarder as a wall or line of red wool blocks, so that people in game know where it is without having to look at the map.)

[FEATURE REQUEST] Hide border "spill" in dynmap, no 'Trim'

I'm not sure if this question has been asked before, but I thought I might ask anyway.

I am currently in the process of making a custom map for my server with WorldPainter. It is a large map, and the design of the map is such that it wraps around, so if the wrap setting in worldborder is set to on, the player can travel in "circles" around the world, as though it were a globe and not a simple flat terrain.

However, my problem occurs in making the travel feel seamless. I will have to duplicate some of the terrain on the edges of the map, so as the player is coming to the border, what they see beyond it is the other side of the map. But I DO NOT want Dynmap to show the repeated areas, only the area inside the border. I worry that if I use the trim option with worldborder, it will completely delete the custom terrain and the experience will be choppy. Is there a way to have Dynmap display ONLY the map within the border, without using the trim option so the outter chunks are still loaded?

'Trim' task generating an exception

[WARNING] Task of 'WorldBorder' generated an exception
java.lang.NullPointerException
at org.bukkit.craftbukkit.CraftWorld.preserveChunk(CraftWorld.java:60)
at org.bukkit.craftbukkit.CraftWorld.unloadChunk(CraftWorld.java:167)
at com.wimbli.WorldBorder.WorldTrimTask.unloadChunks(WorldTrimTask.java:268)
at com.wimbli.WorldBorder.WorldTrimTask.run(WorldTrimTask.java:157)
at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:487)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:419)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)


[INFO] Plugins: CommandHelper, HeroicDeath, HeroSpawn, iConomy, MobDisguise, NoCheat, NoFarm, OpenInv, PermissionsEx, PluginList, pvparena, QuickSign, Spout, WorldEdit, WorldGuard, ChatManager, CommandBook, Modifyworld, Permissions, ChestShop, CreativeGates, Factions, Register, VanishNoPacket, WorldBorder

Not sure what's going on.


UPDATE:

I tried to use CB1337 that it was built against just to trim and I'm still getting errors. Maybe it's because the world was generated with 1.0.0?

I can post that log too if you need. But its the exact same error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.