Inactive [ADMIN/FIX] ForeverALoad v1.1 - Keep your chunks forever a loaded [1.2.3-R0.1]

Discussion in 'Inactive/Unsupported Plugins' started by Piedo_bear, Jul 29, 2011.

     
  1. Offline

    Piedo_bear

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    ForeverALoad - Keep your chunks forever a loaded
    Version: v1.1
    Download
    [IMG]

    This plugin enables you to select individual chunks or entire areas and stop them from unloading. You can add, remove and check chunks, and also get information on how this may impact on your server.

    You use this, obviously, to keep chunks unloaded. This is useful for long redstone constructions, so the connection continues. Crops wont grow - see side note below.

    Side-note:
    Crops wont grow in loaded chunks, this is one thing I noticed with my testing. However, redstone charges DO carry over very long distances (it will be greater than the view-distance specified in the server.properties) but you need to make sure those chunks load first. This plugin stops chunks unloading, if you are in doubt use the logging mode and get the confirmation, I cancel the event of unloading quite accurately so if things aren't working it could be Bukkit, in-game mechanics or something else interfering - if not then its me XD

    Features:
    • Allow/Stop chunks from unloading
    • Check if a chunk can unload
    • Stats on how it may impact your server
    • Supports in-game adding or config based areas
    • Supports Permissions 3.x and SuperPerms (otherwise defaults to op)
    • Optionally load chunks into memory from the start
    Future features:

    • Suggestions?
    Configuration file:

    Code:
    Debug - tells you in console each time a chunk is prevented from unloading, or any errors encountered. Also tells you the percentage of loading rectangles on startup
    Rectangles - Used to stop areas unloading
        Use - If rectangles in config are being used to stop chunks unloading
        Quantity - Number of rectangles in use
        LoadFromStart - Loads defined rectangles from the start, if they are active
     
    Format of rectangles:
    rectangle0:
      world: world - world of the chunks
      points: -50,-50,50,50 - coords in the form of (x1,z1  x2,xz)
    
    Commands:
    (Note: will need ForeverALoad.usage in permissions or must have op status)

    /chunk - Tells you how many chunks you will have (at a maximum) remaining from unloading, and give stats about it

    /chunk add - Adds the chunk you're on to the Do-Not-Unload list

    /chunk remove - Removes the chunk from the list

    /chunk check - Checks whether the chunk can unload

    /chunk addRect - After you have defined two blocks with a bone(ID: 352) by left and right clicking this will add the rectangle of chunks to your config file for you. You must have Use rectangles set as true in the config.


    Instalation:

    1. Place ForeverALoad.jar into your plugins directory and start the server to generate the config.yml
    2. Go to the folder plugins/ForeverALoad and edit the config.yml to your needs (see above for an explanation) The config generates weird, be aware of putting the co-ord information in the right places!
    3. Restart the server for the new configuration to take effect!
    4. Go add chunks and enjoy!



    Changelog:

    Version 1.1
    • Updated config handling - BREAKS YOUR CONFIG - so you will need to regeneate and edit, sorry. You can probably copy, paste,edit for your rectangles though.
    • Added the option to load chunks from the start
    Version 1.02
    • Fixed a sneaky typo
    • Hopefully corrected a calculation for area.
    Version 1.01

    • Updated to RB 1337
    • Added specific support for PermissionsEx
    • Fixed a null pointer with items
    Version 1.0

    • Updated to RB 1317
    • Changed config for Bukkits new API - requires a newly generated config
    • Completely recoded and organised to be prettier
    • Debug mode should help narrow down issues better now
    Version 0.5

    • Removed auto-protect of chests/furnaces since wiping bug is fixed
    • Ditched over-complicated part of protecting specific blocks
    • Added /chunk addRect to add rectangles ingame, using a bone as the selection tool.
    • Updated config NOTE: no longer uses ' around numbers so change '50' to just 50
    • Added support for SuperPerms
    • Updated to 1240 at last :p
    Version 0.4

    • Fixed an issue where /permissions would list chunk data, my bad
    • Added an option to load chunks straight into memory from the start. WARNING: this may take a while depending on the amount of chunks, it will load, and if the chunk does not exist it will be generated, but this might end up without flowers etc. So just use this for areas that already exist, or use a pre-rendering plugin/program first.
    • Updated the calculation of ram being used, to match experimental data opposed to theoretical
    Version 0.3

    • /chunk check now includes rectangles
    • /chunk [add/remove/check] will also tell you the coordinates of that chunk
    • AutoChestProtect now includes furnaces
    Version 0.2

    • Added auto chest protection option in configuration, stop all chests being unloaded.
    Version 0.1

    • Initial release


    Please post bugs, suggestions or anything related here and I will get looking :)

    Also, please include as much detail as possible, CraftBukkit build, stack traces, other conditions that may cause things.
    NOTE: Requires Vault installed

    This post has been edited 24 times. It was last edited by Piedo_bear Mar 19, 2012.
    Lancezh likes this.
  2.  
  3. Offline

    Lancezh

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Sorry for the noobish question, does this fix work on regular SMP installations with no Bukkit stuff on them as well ?
    This little fix is the shiznut (meaning it is REALLY REALLY EPIC) by the way if i could get it to work with industrial / buildcraft, we were trying so many workarounds yet and nothing worked.

    This post has been edited 1 time. It was last edited by Lancezh Aug 15, 2011.
  4. Offline

    Lancezh

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Which is incompatible with IC and Buildcraft on the same server... shame. I cant believe noone made a mod yet (i cant find it at least) for the regular SMP, it is so obvious that this is preventing big machines from working.
  5. Offline

    Piedo_bear

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    The bug is built into vanilla minecraft, which will affect everything, sadly this plugin only works on craftbukkit, but the same concept could be applied to other things if the API exists, you just need somebody to make it.
  6. Offline

    Amonith

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Craftbukkit IS compatible with IC and Buildcraft through ModLoaderMP for Craftbukkit available here: http://www.minecraftforum.net/topic/382599-173-modloadermp-for-craftbukkit-and-canary/

    Read that thread carefully because you will need to install special, ported versions of BuildCraft or IC.

    Piedo_bear! I use your mod with BuildCraft and it works great!

    However, a way to define rectangles in game would be great.
    Calculations are simple, yeah, but you can automate them through onPlayerInteract() in special circumstances, perhaps after issuing some command.

    Sorry for bad english.
  7. Offline

    Slash1987

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    just make the rectangle as made in WorldEdit, maybe look through theyr source to know how...
  8. Offline

    Raptor2213

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Aye, this would be a great addon - if you didn't have to add each and every chunk manually. If I want to select a chunk area with it, it doesn't want to do it right.

    For example. I use MineCartMania, but it will glitch occasionaly because it unloads the chunk the minecart is in, stopping the cart. If the minecart chunks were never unloaded, it would never be an issue. But programing the area seems ...difficult. Nothing I did seemed to make any sense (selection-wise).
  9. Offline

    1337phreak

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I hope this gets updated to 1060 soon!
  10. Offline

    gameswereus

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Hope you are back in time for 1.8
  11. Offline

    Arno00

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I added some chunk in the list to keep them loaded, but mushrooms won't spread on the "loaded" chunks ?

    It only spread if a player is there. I though it was the same thing :/

    Anyone knows ?
  12. Offline

    sfxworks

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Hi. My world is 1.59 gb. I would like to be able to load all of it. When I attempted to do so, the plugin disabled itself and stopped the world.

    I don't get it. I can already load my entire directory on my 8 gigs of ram via RAMDisk. So...how come...?
  13. Offline

    Insanehero

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Does this keep redstone circuits loaded also?
  14. Offline

    Piedo_bear

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    You can now select an area by left/right clicking with a bone (ID:352) then using /chunk addRect. This adds the area to your config file automatically and sets it into use, providing the Use flag for rectangles is set to true


    For some reason loaded chunks don't grow crops. However redstone charge still passes through these chunks, proof that they are in fact loaded. I have no idea why it needs players though, that stumped me.

    Redstone circuits will stay loaded. Its better to keep an area loaded bigger than the redstone circuitry, from my experience.
  15. Offline

    Fr0zenfr0g

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I have a 1gb world does it take 1gb to have the wole loaded or mush more?
    Does it work with nolagg or ptweaks?
  16. Offline

    Piedo_bear

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    A 1gb world would use 1gb of RAM to be fully loaded, maybe a bit more for mobs.
    I haven't tested with either of those plugins but I am sure that they'd cause issues since they both mess with chunk loading. However I'm not sure what the effect would be, it would be too lengthy to try test all the scenarios, so they only way to tell would be through general usage but backup first just in case.
  17. Offline

    Piedo_bear

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Updated for RB 1317 and fully re-coded, so its much more manageable.
  18. Offline

    communist_llama

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Throws errors: could not pass CHUNK_UNLOAD
    On CB 1328
  19. Offline

    Piedo_bear

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Tested and works fine for me. Are you using any other plugins which play around with chunk unloading? They might be conflicting. If you give me the StackTrace I might get a little more info.
  20. Offline

    communist_llama

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Wasn't playing nice with the version of Minecart mania I was using. All is well now. Thanks for the reply ^^
  21. Offline

    Brvtvs

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I may be missing something simple, but I don't get the installation of the plugin. The default config is rejected as unparsable... so I don't understand what I change to make the YAML parsable and still have the right configuration
  22. Offline

    Piedo_bear

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    What is your CB version, and your plugin version?
    You'll need CB1317 and version 1.0. If you had a version prior to 1.0 you will need to re-generate a brand new config file (Delete the entire directory if you want a fresh install - otherwise just the config file) The default generated file is:
    Code:
    Debug: 'false'
    Rectangles:
      Use: 'false'
      Quantity: '1'
    rectangle0:
      world: world
      points: -50,-50,50,50
    Also, make sure there are no tabs used, spaces only. If the problem persists post me the errors so I can try see whats going wrong.

    This post has been edited 1 time. It was last edited by Piedo_bear Oct 12, 2011.
  23. Offline

    Brvtvs

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    My problem must be that I am on 1240, because 1317 screws a lot of stuff up. I am looking forward to using this once my other plugins are updated, thanks.
  24. Offline

    Piedo_bear

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
  25. Offline

    rockxz2135

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Could not pass event PLAYER_INTERACT to ForeverALoad
  26. Offline

    Kane

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @Piedo_bear

    Code:
    03:35:34 [SEVERE] Could not pass event PLAYER_INTERACT to ForeverALoad
    java.lang.NullPointerException
            at com.bukkit.piedo_bear.foreveraload.ForeverALoad.hasPerms(ForeverALoad.java:181)
            at com.bukkit.piedo_bear.foreveraload.pListener.onPlayerInteract(pListener.java:25)
            at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:330)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:171)
            at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:95)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:497)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:43)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:477)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:380)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
  27. Offline

    Kane

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Anyone also notice @Piedo_bear checking this thread today :p
  28. Offline

    Piedo_bear

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Can you tell me a little more about the conditions which sets this error off? Its most likely related to permissions, so what permissions system are you using, did it happen when somebody had or didn't have the permissions for the plugin? Also, for good measure, whats the CB build?
  29. Offline

    Kane

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I'm using Pex that works with 99% of all plugins as it seems. I was using 1337 though I don't think anything in that should have broken since. The plugin does not seem to work at all also when I tried to edit the config and add the coords that way.

    Also the error popped up when I tried using bone.
  30. Offline

    Kane

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @Piedo_bear

    I am still getting the error with 1317. Seems like if I enter or leave the chunk that is suppose to stay open I get the following error:

    Code:
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    21:33:41 [SEVERE] Could not pass event PLAYER_INTERACT to ForeverALoad
    java.lang.NullPointerException
            at com.bukkit.piedo_bear.foreveraload.pListener.onPlayerInteract(pListener.java:22)
            at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:330)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:171)
            at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:95)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:497)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:43)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:477)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:380)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    21:33:41 [SEVERE] Could not pass event PLAYER_INTERACT to ForeverALoad
    java.lang.NullPointerException
            at com.bukkit.piedo_bear.foreveraload.pListener.onPlayerInteract(pListener.java:22)
            at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:330)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:171)
            at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:95)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:497)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:43)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:477)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:380)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    21:33:46 [SEVERE] Could not pass event PLAYER_INTERACT to ForeverALoad
    java.lang.NullPointerException
            at com.bukkit.piedo_bear.foreveraload.pListener.onPlayerInteract(pListener.java:22)
            at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:330)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:171)
            at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:95)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:497)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:43)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:477)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:380)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    21:33:46 [SEVERE] Could not pass event PLAYER_INTERACT to ForeverALoad
    java.lang.NullPointerException
            at com.bukkit.piedo_bear.foreveraload.pListener.onPlayerInteract(pListener.java:22)
            at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:330)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:171)
            at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:95)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:497)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:43)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:477)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:380)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
  31. Offline

    londark

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    we need a Update becaus we have errors like member before subscribed.
  32. Offline

    Piedo_bear

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I haven't been able to replicate the error. I think something might be interfering, perhaps I should make the tool configurable. The stack traces firstly implied it was something to do with permissions, then the second one happened when you tried to use fists to define corners, since the item was null.

    Try downloading 1.01 and see if its better, it's built against 1337, fixes a null pointer, and explicitly supports PermissionsEx. If it still persists, send me the stack trace and I'll see if I can figure it.

Share This Page