mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Change the reserved channel check to be sensible
This commit is contained in:
parent
df6c6062ab
commit
ad83a72cf5
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue