base for cobblestone generator and levels
This commit is contained in:
parent
f65dbef7e2
commit
6cc92b4a36
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.alttd.cometskyblock.configuration;
|
||||||
|
|
||||||
|
import com.alttd.cometskyblock.island.CobblestoneGeneratorLevel;
|
||||||
|
import lombok.Getter;
|
||||||
|
import org.spongepowered.configurate.objectmapping.ConfigSerializable;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@ConfigSerializable
|
||||||
|
@SuppressWarnings({"CanBeFinal", "FieldMayBeFinal"})
|
||||||
|
public class CobblestoneGeneratorConfiguration implements Configuration {
|
||||||
|
|
||||||
|
private List<CobblestoneGeneratorLevel> levels = new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.alttd.cometskyblock.island;
|
||||||
|
|
||||||
|
import com.alttd.cometskyblock.CometSkyBlockPlugin;
|
||||||
|
import com.alttd.cometskyblock.configuration.CobblestoneGeneratorConfiguration;
|
||||||
|
import com.alttd.cometskyblock.configuration.ConfigurationContainer;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public class CobblestoneGenerator {
|
||||||
|
|
||||||
|
private ConfigurationContainer<CobblestoneGeneratorConfiguration> cobblestoneGeneratorConfiguration;
|
||||||
|
|
||||||
|
public CobblestoneGenerator(CometSkyBlockPlugin plugin) {
|
||||||
|
cobblestoneGeneratorConfiguration = ConfigurationContainer.load(plugin.getSLF4JLogger(), plugin.getDataFolder().toPath(), CobblestoneGeneratorConfiguration.class, "coblestonegenerator");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.alttd.cometskyblock.island;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.spongepowered.configurate.objectmapping.ConfigSerializable;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@ConfigSerializable
|
||||||
|
public class CobblestoneGeneratorLevel {
|
||||||
|
|
||||||
|
private int level;
|
||||||
|
private int islandLevel;
|
||||||
|
private Material type;
|
||||||
|
private double chance;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "CobblestoneGeneratorLevel:" +
|
||||||
|
" level: " + level +
|
||||||
|
" islandLevel: " + islandLevel +
|
||||||
|
" type: " + type.toString() +
|
||||||
|
" chane: " + chance;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user