Custom UHC

Discussion in 'Plugin Development' started by BrennyMullan, Mar 12, 2015.

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

    BrennyMullan

    I have seen a few UHC plugins out there such as UHC Reloaded which look pretty cool. I am a Developer and own a Hub Network, i want to open a UHC server on my hub which would have a lobby and a few signs each leading to a small separate server on my dedicated machine. Each of these servers would have the UHC plugin on it of course.

    Theoretically could i create my own UHC plugin that at the end of the game would delete the world, restart the server, new world is put in, create the 1k border, /wb fill the border and ready for the next game within say 10 minutes?
     
  2. Offline

    ElliottOlson

    Yes. You could easily create a plugin that does those functions at the end of the game and when the server starts up.
     
  3. Offline

    Konato_K

    @BrennyMullan If you meant restart and create the world under 10 minutes yes

    If you meant create the plugin under 10 minutes then I don't think so.
     
  4. Offline

    BrennyMullan

    Yeah i mean restart the server, get a new world, generate the border, fill in the border with worldborders generation tool
     
  5. Offline

    Kilorbine

    It's easy but you will have to think a little!

    Because i've just do it I will give you some advice :
    *You can delete a world, but only if it's not your default world.
    *You can really easilly create a world.

    So, what i've done : On login Player arrive on /world

    I have worlds :
    • /world /world_nether -> these are the default
    • /uhc /uhc_nether -> these are the world player will play in.

    So bassicly, when i launch my game, I tp player to /uhc

    Be carefull, you will have to catch
    Code:
    public void onPortalTeleporte(PlayerPortalEvent e)
    to redirect player into the /uhc_nether & /uhc when they pass nether portql

    When your game is over:
    • tp Player in /world
    • unload /uhc && /uhc_nether
    • delete /uhc && /uhc_nether
    • recreate them B
      Code:
      Bukkit.getServer().createWorld(WorldCreator creator);
    • tp player to /uhc

    In these wqy, you regenate a world without having to disconect yourserver

    I hope it will help you :)
     
  6. Offline

    Konato_K

    @Kilorbine It's possible to delete the first world if your plugin loads on Startup
     
  7. Offline

    BrennyMullan

    @Kilorbine How do you generate your map? like load the chunks before the game?, i was thinking to have it auto run the command for worldborders /wb set and /wb fill
     
  8. Offline

    Regablith

    Look into using Multiverse
     
  9. Offline

    Kilorbine

    for now, I don't.
    It is generate when the player are teleported on their drop point

    @Regablith : yeah, kind like that. It is a multiverse like made by myself ^^
     
Thread Status:
Not open for further replies.

Share This Page