Closed JoMiNovi closed 5 months ago
Hi, try delaying the request of 500 ms.
Doesn't work :) I've tried ScheduledExecutorService and Thread.sleep. When using ScheduledExecutorService, no "Failed to format placeholders for player" is displayed anymore. With Thread.sleep the error is shown, but both solutions don't work. I always get the unformatted message.
Look at the code of velocitab, hope this helps. https://github.com/WiIIiam278/Velocitab/blob/master/src/main/java/net/william278/velocitab/hook/PAPIProxyBridgeHook.java
I successfully addressed the formatting issue by creating a custom bridge plugin. While working on it, I discovered a potential limitation with PAPIProxyBridge. It seems using onConnect doesn't provide the server information needed for formatting. My plugin utilizes onPostConnect to resolve this, and I believe it might be a suitable solution for PAPIProxyBridge as well.
Thanks, JoMiNovi
Hello, I'm new to programming Minecraft Java plugins. I wanted to use your PAPIProxyBridge in a plugin of mine. It's for sending a custom message whenever a player joins or leaves my Velocity proxy. When I don't use PAPI Placeholders in the config everything works fine. But when joining with PAPI Placeholders in the config, the message is sent unformatted. In the console, I get this error: "[myplugin]: Failed to format placeholders for JoMiNovi" Now I wanted to ask, how I can see if the problem is on the ProxyBridge side or if I made a mistake in my code. The PAPIProxyBridge Plugin (V1.5) is installed on the backend paper server and the velocity proxy.
This is a piece of the code of my plugin, where PAPIProxyBridge is used: