From 20d79728018a3241424b49254c2f29f1ed5a4333 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Feb 2013 09:52:23 +1100 Subject: [PATCH] Add aikar.co url too --- ...ingsHandler-for-adding-new-CraftBukkit-.patch | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Bukkit-Patches/0003-Add-CustomTimingsHandler-for-adding-new-CraftBukkit-.patch b/Bukkit-Patches/0003-Add-CustomTimingsHandler-for-adding-new-CraftBukkit-.patch index f7027d2b0..3f5a288b2 100644 --- a/Bukkit-Patches/0003-Add-CustomTimingsHandler-for-adding-new-CraftBukkit-.patch +++ b/Bukkit-Patches/0003-Add-CustomTimingsHandler-for-adding-new-CraftBukkit-.patch @@ -1,4 +1,4 @@ -From d03d33ba1d6f53a41a2c17fdafa8e8b45653e8f0 Mon Sep 17 00:00:00 2001 +From 60bbe254c90b77065770adc852e57e51b0b0ef81 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 9 Jan 2013 22:18:26 -0500 Subject: [PATCH] Add CustomTimingsHandler for adding new CraftBukkit custom @@ -6,9 +6,9 @@ Subject: [PATCH] Add CustomTimingsHandler for adding new CraftBukkit custom --- .../org/bukkit/command/defaults/ReloadCommand.java | 2 + - .../bukkit/command/defaults/TimingsCommand.java | 65 ++++++++++++++++++++-- - .../org/bukkit/event/CustomTimingsHandler.java | 60 ++++++++++++++++++++ - 3 files changed, 121 insertions(+), 6 deletions(-) + .../bukkit/command/defaults/TimingsCommand.java | 67 ++++++++++++++++++++-- + .../org/bukkit/event/CustomTimingsHandler.java | 60 +++++++++++++++++++ + 3 files changed, 123 insertions(+), 6 deletions(-) create mode 100644 src/main/java/org/bukkit/event/CustomTimingsHandler.java diff --git a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java @@ -32,7 +32,7 @@ index fb3c90f..fffafa5 100644 Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Reload complete."); diff --git a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java -index 94cd62c..66edad9 100644 +index 94cd62c..7c1e601 100644 --- a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java +++ b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java @@ -10,6 +10,7 @@ import org.apache.commons.lang.Validate; @@ -121,7 +121,7 @@ index 94cd62c..66edad9 100644 if (separate) sender.sendMessage("Names written to " + names.getPath()); } catch (IOException e) { } finally { -@@ -122,4 +141,38 @@ public class TimingsCommand extends BukkitCommand { +@@ -122,4 +141,40 @@ public class TimingsCommand extends BukkitCommand { } return ImmutableList.of(); } @@ -152,7 +152,9 @@ index 94cd62c..66edad9 100644 + con.getInputStream().close(); + + String location = con.getHeaderField("Location"); -+ sender.sendMessage(ChatColor.GREEN + "Your timings have been pasted to " + location + ". Upload to http://aikar.co/timings.php to read the results."); ++ String pasteID = location.substring("http://paste.ubuntu.com/".length(), location.length() - 1); ++ sender.sendMessage(ChatColor.GREEN + "Your timings have been pasted to " + location); ++ sender.sendMessage(ChatColor.GREEN + "You can view the results at http://aikar.co/timings.php?url=" + pasteID); + } catch (IOException ex) { + sender.sendMessage(ChatColor.RED + "Error pasting timings, check your console for more information"); + Bukkit.getServer().getLogger().log(Level.WARNING, "Could not paste timings", ex);