44import java .io .FileNotFoundException ;
55import java .io .IOException ;
66
7- import java . util . Scanner ;
7+
88import java .util .UUID ;
99import org .bukkit .Bukkit ;
1010import org .bukkit .World ;
2020
2121
2222public class StoneOres extends JavaPlugin {
23- private boolean debug = true ;
2423 private BentoBox api ;
2524 private File langConfig = null ;
2625 private File playerFile = null ;
@@ -138,9 +137,7 @@ private void loadYamls(){
138137 try {
139138 lang .load (langConfig );
140139 }
141- catch (InvalidConfigurationException e ){e .printStackTrace ();}
142- catch (FileNotFoundException e ){e .printStackTrace ();}
143- catch (IOException e ){e .printStackTrace ();}
140+ catch (InvalidConfigurationException | IOException e ){e .printStackTrace ();}
144141 }
145142
146143 public YamlConfiguration getLang (){
@@ -210,8 +207,6 @@ public String getGeneratorGroup(World world, int isLvl){
210207 Integer tierPoints = getConfig ().getInt ("world." + worldStr + ".tiers." + item .trim ());
211208 if (tierPoints < isLvl ){
212209 islandTier = item .trim ();
213- if (debug ){Bukkit .broadcast ("island Tier = " + islandTier , "*" );}
214-
215210 }
216211 }
217212 return islandTier ;
@@ -221,20 +216,4 @@ public String getGeneratorGroup(World world, int isLvl){
221216 public String [] getBlockList (World world , String genGroup ){
222217 return getConfig ().getConfigurationSection ("world." + world .getName () + ".blocktypes." + genGroup ).getKeys (false ).toString ().substring (1 , getConfig ().getConfigurationSection ("world." + world .getName () + ".blocktypes." + genGroup ).getKeys (false ).toString ().length () - 1 ).replaceAll ("\\ s+" , "" ).split ("," );
223218 }
224-
225- public String readFile (String pathname ) throws IOException {
226- File file = new File (pathname );
227- StringBuilder fileContents = new StringBuilder ((int )file .length ());
228- Scanner scanner = new Scanner (file );
229- String lineSeparator = System .getProperty ("line.separator" );
230-
231- try {
232- while (scanner .hasNextLine ()) {
233- fileContents .append (scanner .nextLine () + lineSeparator );
234- }
235- return fileContents .toString ();
236- } finally {
237- scanner .close ();
238- }
239- }
240- }
219+ }
0 commit comments