Placeholdery
Osiem placeholderów PlaceholderAPI — ekspansja grybciorynek, cache 20 ticków.
Na podstawie kodu GrzybcioRynek 1.0.3 i web 0.1.0.
Wymaga zainstalowanego PlaceholderAPI. Bez niego plugin działa, ekspansja się nie rejestruje. Soft-depend w plugin.yml.
Identyfikator: grybciorynek (PlaceholderHook.getIdentifier()). Autor: Grzybcio. Wersja = plugin.getPluginMeta().getVersion() (1.0.3). persist() = true.
Log przy starcie: Zarejestrowano placeholdery PlaceholderAPI.
Lista (wszystkie 8)
| Placeholder | Źródło | Format |
|---|---|---|
%grybciorynek_active_listings% | StatsManager.getActiveListings() | liczba |
%grybciorynek_player_listings% | aktywne oferty gracza | liczba; brak gracza → 0 |
%grybciorynek_total_sales% | getSellerHistory(uuid).size() | liczba zakończonych sprzedaży |
%grybciorynek_total_spent% | getPlayerSpent | VaultHook.format |
%grybciorynek_total_earned% | getPlayerEarned (netto sellerReceived) | VaultHook.format |
%grybciorynek_market_volume% | suma price TX COMPLETED | VaultHook.format |
%grybciorynek_mailbox_count% | liczba wpisów skrzynki | liczba |
%grybciorynek_rating% | średnia ocen sprzedawcy | %.1f (np. 4.5); brak gracza → 0 |
Inny params → null (PAPI nie podstawia). params jest porównywany toLowerCase().
Cache
Timer na głównym wątku co 20 ticków (1 s): odświeża active_listings, market_volume i statystyki UUID obecnych w playerCache. Pierwsze żądanie gracza woła computeIfAbsent → buildPlayerStats.
Przykład
Oferty: %grybciorynek_player_listings%
Obrót serwera: %grybciorynek_market_volume%
Skrzynka: %grybciorynek_mailbox_count%
Ocena: %grybciorynek_rating%Źródło w repo: PLugin/PLACEHOLDERS.md i hooks/PlaceholderHook.java.