tebexio / Tebex-Minecraft

The new Tebex plugin for Minecraft, supporting Bukkit, Bungeecord, Velocity, Spigot, and PaperSpigot

Home Page:https://tebex.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Geyser/Offline] Placeholder {id} isn't replaced

bobhenl opened this issue · comments

Please include the following information with your report

  • Server type and version (ex. Spigot 1.18.2)
  • Tebex plugin version (ex. 2.0.1)
  • Description of the issue with any error messages, stack traces, or relevant logs.

Purpur 1.20.1
Tebex 20.0.3

Hi, there's issue with replacing placeholders, like I have this command in my store:
lp user {id} parent addtemp gold 1mo accumulate
and it's not being replaced...

in processed commands there's:
lp user 43f296ecd69f8673840d66990de6b49e parent addtemp gold 1mo accumulate

BUT when I look in-game it didn't replace the rank:
lp user 43f296ecd69f8673840d66990de6b49e parent addtemp gold 1mo accumulate

After buying the rank:
[16:01:26] [Server thread/INFO]: [Tebex] Dispatching command 'lp user {id} parent addtemp gold 1mo accumulate' for player 'Peachy_Keen19'.
[LP] A user for {id} could not be found.

After resending the command:
[16:12:28] [Server thread/INFO]: [Tebex] Dispatching command 'lp user {id} parent addtemp gold 1mo accumulate' for player 'Peachy_Keen19'.
[16:12:28] [luckperms-command-executor/INFO]: [LP] A user for {id} could not be found.

Do you think it can be fixed, please?

I guess it's related to the #30

Debug:

[16:22:29] [Craft Scheduler Thread - 8296 - Tebex/INFO]: [Tebex] [DEBUG] Checking for due players..
[16:22:29] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG]  -> GET https://plugin.tebex.io/queue | No body
[16:22:29] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG] 200 <- GET https://plugin.tebex.io/queue 
[16:22:29] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG]  | {"meta":{"execute_offline":false,"next_check":60,"more":false},"players":[{"id":12132492,"name":"Peachy_Keen19","uuid":null}]}
[16:22:29] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG] Found 1 player with pending commands.
[16:22:29] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG] Processing online commands for player 'Peachy_Keen19'...
[16:22:29] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG]  -> GET https://plugin.tebex.io/queue/online-commands/12132492 | No body
[16:22:30] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG] 200 <- GET https://plugin.tebex.io/queue/online-commands/12132492 
[16:22:30] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG]  | {"player":{"id":"43f296ecd69f8673840d66990de6b49e","username":"Peachy_Keen19","meta":null},"commands":[{"id":561162437,"command":"lp user {id} parent addtemp gold 1mo accumulate","payment":71568580,"package":6012688,"conditions":{"delay":0,"slots":0}}]}
[16:22:30] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG] Found 1 online command.
[16:22:30] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG]  -> DELETE https://plugin.tebex.io/queue | {
  "ids": [
    561162437
  ]
}
[16:22:30] [Server thread/INFO]: [Tebex] Dispatching command 'lp user {id} parent addtemp gold 1mo accumulate' for player 'Peachy_Keen19'.
[16:22:30] [luckperms-command-executor/INFO]: [LP] A user for {id} could not be found.
[16:22:30] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG] 204 <- DELETE https://plugin.tebex.io/queue 
[16:22:30] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG]  | 

there is also a post on the https://suggestions.tebex.io/337 nolt board

Thanks for the report and the logs. Apologies that this is a recurring issue. Is anyone experiencing this issue also running Geyser?

I can see that Tebex provides both the username and ID no problem...in 6834c99 as long as the player ID is present we will replace {id}. Again based on these logs the player ID is in the response but for some reason player.getUuid() is not returning the appropriate value...

Yeah, I have geyser on the server as well. But the player buying the package is java player with online uuid (non offline premium players have still the premium uuid on my server). Cannot it be due to it? That player has both offline and online uuid if he's the premium one ( even when he should use the premium one everywhere)? But uses the online one?

Examples - online premium user:
UUID: f056080a-7356-4de9-ac87-39ebe22dfd51 OnlineUUID: f056080a-7356-4de9-ac87-39ebe22dfd51
--> problem is happening for this online user
offline user:
UUID: 207229ba-e0d0-3fc1-a4cc-004417da12aa OnlineUUID: 7b7af4c6-372e-406c-a3b6-cea58fc73ad1

We don't use Geyser but RedisBungee and have 3 Waterfall instances and the same issue, maybe that has something to do with it?

Also do you think that you can send some build where we can test it @WildBamaBoy earlier, please?

You can clone the project & checkout the 2.0.4 Branch.
There is the build.sh which you can run but you have to adjust the version in the build.gradle.kts

alternative you can download it here
https://drive.google.com/drive/folders/1o93d2p07F3gvLV1HLKEmcaYCUOfFnGKb

image
Seems working, although I made the manual payment from the Payments section -> Create payment, and the package name wasn't replaced, not sure why

Just question @WildBamaBoy , shouldn't be UUID still replaced correctly for players with correct online UUID? Like if I have enabled online UUIDs for people with bought Minecraft, then the UUID could work for them in case they change their name or so. Like now it wouldn't make sense to use {uuid} if it get's replaced by player name. It would be good if it can distinguish if the player uses online/offline UUID even on the offline server

image Seems working, although I made the manual payment from the Payments section -> Create payment, and the package name wasn't replaced, not sure why

This should've already been replaced by our API on delivery. Do you have a transaction ID you can share for this? We can look into it further. The plugin will only fill {id}, {name}, {username}, and {uuid}. All other variables should be filled by our API before delivery to the plugin.

Just question @WildBamaBoy , shouldn't be UUID still replaced correctly for players with correct online UUID? Like if I have enabled online UUIDs for people with bought Minecraft, then the UUID could work for them in case they change their name or so. Like now it wouldn't make sense to use {uuid} if it get's replaced by player name. It would be good if it can distinguish if the player uses online/offline UUID even on the offline server

The short answer is that we can't rely on the UUIDs provided by any offline store.

For Geyser servers we're working sometimes with legitimate Mojang UUIDs and other times fake IDs generated by Geyser. We would have to do a Mojang lookup every time someone logs into an Offline store which may not always work.

We understand why this feature is needed but to allow UUIDs sometimes would lead to confusion. This is a point that we have been discussing internally, and we believe the proper solution is for us to build a webstore that can handle multiple username services (in this case Mojang and Xbox Live). We're not there yet, though, but we are aware and investigating solutions for this issue.