What Event to cancel?

Discussion in 'Plugin Development' started by Fl1pzta, Jul 15, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    Fl1pzta

    I'd like to stop my server from generating new chunks or the "snapshots" of chunks and I'm unsure what event I should be cancelling.

    EDIT: My reasoning for this is because I have a blank world file and I'd like to keep it that way, where it appears as a void, yet is still buildable instead of generating biomes and such.
     
  2. Offline

    Woobie

  3. Offline

    Minecrell

    You can't cancel that event.
     
  4. Offline

    adam753

  5. Offline

    Minecrell

    Woobie adam753
    Anyways, if you would cancel that event (you can't) you couldn't build in the world, because you can only build on loaded chunks...
     
  6. Offline

    Fl1pzta

    adam753 Minecrell Woobie But wouldn't that stop players from loading blocks in that chunk? I guess what I mean is I want to stop the generation of biomes and such through the seed, I'd like to keep it all blank, but i can still use world edit and players can build.

    Well can I change the first time a chunk is loaded to have nothing in it?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 3, 2016
  7. Offline

    Minecrell

    I don't know how to do that, but I think it should be possible to create a custom world generator (or something similar), that is generating a empty world. (empty chunks)
     
  8. Offline

    Woobie

    I don't think that's possible, because Bukkit loads the world before plugins. I could be wrong though.
     
  9. Offline

    adam753

    You should be able to to do that by listening to ChunkLoadEvent, checking if it's newly generated (there's a method for that in the documentation I was just looking at), and delete all the blocks if it is.
     
  10. Offline

    Fl1pzta

  11. Offline

    Minecrell

    Well you can load your plugin before the worlds if you add load: STARTUP to your plugin.yml. Not sure how that can help you with the problem though.
     
  12. Offline

    Bart

    Code:
    @EventHandler
        public void onChunkCreate(ChunkLoadEvent event)
        {
            if(event.isNewChunk()) {
                event.getChunk().unload(false);
            }
     
        }
    
    That will stop the server from creating new chunks.
     
Thread Status:
Not open for further replies.

Share This Page