Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
d180e5f
Update to 7.0
JadeTheGecko Jun 16, 2015
c6f5ee9
Update to 7.0
JadeTheGecko Jun 16, 2015
861efae
1.9 Update
JadeTheGecko Mar 7, 2016
191ebf6
1.9 giants update
JadeTheGecko Jun 6, 2016
55c58c6
Add spigot to repos
JadeTheGecko Jun 6, 2016
d23efd6
Update to parent pom
JadeTheGecko Jun 6, 2016
5b4f027
Adding craftbukkit to pom dependencies
JadeTheGecko Jun 6, 2016
6714e1a
Removed duplicate tag
JadeTheGecko Jun 6, 2016
4644c93
REmoving unused files
JadeTheGecko Jun 6, 2016
5406703
Pushing NMS modules into 2.0 with the addition of better mobility
JadeTheGecko Jun 8, 2016
121c06e
Updating filehandler to fix file generation glitch
JadeTheGecko Jun 8, 2016
d083dc9
Pushing poms to use filehandler 1.1-SNAPSHOT
JadeTheGecko Jun 8, 2016
1120d66
Update for 1.9.4
JadeTheGecko Jun 8, 2016
20c7109
Update to poms
JadeTheGecko Jun 8, 2016
d260e47
Renaming poms
JadeTheGecko Jun 8, 2016
d28cfe3
Giants update for 1.10
JadeTheGecko Jun 9, 2016
9a5f219
Fix poms to correctly compile
JadeTheGecko Jun 9, 2016
88d7c8c
Rename 1_9_R2 pom
JadeTheGecko Jun 9, 2016
f7b155d
One last time attempt to fix poms
JadeTheGecko Jun 9, 2016
539892a
Update poms
JadeTheGecko Jun 12, 2016
a9b87d8
Update .gitignore
JadeTheGecko Jun 12, 2016
0fcec04
Update pom.xml
JadeTheGecko Jun 12, 2016
14d07d8
renaming file module and plugin module
JadeTheGecko Jun 12, 2016
e5a80af
Rewriting armour enchantments system
JadeTheGecko Jun 12, 2016
e2b3d93
Fix for nms issue effecting versions 1.9+
JadeTheGecko Jun 25, 2016
6056e99
Fix for compile issue
JadeTheGecko Jun 25, 2016
24cf257
Revert "Fix for compile issue"
JadeTheGecko Oct 23, 2016
e3d4139
Revert "Revert "Fix for compile issue""
Nov 19, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ tmp/
.classpath
.settings/
.loadpath
target/
Giants/target/
v1_7_R3/target/
v1_7_R4/target/
v1_8_R1/target/
v1_8_R2/target/

# External tool builders
.externalToolBuilders/
Expand Down Expand Up @@ -224,3 +230,9 @@ pip-log.txt

#Mr Developer
.mr.developer.cfg
v1_10_R1/dependency-reduced-pom.xml
v1_9_R2/dependency-reduced-pom.xml
v1_9_R1/dependency-reduced-pom.xml
v1_8_R3/dependency-reduced-pom.xml
v1_8_R2/dependency-reduced-pom.xml
v1_8_R1/dependency-reduced-pom.xml
24 changes: 24 additions & 0 deletions files/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>me.Mammothskier</groupId>
<artifactId>Giants-Parent</artifactId>
<version>7.1.1-SNAPSHOT</version>
</parent>

<artifactId>Giants-Files</artifactId>
<version>1.1-SNAPSHOT</version>
<name>Giants Files</name>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.9.4-R0.1-SNAPSHOT</version>
<type>jar</type>
</dependency>
</dependencies>
</project>
229 changes: 229 additions & 0 deletions files/src/main/java/me/Mammothskier/Giants/Files/ConfigValues.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
package me.Mammothskier.Giants.Files;

import java.io.Serializable;
import java.util.Arrays;
import java.util.List;

import org.bukkit.Bukkit;
import org.bukkit.plugin.PluginDescriptionFile;

public enum ConfigValues {
/**
* value commons (any using ConfigValues(String key, String value) as a constructor should be here).
* These values will be put at the top of each file.
*/
fileVersion("Giants Configuration.File Version", loadVersion()),

/**
* These file values will go in the config.yml file.
*/
dependencies(Files.CONFIG, "Giants Configuration.Dependencies.BarAPI", FileSetup.checkDependencies("BarAPI")),
zombieBoolean(Files.CONFIG,"Giants Configuration.Entities.Giant Zombie", true),
slimeBoolean(Files.CONFIG, "Giants Configuration.Entities.Giant Slime", false),
lavaSlimeBoolean(Files.CONFIG, "Giants Configuration.Entities.Giant Lava Slime", false),
jockeyWarningBugs(Files.CONFIG, "Giants Configuration.Entities.Giant Jockey.Warning.Bugs", "This entity of Giants is extremely experimental and does not have many features. Bugs may be present."),
jockeyWarningFiles(Files.CONFIG, "Giants Configuration.Entities.Giant Jockey.Warning.Files", "Config files for this entity will NOT load unless enabled."),
jockeyBoolean(Files.CONFIG, "Giants Configuration.Entities.Giant Jockey.Warning.Enabled", false),
soundsBoolean(Files.CONFIG, "Giants Configuration.Sounds", true),
debugBoolean(Files.CONFIG, "Giants Configuration.Debug Mode.Enabled", false),
debugMessage(Files.CONFIG, "Giants Configuration.Debug Mode.Debug Message", "&2A {entity} has spawned at X:&F%X &2Y:&F%Y &2Z:&F%Z"),

/**
* These file values will go in the biome.yml file.
*/
biomeSwampland(Files.BIOMES,"Giants Configuration.Biome Settings.Swampland", FileSetup.loadEntities()),
biomeForest(Files.BIOMES, "Giants Configuration.Biome Settings.Forest", FileSetup.loadEntities()),
biomeTaiga(Files.BIOMES, "Giants Configuration.Biome Settings.Taiga", FileSetup.loadEntities()),
biomePlains(Files.BIOMES, "Giants Configuration.Biome Settings.Plains", FileSetup.loadEntities()),
biomeExtremeHills(Files.BIOMES, "Giants Configuration.Biome Settings.Extreme Hills", FileSetup.loadEntities()),
biomeMushroomIsland(Files.BIOMES, "Giants Configuration.Biome Settings.Mushroom Island", FileSetup.loadEntities()),
biomeDesert(Files.BIOMES, "Giants Configuration.Biome Settings.Desert", FileSetup.loadEntities()),
biomeJungle(Files.BIOMES, "Giants Configuration.Biome Settings.Jungle", FileSetup.loadEntities()),
biomeBirchForest(Files.BIOMES, "Giants Configuration.Biome Settings.Birch Forest", FileSetup.loadEntities()),
biomeSavanna(Files.BIOMES, "Giants Configuration.Biome Settings.Savanna", FileSetup.loadEntities()),
biomeRoofedForest(Files.BIOMES, "Giants Configuration.Biome Settings.Roofed Forest",FileSetup.loadEntities()),
biomeMesa(Files.BIOMES, "Giants Configuration.Biome Settings.Mesa",FileSetup.loadEntities()),
biomeSmallMountains(Files.BIOMES,"Giants Configuration.Biome Settings.Other.Small Mountains",FileSetup.loadEntities()),
biomeIceMountains(Files.BIOMES, "Giants Configuration.Biome Settings.Other.Ice Mountains",FileSetup.loadEntities()),
biomeOcean(Files.BIOMES, "Giants Configuration.Biome Settings.Other.Ocean", ""),
biomeRiver(Files.BIOMES, "Giants Configuration.Biome Settings.Other.River", ""),
biomeHell(Files.BIOMES,"Giants Configuration.Biome Settings.Other.Hell", "- Giant Lava Slime"),
biomeSky(Files.BIOMES, "Giants Configuration.Biome Settings.Other.Sky", ""),

/**
* These file values will go in the entities.yml file.
*/
//Worlds
zombieWorlds(Files.ENTITIES, "Entities Configuration.Spawn Settings.Worlds.Giant Zombie", FileSetup.loadWorlds()),
slimeWorlds(Files.ENTITIES, "Entities Configuration.Spawn Settings.Worlds.Giant Slime", FileSetup.loadWorlds()),
lavaslimeWorlds(Files.ENTITIES, "Entities Configuration.Spawn Settings.World.Giant Lava Slime", FileSetup.loadWorlds()),
//Spawn chance
zombieChance(Files.ENTITIES, "Entities Configuration.Spawn Settings.Chance.Giant Zombie", new Integer(10)),
slimeChance(Files.ENTITIES, "Entities Configuration.Spawn Settings.Chance.Giant Slime", new Integer(10)),
lavaSlimeChance(Files.ENTITIES, "Entities Configuration.Spawn Settings.Chance.Giant Lava Slime", new Integer(10)),
//Size
slimeSize(Files.ENTITIES, "Entities Configuration.Spawn Settings.Size.Giant Slime", new Integer(12)),
lavaSlimeSize(Files.ENTITIES, "Entities Configuration.Spawn Settings.Size.Giant Lava Slime", new Integer(12)),
//Speed
zombieSpeed(Files.ENTITIES, "Entities Configuration.Stats.Speed.Giant Zombie", new Integer(3)),
//Health
zombieHealth(Files.ENTITIES, "Entities Configuration.Stats.Health.Giant Zombie", new Integer(100)),
slimeHealth(Files.ENTITIES, "Entities Configuration.Stats.Health.Giant Slime", new Integer(100)),
lavaSlimeHealth(Files.ENTITIES, "Entities Configuration.Stats.Health.Giant Lava Slime", new Integer(100)),
//Experience
zombieExperience(Files.ENTITIES, "Entities Configuration.Stats.Experience.Giant Zombie", new Integer(5)),
slimeExperience(Files.ENTITIES, "Entities Configuration.Stats.Experience.Giant Slime", new Integer(5)),
lavaSlimeExperience(Files.ENTITIES, "Entities Configuration.Stats.Experience.Giant Lava Slime", new Integer(5)),
//Armour
zombieHelmet(Files.ENTITIES, "Entities Configuration.Stats.Equipped Armour.Giant Zombie.Helmet",
new String("diamond_helmet protection:1 unbreaking:1 aqua_affinity:1 projectile_protection:4 name:'Giant Helmet' dropRate:8.5")),
zombieChestPlate(Files.ENTITIES, "Entities Configuration.Stats.Equipped Armour.Giant Zombie.ChestPlate",
new String("diamond_chestplate protection:1 unbreaking:1 fire_protection:1 blast_protection:1 projectile_protection:4 name:'Giant ChestPlate' dropRate:8.5")),
zombieLeggings(Files.ENTITIES, "Entities Configuration.Stats.Equipped Armour.Giant Zombie.Leggings",
new String("diamond_leggings protection:1 unbreaking:1 fire_protection:1 blast_protection:1 projectile_protection:4 name:'Giant Leggings' dropRate:8.5")),
zombieBoots(Files.ENTITIES, "Entities Configuration.Stats.Equipped Armour.Giant Zombie.Boots",
new String("diamond_boots protection:1 unbreaking:1 fire_protection:1 blast_protection:1 projectile_protection:4 name:'Giant Boots' dropRate:8.5")),
zombieMainHand(Files.ENTITIES, "Entities Configuration.Stats.Equipped Armour.Giant Zombie.MainHand",
new String("diamond_sword sharpness:1 fire_aspect:1 unbreaking:1 knockback:1 smite:1 name:'Giant Sword' dropRate:8.5")),
//Drops
dropManager(Files.ENTITIES, "Entities Configuration.Stats.Drops.Enable Drop Manager", true),
zombieDrops(Files.ENTITIES, "Entities Configuration.Stats.Drops.Giant Zombie", Arrays.asList(FileSetup.loadDefaultDrop("Giant Zombie"))),
slimeDrops(Files.ENTITIES, "Entities Configuration.Stats.Drops.Giant Slime", Arrays.asList(FileSetup.loadDefaultDrop("Giant Slime"))),
lavaSlimeDrops(Files.ENTITIES, "Entities Configuration.Stats.Drops.Giant Lava Slime", Arrays.asList(FileSetup.loadDefaultDrop("Giant Lava Slime"))),
//BarAPI
zombieBarAPI(Files.ENTITIES, "Entities Configuration.Stats.BarAPI.Display Name.Giant Zombie", "&2Giant Zombie"),
slimeBarAPI(Files.ENTITIES, "Entities Configuration.Stats.BarAPI.Display Name.Giant Slime", "&2Giant Slime Size {size}"),
lavaSlimeBarAPI(Files.ENTITIES, "Entities Configuration.Stats.BarAPI.Display Name.Giant Lava Slime", "&2Giant Lava Slime Size {size}"),
//Damage
zombieArrowDamage(Files.ENTITIES, "Entities Configuration.Damage Settings.Arrows.Damage done by arrow.Giant Zombie", new Integer(10)),
slimeArrowDamage(Files.ENTITIES, "Entities Configuration.Damage Settings.Arrows.Damage done by arrow.Giant Slime", new Integer(10)),
lavaSlimeArrowDamage(Files.ENTITIES, "Entities Configuration.Damage Settings.Arrows.Damage done by arrow.Giant Lava Slime", new Integer(10)),
zombieAllowFireDamage(Files.ENTITIES, "Entities Configuration.Damage Settings.Fire.Allow Fire Damage.Giant Zombie", true),
slimeAllowFireDamage(Files.ENTITIES, "Entities Configuration.Damage Settings.Fire.Allow Fire Damage.Giant Slime", true),
zombieAllowSuffocation(Files.ENTITIES, "Entities Configuration.Damage Settings.Block Damage.Allow Suffocation.Giant Zombie",false),
slimeAllowSuffocation(Files.ENTITIES, "Entities Configuration.Damage Settings.Block Damage.Allow Suffocation.Giant Slime",false),
lavaSlimeAllowSuffocation(Files.ENTITIES, "Entities Configuration.Damage Settings.Block Damage.Allow Suffocation.Giant Lava Slime",false),
zombieAllowCactiDamage(Files.ENTITIES, "Entities Configuration.Damage Settings.Block Damage.Allow Cacti Damage.Giant Zombie", false),
slimeAllowCactiDamage(Files.ENTITIES, "Entities Configuration.Damage Settings.Block Damage.Allow Cacti Damage.Giant Slime", false),
lavaSlimeAllowCactiDamage(Files.ENTITIES, "Entities Configuration.Damage Settings.Block Damage.Allow Cacti Damage.Giant Lava Slime", false),
//Targets
zombieAggressiveToVillage(Files.ENTITIES, "Entities Configuration.Target Settings.Target Villagers", false),

/**
* These file values will go in attacks.yml
*/
lightningAttack(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Lightning Attack", FileSetup.loadEntities()),
stompAttack(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Stomp Attack.Enabled", FileSetup.loadEntities()),
stompAttackPower(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Stomp Attack.Explosion Power", new Integer(1)),
stompAttackFire(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Stomp Attack.Light Fire", FileSetup.loadEntities()),
lavaAttack(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Lava Attack", FileSetup.loadEntities()),
kickAttack(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Kick Attack.Enabled", FileSetup.loadEntities()),
kickAttackHeight(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Kick Attack.Kick Height", new Integer(1)),
fireAttack(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Fire Attack.Enabled", FileSetup.loadEntities()),
fireAttackTargetTicks(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Fire Attack.Ticks for Target", new Integer(100)),
fireAttackGiantTicks(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Fire Attack.Ticks for Giant", new Integer(100)),
boulderAttack(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Throw Boulder Attack.Enabled", FileSetup.loadEntities()),
bouldAttackBlockDamage(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Throw Boulder Attack.Block Damage", new Integer(1)),
shrapnelAttack(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Shrapnel Attack.Enabled", Arrays.asList("Giant Zombie")),
shrapnelAttackBabies(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Shrapnel Attack.Baby Zombies", false),
shrapnelAttackZombies(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Shrapnel Attack.Zombies to Spawn", new Integer(3)),
shrapnelAttackHealth(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Shrapnel Attack.Health", new Integer(20)),
zombiesOnDeath(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Spawn Zombies On Death.Enabled", false),
zombiesOnDeathBabies(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Spawn Zombies On Death.Baby Zombies", false),
zombiesOnDeathZombies(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Spawn Zombies On Death.Zombies to Spawn", new Integer(5)),
zombiesOnDeathHealth(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Spawn Zombies On Death.Health", new Integer(20)),
poisonAttack(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Poison Attack", FileSetup.loadEntities()),
poisonAttackLength(Files.ATTACKS, "Attacks Configuration.Attack Mechanisms.Poison Attack.length", "10.0"),

/**
* These file values will go in jockey.yml
*/
jockeyWarning(Files.JOCKEY, "Jockey Configuration", new String("This entity of Giants is extremely experimental and does not have many features")),
jockeyWorlds(Files.JOCKEY, "Jockey Configuration.Spawn Settings.Worlds", FileSetup.loadWorlds()),

/**
* The file values will go in jockey/biomes.yml
*/
jockeyBiomeSwampland(Files.JOCKEYBIOMES,"Giants Configuration.Biome Settings.Swampland", FileSetup.loadEntities()),
jockeyBiomeForest(Files.JOCKEYBIOMES, "Giants Configuration.Biome Settings.Forest", FileSetup.loadEntities()),
jockeyBiomeTaiga(Files.JOCKEYBIOMES, "Giants Configuration.Biome Settings.Taiga", FileSetup.loadEntities()),
jockeyBiomePlains(Files.JOCKEYBIOMES, "Giants Configuration.Biome Settings.Plains", FileSetup.loadEntities()),
jockeyBiomeExtremeHills(Files.JOCKEYBIOMES, "Giants Configuration.Biome Settings.Extreme Hills", FileSetup.loadEntities()),
jockeyBiomeMushroomIsland(Files.JOCKEYBIOMES, "Giants Configuration.Biome Settings.Mushroom Island", FileSetup.loadEntities()),
jockeyBiomeDesert(Files.JOCKEYBIOMES, "Giants Configuration.Biome Settings.Desert", FileSetup.loadEntities()),
jockeyBiomeJungle(Files.JOCKEYBIOMES, "Giants Configuration.Biome Settings.Jungle", FileSetup.loadEntities()),
jockeyBiomeBirchForest(Files.JOCKEYBIOMES, "Giants Configuration.Biome Settings.Birch Forest", FileSetup.loadEntities()),
jockeyBiomeSavanna(Files.JOCKEYBIOMES, "Giants Configuration.Biome Settings.Savanna", FileSetup.loadEntities()),
jockeyBiomeRoofedForest(Files.JOCKEYBIOMES, "Giants Configuration.Biome Settings.Roofed Forest",FileSetup.loadEntities()),
jockeyBiomeMesa(Files.JOCKEYBIOMES, "Giants Configuration.Biome Settings.Mesa",FileSetup.loadEntities()),
jockeyBiomeSmallMountains(Files.JOCKEYBIOMES,"Giants Configuration.Biome Settings.Other.Small Mountains",FileSetup.loadEntities()),
jockeyBiomeIceMountains(Files.JOCKEYBIOMES, "Giants Configuration.Biome Settings.Other.Ice Mountains",FileSetup.loadEntities()),
jockeyBiomeOcean(Files.JOCKEYBIOMES, "Giants Configuration.Biome Settings.Other.Ocean", ""),
jockeyBiomeRiver(Files.JOCKEYBIOMES, "Giants Configuration.Biome Settings.Other.River", ""),
jockeyBiomeHell(Files.JOCKEYBIOMES,"Giants Configuration.Biome Settings.Other.Hell", "- Giant Lava Slime"),
jockeyBiomeSky(Files.JOCKEYBIOMES, "Giants Configuration.Biome Settings.Other.Sky", ""),
;
private final String _key;
private final Files _files;
private final String _value;
private final List<String> _values;
private final boolean list;

private ConfigValues(Files file, String key, Serializable value) {
_files = file;
_key = key;
_value= value + "";
_values = null;
list = false;
}

private ConfigValues(String key, String value) {
_files = null;
_key = key;
_value= value;
_values = null;
list = false;
}

private ConfigValues(Files file, String key, List<String> value) {
_files = file;
_key = key;
_values= value;
_value = null;
list = true;
}

public String getKey() {
return _key;
}

public Files getFile() {
return _files;
}

public String getValue() {
return _value;
}

public List<String> getValues() {
return _values;
}

private static String loadVersion() {
PluginDescriptionFile pdf =
Bukkit.getPluginManager().getPlugin("Giants").getDescription();
String version = pdf.getVersion();
if (version == null) {
return null;
}
return version;
}

/**
* @return the list
*/
public boolean isList() {
return list;
}

}
Loading