mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-09 09:16:34 +00:00
Begin work on user defined Biomes and BiomeGrids
This commit is contained in:
@@ -1,11 +1,20 @@
|
||||
package com.dfsek.terra;
|
||||
|
||||
import com.dfsek.terra.config.WorldConfig;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.generator.ChunkGenerator;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class Terra extends JavaPlugin {
|
||||
private static FileConfiguration config;
|
||||
private static Terra instance;
|
||||
|
||||
public static Terra getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
super.onDisable();
|
||||
@@ -14,10 +23,18 @@ public class Terra extends JavaPlugin {
|
||||
@Override
|
||||
public void onEnable() {
|
||||
super.onEnable();
|
||||
saveDefaultConfig();
|
||||
config = getConfig();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static FileConfiguration getConfigFile() {
|
||||
return config;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable ChunkGenerator getDefaultWorldGenerator(@NotNull String worldName, @Nullable String id) {
|
||||
new WorldConfig(worldName, this);
|
||||
return new TerraChunkGenerator();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user