This commit is contained in:
Daniel Mills 2020-08-08 19:14:12 -04:00
parent e777566339
commit e0714637ff
5 changed files with 22 additions and 8 deletions

View File

@ -11,9 +11,9 @@ import org.bukkit.GameMode;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Particle; import org.bukkit.Particle;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.World.Environment;
import org.bukkit.WorldCreator; import org.bukkit.WorldCreator;
import org.bukkit.WorldType; import org.bukkit.WorldType;
import org.bukkit.World.Environment;
import org.bukkit.block.Biome; import org.bukkit.block.Biome;
import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionEffectType;
import org.zeroturnaround.zip.ZipUtil; import org.zeroturnaround.zip.ZipUtil;
@ -678,6 +678,16 @@ public class ProjectManager
if(k.getType().equals(String.class)) if(k.getType().equals(String.class))
{ {
tp = "string"; tp = "string";
if(k.isAnnotationPresent(MinNumber.class))
{
prop.put("minLength", (int) k.getDeclaredAnnotation(MinNumber.class).value());
}
if(k.isAnnotationPresent(MaxNumber.class))
{
prop.put("maxLength", (int) k.getDeclaredAnnotation(MaxNumber.class).value());
}
} }
if(k.getType().equals(String.class)) if(k.getType().equals(String.class))

View File

@ -28,6 +28,7 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
public class IrisBiome extends IrisRegistrant implements IRare public class IrisBiome extends IrisRegistrant implements IRare
{ {
@MinNumber(2)
@Required @Required
@DontObfuscate @DontObfuscate
@Desc("This is the human readable name for this biome. This can and should be different than the file name. This is not used for loading biomes in other objects.") @Desc("This is the human readable name for this biome. This can and should be different than the file name. This is not used for loading biomes in other objects.")

View File

@ -34,6 +34,7 @@ public class IrisDimension extends IrisRegistrant
public static final BlockData STONE = Material.STONE.createBlockData(); public static final BlockData STONE = Material.STONE.createBlockData();
public static final BlockData WATER = Material.WATER.createBlockData(); public static final BlockData WATER = Material.WATER.createBlockData();
@MinNumber(2)
@Required @Required
@DontObfuscate @DontObfuscate
@Desc("The human readable name of this dimension") @Desc("The human readable name of this dimension")
@ -117,12 +118,12 @@ public class IrisDimension extends IrisRegistrant
@Desc("Use post processing or not") @Desc("Use post processing or not")
private boolean postProcessing = true; private boolean postProcessing = true;
@ArrayType(min=1,type=IrisPostProcessor.class) @ArrayType(min = 1, type = IrisPostProcessor.class)
@DontObfuscate @DontObfuscate
@Desc("Post Processors") @Desc("Post Processors")
private KList<IrisPostProcessor> postProcessors = getDefaultPostProcessors(); private KList<IrisPostProcessor> postProcessors = getDefaultPostProcessors();
@ArrayType(min=1,type=IrisCompatabilityFilter.class) @ArrayType(min = 1, type = IrisCompatabilityFilter.class)
@DontObfuscate @DontObfuscate
@Desc("Compatability filters") @Desc("Compatability filters")
private KList<IrisCompatabilityFilter> compatability = getDefaultCompatability(); private KList<IrisCompatabilityFilter> compatability = getDefaultCompatability();
@ -141,7 +142,7 @@ public class IrisDimension extends IrisRegistrant
private Environment environment = Environment.NORMAL; private Environment environment = Environment.NORMAL;
@Required @Required
@ArrayType(min=1,type=String.class) @ArrayType(min = 1, type = String.class)
@DontObfuscate @DontObfuscate
@Desc("Define all of the regions to include in this dimension. Dimensions -> Regions -> Biomes -> Objects etc") @Desc("Define all of the regions to include in this dimension. Dimensions -> Regions -> Biomes -> Objects etc")
private KList<String> regions = new KList<>(); private KList<String> regions = new KList<>();
@ -231,7 +232,7 @@ public class IrisDimension extends IrisRegistrant
@Desc("Prevent Leaf decay as if placed in creative mode") @Desc("Prevent Leaf decay as if placed in creative mode")
private boolean preventLeafDecay = false; private boolean preventLeafDecay = false;
@ArrayType(min=1,type=IrisDepositGenerator.class) @ArrayType(min = 1, type = IrisDepositGenerator.class)
@DontObfuscate @DontObfuscate
@Desc("Define global deposit generators") @Desc("Define global deposit generators")
private KList<IrisDepositGenerator> deposits = new KList<>(); private KList<IrisDepositGenerator> deposits = new KList<>();
@ -246,17 +247,17 @@ public class IrisDimension extends IrisRegistrant
@Desc("The rock zoom mostly for zooming in on a wispy palette") @Desc("The rock zoom mostly for zooming in on a wispy palette")
private double rockZoom = 5; private double rockZoom = 5;
@ArrayType(min=1,type=String.class) @ArrayType(min = 1, type = String.class)
@DontObfuscate @DontObfuscate
@Desc("The palette of blocks for 'stone'") @Desc("The palette of blocks for 'stone'")
private KList<String> rockPalette = new KList<String>().qadd("STONE"); private KList<String> rockPalette = new KList<String>().qadd("STONE");
@ArrayType(min=1,type=String.class) @ArrayType(min = 1, type = String.class)
@DontObfuscate @DontObfuscate
@Desc("The palette of blocks for 'water'") @Desc("The palette of blocks for 'water'")
private KList<String> fluidPalette = new KList<String>().qadd("WATER"); private KList<String> fluidPalette = new KList<String>().qadd("WATER");
@ArrayType(min=1,type=IrisBiomeMutation.class) @ArrayType(min = 1, type = IrisBiomeMutation.class)
@DontObfuscate @DontObfuscate
@Desc("Define biome mutations for this dimension") @Desc("Define biome mutations for this dimension")
private KList<IrisBiomeMutation> mutations = new KList<>(); private KList<IrisBiomeMutation> mutations = new KList<>();

View File

@ -24,6 +24,7 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
public class IrisRegion extends IrisRegistrant implements IRare public class IrisRegion extends IrisRegistrant implements IRare
{ {
@MinNumber(2)
@Required @Required
@DontObfuscate @DontObfuscate
@Desc("The name of the region") @Desc("The name of the region")

View File

@ -21,6 +21,7 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
public class IrisStructure extends IrisRegistrant public class IrisStructure extends IrisRegistrant
{ {
@MinNumber(2)
@Required @Required
@DontObfuscate @DontObfuscate
@Desc("This is the human readable name for this structure. Such as Red Dungeon or Tropical Village.") @Desc("This is the human readable name for this structure. Such as Red Dungeon or Tropical Village.")