Generate flat world on startup

This commit is contained in:
kaboom 2021-10-23 03:51:21 +03:00
parent 5e12d92010
commit 972b7a7456

View file

@ -3,6 +3,8 @@ package pw.kaboom.extras;
import java.util.Collections; import java.util.Collections;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.WorldCreator;
import org.bukkit.WorldType;
import org.bukkit.block.BlockFace; import org.bukkit.block.BlockFace;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
@ -100,6 +102,9 @@ public final class Main extends JavaPlugin {
this.getServer().getPluginManager().registerEvents(new ServerCommand(), this); this.getServer().getPluginManager().registerEvents(new ServerCommand(), this);
this.getServer().getPluginManager().registerEvents(new ServerTabComplete(), this); this.getServer().getPluginManager().registerEvents(new ServerTabComplete(), this);
this.getServer().getPluginManager().registerEvents(new ServerTick(), this); this.getServer().getPluginManager().registerEvents(new ServerTick(), this);
/* Custom worlds */
this.getServer().createWorld(new WorldCreator("world_flatlands").type(WorldType.FLAT));
} }
@Override @Override