mirror of
https://github.com/darksaid98/EntityBingo.git
synced 2026-12-01 15:58:46 +00:00
remove debug messaging
This commit is contained in:
1 parent
6176a61e05
commit
6fcbf28d88
2 files changed
+8
-12
No files matched your search
@@ -9,6 +9,7 @@ import java.nio.file.Files;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
/**
|
||||
* Manages file IO & Deletion for other data classes.
|
||||
@@ -39,7 +40,7 @@ public class DataManager {
|
||||
try {
|
||||
writer = new PrintWriter(file);
|
||||
} catch (FileNotFoundException e) {
|
||||
Bukkit.getLogger().info("Encountered error when creating PrintWriter for " + filePath);
|
||||
EntityBingo.getInstance().getLogger().log(Level.WARNING, "Encountered error when creating PrintWriter for " + filePath);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -74,7 +75,7 @@ public class DataManager {
|
||||
*/
|
||||
public static HashMap<String, Object> getData(File file) {
|
||||
if (!file.exists()) {
|
||||
Bukkit.getLogger().info("Attempted to retrieve non-existant file: " + file.getPath());
|
||||
EntityBingo.getInstance().getLogger().log(Level.WARNING, "Attempted to retrieve non-existant file: " + file.getPath());
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -82,7 +83,7 @@ public class DataManager {
|
||||
try {
|
||||
inputStream = new FileInputStream(file);
|
||||
} catch (FileNotFoundException e) {
|
||||
Bukkit.getLogger().info("Encountered error when creating FileInputStream for " + file.getPath());
|
||||
EntityBingo.getInstance().getLogger().log(Level.WARNING, "Encountered error when creating FileInputStream for " + file.getPath());
|
||||
return null;
|
||||
}
|
||||
Yaml yaml = new Yaml();
|
||||
@@ -90,7 +91,7 @@ public class DataManager {
|
||||
try {
|
||||
inputStream.close();
|
||||
} catch (IOException e) {
|
||||
Bukkit.getLogger().info(e.getMessage());
|
||||
EntityBingo.getInstance().getLogger().log(Level.SEVERE, e.getMessage());
|
||||
}
|
||||
|
||||
return data;
|
||||
@@ -106,7 +107,7 @@ public class DataManager {
|
||||
File file = getFile(filePath);
|
||||
|
||||
if (!file.exists()) {
|
||||
Bukkit.getLogger().info("Attempted to retrieve non-existant file: " + filePath + ".yml");
|
||||
EntityBingo.getInstance().getLogger().log(Level.WARNING, "Attempted to retrieve non-existant file: " + filePath + ".yml");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -132,7 +133,7 @@ public class DataManager {
|
||||
try {
|
||||
file.createNewFile();
|
||||
} catch (IOException e) {
|
||||
Bukkit.getLogger().info("Encountered error when creating file - " + path);
|
||||
EntityBingo.getInstance().getLogger().log(Level.WARNING, "Encountered error when creating file - " + path);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public class ChatListener implements Listener {
|
||||
Bukkit.broadcastMessage(Helper.chatLabel() + "Entity Bingo has begun! Type a number to enter!");
|
||||
EntityBingo.getInstance().getLogger().info(Helper.chatLabel() + "Entity Bingo has begun! Type a number to enter!");
|
||||
} else {
|
||||
Bukkit.getLogger().info(Helper.chatLabel() + "Event Started too recently, ignoring Bingo attempt!");
|
||||
Bukkit.broadcastMessage(Helper.chatLabel() + "Event Started too recently, ignoring Bingo attempt!");
|
||||
EntityBingo.getInstance().getLogger().info(Helper.chatLabel() + "Event Started too recently, ignoring Bingo attempt!");
|
||||
}
|
||||
}
|
||||
@@ -155,8 +155,6 @@ public class ChatListener implements Listener {
|
||||
EntityBingo.getCurrentEvent().setDone();
|
||||
|
||||
}
|
||||
} else {
|
||||
Bukkit.getLogger().info("Match not found for any part");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -167,7 +165,6 @@ public class ChatListener implements Listener {
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
public void onChat(AsyncPlayerChatEvent e) {
|
||||
//Entry detection
|
||||
Bukkit.getLogger().info(Helper.chatLabel() + "comparing: " + "\"" + e.getMessage() + "\"");
|
||||
if (EntityBingo.getCurrentEvent() != null) {
|
||||
if(EntityBingo.getCurrentEvent().isDone()) {
|
||||
return;
|
||||
@@ -175,10 +172,8 @@ public class ChatListener implements Listener {
|
||||
String str = e.getMessage();
|
||||
//remove all color codes from this message
|
||||
str = ChatColor.stripColor(str);
|
||||
Bukkit.getLogger().info(Helper.chatLabel() + "purges codes for: " + "\"" + str + "\"");
|
||||
//remove all text other than numbers
|
||||
str = str.replaceAll("[^0-9.]", "");
|
||||
Bukkit.getLogger().info(Helper.chatLabel() + "numbers only: " + "\"" + str + "\"");
|
||||
if(!str.isEmpty()) {
|
||||
int guess;
|
||||
//we need to check if the guess exists as an int
|
||||
|
||||
Reference in new issue
Block a user