is it broken for no reason whatsoever?!

This commit is contained in:
alisolarflare 2016-11-28 18:49:29 -05:00
parent d66e8b697b
commit 3b1ed89717

View file

@ -23,6 +23,7 @@ public class GetLoginMetrics extends ModCommand{
@Override
public boolean OnCommand(Player player, String alias, String[] args) {
player.sendMessage("FIRED");
if (args.length == 1){
BufferedReader outputStream = null;
try {
@ -40,13 +41,28 @@ public class GetLoginMetrics extends ModCommand{
}
} catch (FileNotFoundException e) {
TBMCCoreAPI.SendException(args[0] + " could not be found", e);
if (outputStream != null){
try {
outputStream.close();
} catch (IOException e1) {
e1.printStackTrace();
}
}
} catch (IOException e1) {
TBMCCoreAPI.SendException(args[0] + "encountered an I/O Exception!", e1);
if (outputStream != null){
try {
outputStream.close();
} catch (IOException e2) {
e2.printStackTrace();
}
}
}
}else{
for (String metric : module.playerLoginsFile.toArrayList()){
player.sendMessage(metric);
}
}
return true;
}
}