Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public World createWorld()
- {
- plugin.getServer().getPluginManager().registerEvents(this, plugin); // listen for events
- WorldCreator wc = new WorldCreator(Settings.killerWorldName).environment(Environment.NORMAL);
- World newWorld = wc.createWorld();
- HandlerList.unregisterAll(this); // stop listening for events
- return newWorld;
- }
- @EventHandler
- public void onWorldInit(WorldInitEvent e)
- {
- e.getWorld().getPopulators().add(new CustomPopulator());
- }
- public class CustomPopulator extends BlockPopulator
- {
- public void populate(World world, Random random, Chunk chunk)
- {
- chunk.getBlock(8, 72, 8).setType(Material.GLOWSTONE);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement