Add null check add DumpLog.addLine(CharSequence)

Cancels the DumpLog task (Forgot it)
This commit is contained in:
Fuzzlemann 2017-08-11 17:15:46 +02:00
parent 298286180c
commit 9da01941d7
2 changed files with 11 additions and 2 deletions

View File

@ -50,8 +50,12 @@ public class ManageDumpCommand extends SubCommand {
plugin.getRunnableFactory().createNew(new AbsRunnable("DumpTask") {
@Override
public void run() {
sender.sendLink("Link to the Dump", DumpUtils.dump(plugin));
sender.sendLink("Report Issues here", "https://github.com/Rsl1122/Plan-PlayerAnalytics/issues/new");
try {
sender.sendLink("Link to the Dump", DumpUtils.dump(plugin));
sender.sendLink("Report Issues here", "https://github.com/Rsl1122/Plan-PlayerAnalytics/issues/new");
} finally {
this.cancel();
}
}
}).runTaskAsynchronously();
}

View File

@ -88,6 +88,11 @@ public class DumpLog {
* @param line The content of the line
*/
private void addLine(CharSequence line) {
if (line == null) {
lines.add("\n");
return;
}
lines.add(line.toString());
}