▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Плагины/SharedCure
SharedCure

SharedCure

SharedCure is a server plugin built on the Paper API that utilizes a 'Tagging + Lazy Loading' mechanism to ensure that villagers cured by any player provide the maximum discount to all players on the server.

32
0

SharedCure

English | 简体中文

SharedCure is a Paper plugin that implements server-wide villager discount sharing using a small tag (PDC) and Just-In-Time reputation injection approach. When a villager has been cured by any player, this plugin ensures other players who interact with that villager receive the highest trade discount (MAJOR_POSITIVE) without requiring bulk updates across all players.

Features

  • PDC three-state management: Each villager receives a discount_status tag (PDC) indicating UNKNOWN, NOT_CURED, or CURED to minimize server-wide operations.
  • Instant Reputation Injection: When a player interacts with a villager in the CURED state, the plugin will, if necessary, instantly inject MAJOR_POSITIVE reputation for the player's UUID, ensuring that the discount is immediately reflected in the trading interface. This only affects the cured reputation (MAJOR_POSITIVE) and does not impact other types of reputation.
  • Legacy villager backfill: On plugin load and chunk load, villagers that lack the plugin tag are deep-checked for existing reputations (gossip) and tagged accordingly to support older worlds.
  • Cure capture: The plugin listens for EntityTransformEvent and marks zombie villager conversions as CURED instantly.

Architecture Overview

ModuleEventPurpose
Existing villager initializationChunkLoadEvent + startup scanTag existing villagers and deep-check gossip/inventory for unknown states.
New villager taggingCreatureSpawnEventTag newly spawned villagers NOT_CURED.
Cure captureEntityTransformEventMark newly cured villagers as CURED.
JIT injectionPlayerInteractEntityEventInject MAJOR_POSITIVE reputation for the interacting player when villager is CURED.

Совместимость

Minecraft: Java Edition

1.21.x

Платформы

Поддерживаемые окружения

Сервер

Создатели

Детали

Лицензия:MIT
Опубликован:3 месяца назад
Обновлён:3 месяца назад
Главная