mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-25 01:49:49 -05:00
Preload paste
Former-commit-id: 3b090ba1de66f422b4fa9adeca3f28dfaef40876
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user