Finding the current world

Discussion in 'Plugin Development' started by SmilingDevil, Jun 6, 2011.

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


    I'm currently trying to spawn a player, with Human skin that doesn't show up on the online list.
    I was told this would work
    spawnCreature(loc, MonsterType.MONSTER);
    However it's not. Is there any way to make this work?
    Jayjay110 likes this.
  2. Offline


    [world variable] = Bukkit.getServer().getWorld();

    This is a static method and should work absolutely anywhere in a plugin, as is. You might even be able to go directly to Bukkit.getWorld(), but i've never tried it.
  3. Offline


    What's MonsterType? I only know CreatureType.
  4. Offline


    thats more or less the same problem that i have, if you use more than one world,
    .getServer().getWorlds(); will return only the one world that is in the server.prop
    .getServer().getWorld(String worldName); would require that getWorlds() will return more than one world

    .getWorld() is only avaible to chunks,blocks,entities,location
    you can apply it also to the main-class (this.getSer...) or a main-class instance

    it would help to construct a World variable like a location is (world, int ,int ,int)
Thread Status:
Not open for further replies.

Share This Page