From 972b7a7456bbd07e7b19d911f36ba9bd1d80e3ed Mon Sep 17 00:00:00 2001 From: kaboom <58372747+kaboombot@users.noreply.github.com> Date: Sat, 23 Oct 2021 03:51:21 +0300 Subject: [PATCH] Generate flat world on startup --- src/main/java/pw/kaboom/extras/Main.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/pw/kaboom/extras/Main.java b/src/main/java/pw/kaboom/extras/Main.java index b5381dd..f25b77e 100644 --- a/src/main/java/pw/kaboom/extras/Main.java +++ b/src/main/java/pw/kaboom/extras/Main.java @@ -3,6 +3,8 @@ package pw.kaboom.extras; import java.util.Collections; import org.bukkit.Bukkit; +import org.bukkit.WorldCreator; +import org.bukkit.WorldType; import org.bukkit.block.BlockFace; 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 ServerTabComplete(), this); this.getServer().getPluginManager().registerEvents(new ServerTick(), this); + + /* Custom worlds */ + this.getServer().createWorld(new WorldCreator("world_flatlands").type(WorldType.FLAT)); } @Override