geforkt von Mirrors/Paper
e4d10a6d67
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 122289ff Add FaceAttachable interface to handle Grindstone facing in common with Switches a6db750e SPIGOT-5647: ZombieVillager entity should have getVillagerType() CraftBukkit Changes:bbe3d58e
SPIGOT-5650: Lectern.setPage(int) causes a NullPointerException3075579f
Add FaceAttachable interface to handle Grindstone facing in common with Switches95bd4238
SPIGOT-5647: ZombieVillager entity should have getVillagerType()4d975ac3
SPIGOT-5617: setBlockData does not work when NotPlayEvent is called by redstone current
38 Zeilen
2.0 KiB
Diff
38 Zeilen
2.0 KiB
Diff
From df4eaab94f97ac58b44fa6d70ddf40446f3ebfda Mon Sep 17 00:00:00 2001
|
|
From: DoNotSpamPls <7570108+DoNotSpamPls@users.noreply.github.com>
|
|
Date: Tue, 23 Oct 2018 19:32:55 +0300
|
|
Subject: [PATCH] Change the reserved channel check to be sensible
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java b/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java
|
|
index 1d061412c..6fda7f3aa 100644
|
|
--- a/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java
|
|
+++ b/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/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java b/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java
|
|
index dce3d619a..7e2335ed8 100644
|
|
--- a/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java
|
|
+++ b/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java
|
|
@@ -25,8 +25,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"));
|
|
}
|
|
|
|
--
|
|
2.25.1
|
|
|