Fix unnecessary and potential not thread-safe chat visibility check
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -1177,7 +1177,7 @@
|
||||
|
||||
public void sendPlayerChatMessage(PlayerChatMessage playerchatmessage, ChatMessageType.a chatmessagetype_a) {
|
||||
+ // CraftBukkit start - SPIGOT-7262: if hidden we have to send as disguised message. Query whether we should send at all (but changing this may not be expected).
|
||||
+ if (!getCraftPlayer().canSee(playerchatmessage.link().sender())) {
|
||||
+ if (!getCraftPlayer().canSeePlayer(playerchatmessage.link().sender())) {
|
||||
+ sendDisguisedChatMessage(playerchatmessage.decoratedContent(), chatmessagetype_a);
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user