Skip to content
This repository was archived by the owner on Feb 7, 2019. It is now read-only.

Commit 4185448

Browse files
Removed debug code that was spamming server ops.
1 parent f608fdb commit 4185448

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

src/main/java/me/shakeforprotein/stoneores/StoneOres.java

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import java.io.FileNotFoundException;
55
import java.io.IOException;
66

7-
import java.util.Scanner;
7+
88
import java.util.UUID;
99
import org.bukkit.Bukkit;
1010
import org.bukkit.World;
@@ -20,7 +20,6 @@
2020

2121

2222
public 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

Comments
 (0)