Solved Loading all environments of a world

Discussion in 'Plugin Development' started by ionre, Mar 16, 2014.

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

    ionre

    Hello everybody,

    After trying to solve this problem for almost 2 hours I decided to ask here...

    Basically, I have a server that I'm developing plugins for. I have set up different worlds with my own plugins, as I'm still learning and therefore decided not to use multiverse or anything similar. I have a normal "world" with "world_nether" and "world_the_end" and I have another world with a different name. I want to have a nether and end for it as well, however I'm to dumb to load them properly. What I've tried so far:

    (The worldPrefix is a string before the world name to identify this world as a world fro mthis plugin, if that makes any sense)
    Code:java
    1.  
    2. getServer().createWorld(
    3. new WorldCreator(worldPrefix + "world").environment(Environment.NORMAL));
    4. getServer().createWorld(
    5. new WorldCreator(worldPrefix + "world").environment(Environment.NETHER));
    6. getServer().createWorld(
    7. new WorldCreator(worldPrefix + "world").environment(Environment.THE_END));
    8.  

    and
    Code:java
    1.  
    2. getServer().createWorld(
    3. new WorldCreator(worldPrefix + "world").environment(Environment.NORMAL));
    4. getServer().createWorld(
    5. new WorldCreator(worldPrefix + "world_nether").environment(Environment.NETHER));
    6. getServer().createWorld(
    7. new WorldCreator(worldPrefix + "world_the_end").environment(Environment.THE_END));
    8.  

    and a few other things.
    I can load the normal, nether, and end individually, however I wan't them al to be loaded at the same time.

    QUESTION:
    How do I load ALL dimesions of a custom world at the same time (I'm using my own plugin, not multiverse etc) so nether and end portals work?
     
  2. Offline

    xTrollxDudex

    ionre
    I suggest looking at the a method for String, String, long, WorldType, String in MinecraftServer, that's the method that generates the worlds on startup.
     
  3. Offline

    ionre

  4. Offline

    xTrollxDudex

  5. Offline

    ionre

    xTrollxDudex
    Thanks for your suport, but I'm either blind or stupid... I cant find any 'a' method with these arguments in the MinecraftServer, neither in
    Code:
    MinecraftServer.getServer.a(...);

    nor in
    Code:
    MinecraftServer.a(...);

    EDIT:
    I did some more research and found this plugin:
    PortalLink (gitHub)
    However the github page is closed... Does anyone know how this plugin works? I know I could simply install it and so on, but I'm still learning and curious how to fix this issue

    Found it, updated the link. It basically checks if the PlayerPortalEvent returns null, and if so, it loads the [worldname]_nether and then teleports the player to that world. I guess bukkit doesn't automatically check what the nether for a custom world is...
    CAN WE GET THIS FIXED?

    NOW MY NEW QUESTION:
    Is there another way to do this? ;)
     
  6. Offline

    xTrollxDudex

    ionre
    ._. Line 159, it's highlighted. That's the a(String, String, long, WorldType, String)
     
  7. Offline

    ionre

    I see it on github, but I cant use it in my plugin because eclipse tells my that this method doesn't exist for some reason...
     
  8. Offline

    ionre

    Alright, since noone is responding I'll count this as solved, because I now know what is casusing it and how to fix it
    --------------------------------------------------------------------------------------------------------------------
     
Thread Status:
Not open for further replies.

Share This Page