Improve handling of offline players during events
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
Rechercherichtung
Beginne mit dem Lesen von AbstractEvent, MCPlayerEvent, Static.GetPlayer() und Static.GetCommandSender(), und vergleiche anschließend die Behandlung von player_login und player_spawn. Kläre das erwartete Verhalten für Offline-Spieler und missing-byName-Spieler, berücksichtige Erweiterungen und füge eine umfassende Abdeckung hinzu; als erledigt gilt, dass Lookups im Event-Kontext und das Verhalten der Bind-Umgebung explizit definiert und verifiziert sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Some events pass a player object for players that are missing from the player list during the event. This causes a CREPlayerOfflineException when getting these players from Static.GetPlayer() or Static.GetCommandSender(), as well as made it tricky to pass the player to the bind environment. This was originally solved by hijacking the player injection system used for capture_runas(), but it wasn't designed for this.
Now, after some changes, the player is added to the environment from MCPlayerEvent instead, but injection is still used for getting players by name (and as a fallback for environment adding). But this happens in AbstractEvent, and this is undesirable as it mixes MC and MethodScript stuff. This will need to be changed some day in the future, but extensions would need to be considered.
Two events use injection still: player_login, where the player is not yet added to the player list at all; and player_spawn where the player is missing from the byName player map but not the byUUID player map (byUUID determines whether the player is "online" or not), which means they're technically online but Static.GetPlayer() can't find them without injection. I consider the player_spawn situation a bug, so it might be better to move the workaround for this to the bukkit abstraction layer.
As for player_login, the player is technically offline, so I'm not sure what the expectation should be here. Due to this, currently you can run functions from player context but not by name, except functions that take a CommandSender instead. (e.g. has_permission(<playerName>, <permissionNode>)) We could change Static.GetPlayer() to take an environment object for situations like this (is player_login the only one?), but that'll affect a lot of functions and some will malfunction in unknown ways for truly offline players. I haven't done a comprehensive test.
- Vorherrschende Sprache
- Java
- Sterne
- 128
- Forks
- 70
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus EngineHub/CommandHelper
-
discussion wanted documentation
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
EngineHub/CommandHelper#1403 ·
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
EngineHub/CommandHelper#1354 ·
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
EngineHub/CommandHelper#1349 · 3 Kommentare ·
-
bug
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
EngineHub/CommandHelper#1341 · 2 Kommentare ·
-
bug discussion wanted
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 42/100
EngineHub/CommandHelper#1338 · 2 Kommentare ·
Alle Issues in EngineHub/CommandHelper
Ähnliche Issues
-
`GET /v1/event/token/{uuid}` can report a BOM upload as done before policy evaluation and metrics have finishedEvtl. vergeben @Zargath hat das heute übernommen. Offendefect in triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
DependencyTrack/dependency-track#7646 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
floci-io/floci#5425 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
objectionary/eo-graphs#80 ·
-
WebMvcStreamableServerTransportProvider: idle-session eviction stops permanently after a NullPointerException when a session is deleted mid-sweepEvtl. vergeben @lejuho hat das heute übernommen. Offenstatus: waiting-for-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
spring-projects/spring-ai#7133 ·
Maintainer antworten meist innerhalb von 6 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
objectionary/jucs#141 ·
Maintainer antworten meist innerhalb von 1 Tag