mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
Kick git and rebuild patches
This commit is contained in:
parent
aec2bb905c
commit
eacefd4282
1 changed files with 6 additions and 6 deletions
|
@ -3233,20 +3233,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
- {
|
- {
|
||||||
- try
|
- try
|
||||||
- {
|
- {
|
||||||
- HttpURLConnection con = (HttpURLConnection) new URL( "http://paste.ubuntu.com/" ).openConnection();
|
- HttpURLConnection con = (HttpURLConnection) new URL( "https://timings.spigotmc.org/paste" ).openConnection();
|
||||||
- con.setDoOutput( true );
|
- con.setDoOutput( true );
|
||||||
- con.setRequestMethod( "POST" );
|
- con.setRequestMethod( "POST" );
|
||||||
- con.setInstanceFollowRedirects( false );
|
- con.setInstanceFollowRedirects( false );
|
||||||
-
|
-
|
||||||
- OutputStream out = con.getOutputStream();
|
- OutputStream out = con.getOutputStream();
|
||||||
- out.write( "poster=Spigot&syntax=text&content=".getBytes( "UTF-8" ) );
|
- out.write( bout.toByteArray() );
|
||||||
- out.write( URLEncoder.encode( bout.toString( "UTF-8" ), "UTF-8" ).getBytes( "UTF-8" ) );
|
|
||||||
- out.close();
|
- out.close();
|
||||||
|
-
|
||||||
|
- com.google.gson.JsonObject location = new com.google.gson.Gson().fromJson(new java.io.InputStreamReader(con.getInputStream()), com.google.gson.JsonObject.class);
|
||||||
- con.getInputStream().close();
|
- con.getInputStream().close();
|
||||||
-
|
-
|
||||||
- String location = con.getHeaderField( "Location" );
|
- String pasteID = location.get( "key" ).getAsString();
|
||||||
- String pasteID = location.substring( "http://paste.ubuntu.com/".length(), location.length() - 1 );
|
- sender.sendMessage( ChatColor.GREEN + "Timings results can be viewed at https://www.spigotmc.org/go/timings?url=" + pasteID );
|
||||||
- sender.sendMessage( ChatColor.GREEN + "Timings results can be viewed at http://www.spigotmc.org/go/timings?url=" + pasteID );
|
|
||||||
- } catch ( IOException ex )
|
- } catch ( IOException ex )
|
||||||
- {
|
- {
|
||||||
- sender.sendMessage( ChatColor.RED + "Error pasting timings, check your console for more information" );
|
- sender.sendMessage( ChatColor.RED + "Error pasting timings, check your console for more information" );
|
||||||
|
|
Loading…
Reference in a new issue