Skip to content

Commit 2cac0ff

Browse files
committed
Notify player peers using notify() instead of sendMessage()
1 parent 2429cbc commit 2cac0ff

File tree

1 file changed

+6
-1
lines changed
  • gameserver/src/main/java/brainwine/gameserver/entity/player

1 file changed

+6
-1
lines changed

gameserver/src/main/java/brainwine/gameserver/entity/player/Player.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,8 +530,13 @@ public void kick(String reason, boolean shouldReconnect) {
530530
}
531531

532532
public void notifyPeers(Object message, NotificationType type) {
533-
sendMessageToPeers(new NotificationMessage(message, type));
534533
GameServer.getInstance().notify(message, type);
534+
535+
for(Player player : zone.getPlayers()) {
536+
if(player != this) {
537+
player.notify(message, type);
538+
}
539+
}
535540
}
536541

537542
public void notify(Object message) {

0 commit comments

Comments
 (0)