From 88399f1f47fe1d5779af0c447091bed8904846a4 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Thu, 13 Sep 2018 21:24:09 +0100 Subject: [PATCH] Include the plugin channel name in the exception message By: Phoenix616 --- .../java/org/bukkit/plugin/messaging/StandardMessenger.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java b/paper-api/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java index ddb9f76982..55a0360e4a 100644 --- a/paper-api/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java +++ b/paper-api/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java @@ -471,11 +471,11 @@ public class StandardMessenger implements Messenger { throw new ChannelNameTooLongException(channel); } if (channel.indexOf(':') == -1) { - throw new IllegalArgumentException("Channel must contain : separator"); + throw new IllegalArgumentException("Channel must contain : separator (attempted to use " + channel + ")"); } if (!channel.toLowerCase(Locale.ROOT).equals(channel)) { // TODO: use NamespacedKey validation here - throw new IllegalArgumentException("Channel must be entirely lowercase"); + throw new IllegalArgumentException("Channel must be entirely lowercase (attempted to use " + channel + ")"); } return channel; }