4drian3d / 4drian3d/SignedVelocity

Issue warning, if possible, when behavior changes due to backend plugin handling

Đang mở
#17 4 bình luận 2 reaction 1 người được giao Được @4drian3d nhận Xem trên GitHub
bug
Ngôn ngữ chính
Java
Star
73
Fork
23
Merge trung bình
11 giờ 19 phút
Pull request đã merge (30 ngày)
9

Mô tả

In the pre-existing Velocity API, canceling a chat event prevents it from being sent to the backend servers. Chat canceled on the proxy is therefore invisible to Bukkit plugins. However, using SignedVelocity fundamentally alters this behavior by forwarding **all** chat events, even if canceled, to the backend servers. While this makes the plugin work, it is a behavioral change from the prior status quo, and leaks the abstraction SignedVelocity employs to shore up chat handling in a post-1.19.4 world.

This can be confusing for users who are acquainted to the previous behavior. For example, it may cause certain proxy plugin features to stop working when switching from pre-1.19.4 to post-1.19.4 with SignedVelocity, since the behavior of chat events is now different.

Most of the time, however, uncanceling a canceled chat event doesn't make sense. Fortunately, SignedVelocity is in the unique position of knowing exactly when a chat event was canceled by the proxy but uncanceled by the backend server. I therefore propose SignedVelocity add another listener on `EventPriority.HIGHEST` to log a brief warning if behavior has fundamentally changed as a result of a backend plugin *uncanceling* the event. It should be relatively straightforward given you already have a queue of chat data, so no additional data structure overhead would be incurred. If you want to avoid annoying users, the brief warning can be one-time, or it can be disabled by a config option. However, I argue it should be enabled by default, because it presents a behavioral change from the typical Velocity API proxy plugins are used to.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Look at the chat event handling code in SignedVelocity, likely where chat events are queued and forwarded. Identify the listener that currently uncancels events for backend servers. Add a HIGHEST priority listener to detect when a backend plugin uncancels a proxy-canceled event. Implement a configurable warning log, possibly one-time per event type. Check existing configuration options for adding a new toggle.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java
Lĩnh vực
backend, devtools
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.