Skip to content
This repository has been archived by the owner on Dec 5, 2021. It is now read-only.

Commit

Permalink
Preload paste
Browse files Browse the repository at this point in the history
Former-commit-id: 3b090ba
  • Loading branch information
Ghost-chu committed Jan 11, 2020
1 parent fbfadb0 commit b6607de
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
21 changes: 20 additions & 1 deletion src/main/java/org/maxgamer/quickshop/Util/Paste/Paste.java
Original file line number Diff line number Diff line change
Expand Up @@ -235,5 +235,24 @@ public String paste(@NotNull String content){
}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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public SentryErrorReporter(@NotNull QuickShop plugin) {
return;
}
Paste paste = new Paste(plugin);
this.lastPaste = paste.paste(paste.genNewPaste());
this.lastPaste = paste.paste(paste.genNewPaste(),1);
}

/**
Expand Down

0 comments on commit b6607de

Please sign in to comment.