Realizedd / TokenManager

An economy plugin for minecraft.
https://www.spigotmc.org/resources/tokenmanager.8610/
GNU General Public License v3.0
29 stars 47 forks source link

TokenManager placeholder slow update rate? #21

Closed mibby closed 6 years ago

mibby commented 6 years ago

Hi @RealizedMC,

Using the TokenManager PlaceholderAPI expansion (v2.0.8), I noticed %tokenmanager_tokens% in my menu GUI takes a minute or two to actually update and reflect the person's balance. It displays 0 until it actually grabs their true balance value.

I was wondering, is this a problem with the TokenManager placeholder having a slow update interval or is it a symptom of the BossShop gui being slow to update? The GUI correctly updates the player's economy and points balance fast as soon as they open the gui, just not tokens until it is actually cached a minute or two after opening the gui.

Realizedd commented 6 years ago

Use my own implementation instead: %tm_tokens%

mibby commented 6 years ago

@RealizedMC %tm_tokens% doesn't seem to return anything. It just displays text. For reference, I'm using the placeholder in another plugin's GUI as a main menu to display balance.

Realizedd commented 6 years ago

Could you check if PlaceholderAPI says that the placeholder is registered?

Realizedd commented 6 years ago

I've just tested the placeholder with the latest version of PlaceholderAPI and DeluxeMenus, and it seems to work just fine.

mibby commented 6 years ago

How do I check if PAPI says the placeholder is registered?

/papi info %tm_tokens% says no expansion was loaded with the identifier: %tm_tokens%. Is there a separate expansion to use or hook I have to enable within TokenManager? Or perhaps do you think having the TokenManager PAPI expansion installed disables your built-in one?

Realizedd commented 6 years ago

I'm not sure, but try removing the expansion and see if /papi parse %tm_tokens% works.

mibby commented 6 years ago

Removed the expansion and restarted the server, /papi parse %tm_tokens% still does not work for me. Just returns %tm_tokens% in text.

TokenManager v3.1.0 PlaceholderAPI v2.8.7 Paper dev 1437 (Spigot 1.12.2)

PAPI config;

check_updates: false
cloud_enabled: true
cloud_allow_unverified_expansions: false
boolean:
  'true': 'yes'
  'false': 'no'
date_format: MM/dd/yy HH:mm:ss
injector_enabled: true
expansions:
  vault:
    formatting:
      thousands: k
      trillions: T
      quadrillions: Q
      billions: B
      millions: M
  bungee:
    check_interval: 30
  javascript:
    engine: javascript

TokenManager is using MySQL database, redis false, online mode: true and register-economy: false.

Realizedd commented 6 years ago

Hmm, could you check if it says [TokenManager] Successfully hooked into 'PlaceholderAPI' on the console?

Also, feel free to add me on Discord, so that I can respond faster to your messages - Realized#2240

mibby commented 6 years ago
[06:44:38] [Server thread/INFO]: [TokenManager] Enabling TokenManager v3.1.0
[06:44:38] [Server thread/INFO]: [TokenManager] Loaded Config.
[06:44:38] [Server thread/INFO]: [TokenManager] Loaded Lang.
[06:44:38] [Server thread/INFO]: [TokenManager] Loaded ShopsConfig.
[06:44:38] [Server thread/INFO]: [com.zaxxer.hikari.HikariDataSource] HikariPool-2 - Starting...
[06:44:38] [Server thread/INFO]: [com.zaxxer.hikari.HikariDataSource] HikariPool-2 - Start completed.
[06:44:38] [Server thread/INFO]: [TokenManager] Loaded DataManager.
[06:44:38] [Server thread/INFO]: [TokenManager] Loaded ShopListener.
[06:44:38] [Server thread/INFO]: [TokenManager] Successfully hooked into 'PlaceholderAPI'!
[06:44:38] [Server thread/INFO]: [TokenManager] Successfully hooked into 'Vault'!
[06:44:38] [Server thread/INFO]: [TokenManager] Loaded HookManager.
mibby commented 6 years ago

Fixed via https://github.com/RealizedMC/TokenManager/commit/a27220e1aee6f55ed9aeaf9ec22391c08b18556a