▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/PlayerAPI
PlayerAPI

PlayerAPI

Client-side Fabric library providing player movement, inventory, world queries, and human-like automation APIs for mod developers.

Оцените первым
516
0
Все версии→PlayerAPI 1.8.0

PlayerAPI 1.8.0

Release07.05.2026

Список изменений

PlayerAPI — Patch Notes


New: DisplayActions

New class for showing in-game overlays without touching Minecraft internals directly.

  • showTitle(title, subtitle) — shows a title and subtitle with default fade timing (10/70/20 ticks)
  • showTitle(title, subtitle, fadeIn, stay, fadeOut) — same but with custom timing
  • showActionBar(message) — shows text on the action bar above the hotbar
  • All methods accept § colour codes

New: BlockSnapshot type

New immutable record representing a block in the world.

  • Fields: x, y, z, blockId (e.g. "minecraft:wheat"), blockState (Map<String, String>)
  • Helpers: getState(String key), hasState(String key), stateEquals(String key, String value)

WorldInfo — new methods

  • getNearbyEntitiesMatching(double radius, Predicate<EntitySnapshot>) — filtered version of getNearbyEntities; avoids iterating the full list on the caller's side
  • getNearbyBlocks(double radius, String blockId) — returns all blocks of a specific type within radius (sphere scan)
  • getNearbyBlocksMatching(double radius, Predicate<BlockSnapshot>) — same but with a custom predicate
  • getEntityAtCrosshair() → Optional<EntitySnapshot> — entity the player is currently looking at (uses the client crosshair raycast)
  • getBlockAtCrosshair() → Optional<BlockSnapshot> — block the player is currently looking at
  • getEntityNbt(int entityId) → Map<String, String> — reads top-level NBT values for a nearby entity; moderately expensive, do not call every tick

Bug fix: getNearbyEntities and getNearbyPlayers were incorrectly passing x, y, z as separate arguments to Box.of() instead of new Vec3d(x, y, z). The bounding box was being constructed with the wrong overload, causing entities to be missed or wrongly included. Now fixed.


TabListInfo — new methods

  • getAllLinesRaw() — returns display name strings before formatting stripping (for inspecting raw style data)
  • findLinesWithPrefix(String prefix) — returns all lines with the prefix, not just the first
  • findLinesContaining(String substring) — case-insensitive substring search, returns all matches
  • parseKeyValueLines(String... prefixes) — batch extracts multiple "Key: Value" pairs in one call
  • anyLineMatches(String regex) — tests whether any tab list line matches a regex
  • isLineStrikethrough(String substring) — returns true if the first line containing the substring has any segment with strikethrough styling applied; uses Text.visit() to walk the style tree (the only reliable method — getString() strips all formatting)
  • getPlayerUsernames() — returns actual Minecraft account names (not display names) from the tab list
  • isPlayerOnline(String username) — case-insensitive check for a player's presence
  • getPlayerCount() — total number of entries in the tab list

SoundActions — new methods

  • playById(String fullSoundId, float volume, float pitch) — plays any vanilla or registered sound by its string ID (e.g. "entity.player.levelup"); if no namespace is given, defaults to minecraft:
  • playRepeated(Identifier, float volume, float pitch, int times, int intervalTicks) — plays a sound N times with a configurable tick gap between repeats
  • playRepeated(Identifier, float volume, float pitch, int times) — same with the default 20-tick (1 second) interval
  • playByIdRepeated(String fullSoundId, float volume, float pitch, int times, int intervalTicks) — string-ID convenience overload of playRepeated

New: Update checker

PlayerAPI now checks for newer releases on every world join and shows a single chat message if one is found. Nothing is downloaded automatically.

  • Runs on a daemon thread so the network request never blocks the game thread
  • Reads the tag_name field from the GitHub Releases API and compares it against the installed version using numeric segment comparison (handles both v1.2.0 and 1.2.0 tag formats)
  • Only fires the notification once per world join
  • Silent on failure (network errors, offline, restricted networks)
  • Can be disabled in the new config screen

New: PlayerAPIConfig

GSON-backed config singleton persisted to config/playerapi/config.json.

  • isUpdateCheckEnabled() / setUpdateCheckEnabled(boolean) — controls the update check
  • load() / save() — called automatically on world init and config screen close

New: Config screen

A YACL config screen with a single Updates tab containing the update check toggle. Accessible from the ModMenu mods list if ModMenu is installed.


New: ModMenu integration

Implements ModMenuApi to add a Config button to PlayerAPI's entry in the ModMenu mods list. ModMenu remains an optional dependency — PlayerAPI runs normally without it.


New dependencies

DependencyTypeNotes
yet-another-config-lib (YACL3)RequiredNeeded for the config screen
modmenuOptionalAdds the Config button to the mods list if present

Файлы

playerapi-1.8.0.jar(429.96 KiB)
Основной
Скачать

Метаданные

Канал релиза

Release

Номер версии

1.8.0

Загрузчики

Fabric

Версии игры

1.21.11

Загрузок

264

Дата публикации

07.05.2026

Загрузил

ID версии

Главная