Added checkstyle plugin

Moved resources to correct folder
Fixed and improved build information, no longer tracking build.properties
This commit is contained in:
JeromSar
2015-11-22 19:26:47 +01:00
parent 89a317b7df
commit a0058869c9
174 changed files with 1302 additions and 617 deletions
@@ -4,6 +4,7 @@ import java.util.List;
public enum ConfigEntry
{
FORCE_IP_ENABLED(Boolean.class, "forceip.enabled"),
FORCE_IP_PORT(Integer.class, "forceip.port"),
FORCE_IP_KICKMSG(String.class, "forceip.kickmsg"),
@@ -16,6 +16,7 @@ import org.bukkit.plugin.Plugin;
*/
public class FConfig extends YamlConfiguration // BukkitLib @ https://github.com/Pravian/BukkitLib
{
private final Plugin plugin;
private final File configFile;
private final boolean copyDefaults;
@@ -23,7 +24,8 @@ public class FConfig extends YamlConfiguration // BukkitLib @ https://github.com
/**
* Creates a new YamlConfig instance.
*
* <p>Example:
* <p>
* Example:
* <pre>
* YamlConfig config = new YamlConfig(this, "config.yml", true);
* config.load();
@@ -41,7 +43,8 @@ public class FConfig extends YamlConfiguration // BukkitLib @ https://github.com
/**
* Creates a new YamlConfig instance.
*
* <p>Example:
* <p>
* Example:
* <pre>
* YamlConfig config = new YamlConfig(this, new File(plugin.getDataFolder() + "/players", "Prozza.yml"), false);
* config.load();
@@ -89,7 +92,8 @@ public class FConfig extends YamlConfiguration // BukkitLib @ https://github.com
/**
* Loads the configuration from the predefined file.
*
* <p>Optionally, if loadDefaults has been set to true, the file will be copied over from the default inside the jar-file of the owning plugin.</p>
* <p>
* Optionally, if loadDefaults has been set to true, the file will be copied over from the default inside the jar-file of the owning plugin.</p>
*
* @see #YamlConfig(Plugin, String, boolean)
*/
@@ -142,6 +146,7 @@ public class FConfig extends YamlConfiguration // BukkitLib @ https://github.com
/**
* Returns the default configuration as been stored in the jar-file of the owning plugin.
*
* @return The default configuration.
*/
public YamlConfiguration getDefaultConfig()
@@ -15,6 +15,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
public class MainConfig
{
public static final File CONFIG_FILE = new File(TotalFreedomMod.plugin.getDataFolder(), TotalFreedomMod.CONFIG_FILENAME);
//
private static final EnumMap<ConfigEntry, Object> ENTRY_MAP;
@@ -79,7 +80,8 @@ public class MainConfig
}
else
{
FLog.warning("Value for " + entry.getConfigName() + " is of type " + value.getClass().getSimpleName() + ". Needs to be " + entry.getType().getSimpleName() + ". Using default value.");
FLog.warning("Value for " + entry.getConfigName() + " is of type "
+ value.getClass().getSimpleName() + ". Needs to be " + entry.getType().getSimpleName() + ". Using default value.");
}
}
else
@@ -274,6 +276,7 @@ public class MainConfig
public static class TFM_Defaults
{
private YamlConfiguration defaults = null;
private TFM_Defaults(InputStream defaultConfig)
@@ -300,4 +303,5 @@ public class MainConfig
return defaults.get(path);
}
}
}