Repository navigation
fix: バイパス権限を持つプレイヤーの死亡メッセージ用メタデータを実際の所有者で削除する - #49
Merged
Merged
Conversation
…layers The metadata is owned by ToggleDeathMessage when it is installed, so removing it with MoreFlags as the owner did nothing and players with WorldGuard bypass kept being excluded from the death message. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01An7Jsqoey6TALGm294uYKf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
ToggleDeathMessage(TDM)が導入されていると、メタデータ
no_see_death_messageの所有者は MoreFlags ではなく TDM です(DeathMessageListenerのコンストラクタで TDM を所有者にしています)。しかし、WorldGuard のバイパス権限を持つプレイヤーからメタデータを外す処理が、所有者として MoreFlags を指定していました。そのため削除されず、OP などバイパス権限のあるプレイヤーが、
isolate-death-message領域で死亡メッセージを受け取れませんでした。変更
removeMetadataの所有者を、メタデータ作成時の所有者(noSeeMeta.getOwningPlugin())にします。TDM が無い場合の所有者は MoreFlags 自身のため、挙動は変わりません。検証
Paper 26.3 + WorldGuard 7.0.19 + ToggleDeathMessage で、実 Bot が受信した結果を確認しました。
isolate-death-message領域内の死亡で、バイパス権限を持つ OP は受信しない(失敗)注意
no_see_death_messageを読まない現行の v4.0.0 では、そもそもフラグが効きません。src/test)と Folia は未検証です。Generated by Claude Code