mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 07:49:03 +00:00
Use Java 7 Language Level
This commit is contained in:
@@ -13,7 +13,7 @@ import com.dre.brewery.P;
|
||||
|
||||
public class ConfigUpdater {
|
||||
|
||||
private ArrayList<String> config = new ArrayList<String>();
|
||||
private ArrayList<String> config = new ArrayList<>();
|
||||
private File file;
|
||||
|
||||
public ConfigUpdater(File file) {
|
||||
|
||||
@@ -54,7 +54,7 @@ public class DataSave extends BukkitRunnable {
|
||||
}
|
||||
try {
|
||||
cancel();
|
||||
} catch (IllegalStateException e) {
|
||||
} catch (IllegalStateException ignored) {
|
||||
}
|
||||
|
||||
FileConfiguration configFile = new YamlConfiguration();
|
||||
|
||||
@@ -51,7 +51,7 @@ public class DataUpdater {
|
||||
ConfigurationSection matSection = section.getConfigurationSection(id + ".mats");
|
||||
if (matSection != null) {
|
||||
// matSection has all the materials + amount as Integers
|
||||
Map<String, Integer> ingredients = new HashMap<String, Integer>();
|
||||
Map<String, Integer> ingredients = new HashMap<>();
|
||||
for (String ingredient : matSection.getKeys(false)) {
|
||||
// convert to Material
|
||||
Material mat = Material.getMaterial(P.p.parseInt(ingredient));
|
||||
@@ -81,7 +81,7 @@ public class DataUpdater {
|
||||
ConfigurationSection ingredientSection = cauldrons.getConfigurationSection(id + ".ingredients");
|
||||
if (ingredientSection != null) {
|
||||
// has all the materials + amount as Integers
|
||||
Map<String, Integer> ingredients = new HashMap<String, Integer>();
|
||||
Map<String, Integer> ingredients = new HashMap<>();
|
||||
for (String ingredient : ingredientSection.getKeys(false)) {
|
||||
// convert to Material
|
||||
Material mat = Material.getMaterial(P.p.parseInt(ingredient));
|
||||
|
||||
@@ -10,8 +10,8 @@ import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
public class LanguageReader {
|
||||
private Map<String, String> entries = new TreeMap<String, String>();
|
||||
private Map<String, String> defaults = new TreeMap<String, String>();
|
||||
private Map<String, String> entries = new TreeMap<>();
|
||||
private Map<String, String> defaults = new TreeMap<>();
|
||||
|
||||
private File file;
|
||||
private boolean changed;
|
||||
@@ -143,6 +143,7 @@ public class LanguageReader {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("ResultOfMethodCallIgnored")
|
||||
public void save() {
|
||||
if (changed) {
|
||||
/* Copy old File */
|
||||
|
||||
@@ -14,6 +14,7 @@ public class ReadOldData extends BukkitRunnable {
|
||||
public FileConfiguration data;
|
||||
public boolean done = false;
|
||||
|
||||
@SuppressWarnings("ResultOfMethodCallIgnored")
|
||||
@Override
|
||||
public void run() {
|
||||
File datafile = new File(P.p.getDataFolder(), "data.yml");
|
||||
|
||||
Reference in New Issue
Block a user