Different ways to call the world?

Discussion in 'Plugin Development' started by Hohahihehu, Jan 23, 2011.

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

    Hohahihehu

    I'm trying to find a way to call up the world from a class without a previously declared block to call it from. For example, in my BlockListener I call up the world via

    Code:
    Block block = event.getBlockPlaced();
    World world = block.getWorld();
    But that isn't an option for my other class. What other ways can you get it to call up the world if you have no block or entities?
     
  2. Offline

    Afforess

    I saved the server variable when the plugin is constructed:
    http://pastebin.com/mvFaWx22

    and then you can reference MinecartManiaCore.server.getWorlds()[0].doStuff
     
Thread Status:
Not open for further replies.

Share This Page