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 ed39f5116b..8e96be6033 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 @@ -172,7 +172,7 @@ public class StandardMessenger implements Messenger { public boolean isReservedChannel(@NotNull String channel) { channel = validateAndCorrectChannel(channel); - return channel.contains("minecraft") && !channel.equals("minecraft:brand"); + return channel.equals("minecraft:register") || channel.equals("minecraft:unregister"); // Paper } @Override diff --git a/paper-api/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java b/paper-api/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java index 144ae2f31b..8ffaa33d97 100644 --- a/paper-api/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java +++ b/paper-api/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java @@ -26,8 +26,8 @@ public class StandardMessengerTest { assertTrue(messenger.isReservedChannel("minecraft:register")); assertFalse(messenger.isReservedChannel("test:register")); assertTrue(messenger.isReservedChannel("minecraft:unregister")); - assertFalse(messenger.isReservedChannel("test:nregister")); - assertTrue(messenger.isReservedChannel("minecraft:something")); + assertFalse(messenger.isReservedChannel("test:unregister")); // Paper - fix typo + assertFalse(messenger.isReservedChannel("minecraft:something")); // Paper - now less strict assertFalse(messenger.isReservedChannel("minecraft:brand")); }