Jogos
Minecraft (Paper)
Como conectar Minecraft (Paper) ao valkyr: instale a bridge, configure e veja quais eventos e ações ela suporta.
- Método
- Paper plugin (Java)
- Status
- exemplo não testado
- Eventos
frameshotabilityspawn
Status: untested example, not compiled. Only a Java 8 runtime was available where it was written (no javac, no Gradle), so the plugin has not been built or run.
Scope
A server side Paper plugin for the operator's own server. It reads only events the server already processes and sends them to a valkyr-server the operator runs. Nothing runs on players' machines. Server operators must follow the game's rules for server operators.
What it sends
| Paper event | valkyr event |
|---|---|
PlayerMoveEvent | frame (position, look, on ground, jump from PlayerJumpEvent) |
EntityDamageByEntityEvent by a player or a player's projectile | shot with target when the victim is a player (weapon id from the config) |
PlayerJoinEvent, PlayerRespawnEvent, PlayerTeleportEvent | spawn (resets movement history) |
BlockBreakEvent (optional, off by default) | ability with a configured id, for break rate checks through a cooldown |
Events are queued on the main thread as small JSON strings and sent in batches by an async task with java. to POST /v1/. Actions are polled from GET /v1/ on an async task and applied on the main thread: actions in kick-on-actions kick the player, actions in notify-on-actions are announced to players with valkyr.. The match is ended on plugin disable.
Player ids: valkyr uses unsigned 64 bit ids, so the plugin folds the UUID (most ^ least significant bits) into one. Minecraft does not give plugins the client clock, so client_ equals the server time.
Units and axes
Minecraft is already meters (blocks) and Y up. Yaw 0 faces +Z (south) and grows clockwise toward -X (west); valkyr yaw 0 faces +Z and 90 faces +X, so valkyr yaw = -Minecraft yaw (wrapped). Minecraft pitch is positive looking down, so valkyr pitch = -Minecraft pitch. Positions are the feet position, unchanged.
Configure valkyr-server movement limits for Minecraft speeds (sprinting is about 5.6 m/s, sprint jumping about 7 m/s; elytra, riptide and speed effects go far beyond that, so either raise the limits or skip frames while gliding by extending onMove).
Build and install
Requirements: JDK 21 and Gradle 8 (or add a Gradle wrapper).
cd integrations/minecraft-papergradle build
Copy build/ to the server's plugins/ folder, start the server once, then edit plugins/ (set api-key to a valkyr-server key with the ingest role) and restart.
Os nomes de jogos e plataformas pertencem aos seus donos e são usados apenas para descrever compatibilidade. O valkyr não tem vínculo com eles.