Preload paste

Former-commit-id: 3b090ba1de66f422b4fa9adeca3f28dfaef40876
This commit is contained in:
Ghost_chu committed 2020-01-11 15:28:56 +08:00
1 parent fbfadb0887
commit b6607de9f8
2 files changed
+21 -2

No files matched your search

@@ -235,5 +235,24 @@ public class Paste {
}catch (Exception ignore){}
return null;
}
@Nullable
public String paste(@NotNull String content,int type){
PasteInterface paster;
if (type == 0) {
try {
//EngineHub Pastebin
paster = new EngineHubPaster();
return paster.pasteTheText(content);
} catch (Exception ignore) {
}
} else {
try {
//Ubuntu Pastebin
paster = new UbuntuPaster();
return paster.pasteTheText(content);
} catch (Exception ignore) {
}
}
return null;
}
}
@@ -101,7 +101,7 @@ public class SentryErrorReporter {
return;
}
Paste paste = new Paste(plugin);
this.lastPaste = paste.paste(paste.genNewPaste());
this.lastPaste = paste.paste(paste.genNewPaste(),1);
}
/**