tebexio / Tebex-Minecraft

The new Tebex plugin for Minecraft, supporting Bukkit, Bungeecord, Velocity, Spigot, and PaperSpigot
https://tebex.io
GNU General Public License v3.0
14 stars 31 forks source link

{placeholderName} isn't replaced + package is marked as expired even when it's not set #41

Closed bobhenl closed 3 months ago

bobhenl commented 4 months ago

Please include the following information with your report

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. @WildBamaBoy yeah I received another payment & {packageName} isn't really replaced. {packageName} The name of the package. From variables help menu I tried using it on the https://creator.tebex.io/game-servers when the package is purchased, but it doesn't get replaced in-game.

Transaction ID efb83ff01dfa592806dbad99dfd0ef700de53916 OR tbx-4075924a58554-f392b1 doesn't work for any I think it's due to this: image But I want to send the whole list in this message, is it possible then? Like separate the packages with comma. broadcast !&c&lWebstore &f» &7Player &e{username} &7donated the server &e{packageName} &7for &e{price}$&7.

Cause when I have the message on package removal and it's executed per package, it normally replaces {packageName} image

Also one more question, when I have set this for example under this package Never remove the package: image and the package is purchased, it still executes the image when the package is removed command.

I guess it shouldn't execute it as there's that it never remove the package? Why it's happening?

Debug to the issue:

[17:06:54] [Craft Scheduler Thread - 2698 - Tebex/INFO]: [Tebex] [DEBUG] Checking for due players..
[17:06:54] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG]  -> GET https://plugin.tebex.io/queue | No body
[17:06:54] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG] 200 <- GET https://plugin.tebex.io/queue 
[17:06:54] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG]  | {"meta":{"execute_offline":false,"next_check":60,"more":false},"players":[{"id":12133228,"name":"MrComega","uuid":null},{"id":12203987,"name":"RoundLion051784","uuid":null},{"id":3438209,"name":"Renzotom","uuid":null}]}
[17:06:54] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG] Found 3 players with pending commands.
[17:06:54] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG] Processing online commands for player 'MrComega'...
[17:06:54] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG] Player MrComega has online commands but is not connected. Skipping.
[17:06:54] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG] Processing online commands for player 'RoundLion051784'...
[17:06:54] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG] Player RoundLion051784 has online commands but is not connected. Skipping.
[17:06:54] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG] Processing online commands for player 'Renzotom'...
[17:06:54] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG]  -> GET https://plugin.tebex.io/queue/online-commands/3438209 | No body
[17:06:55] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG] 200 <- GET https://plugin.tebex.io/queue/online-commands/3438209 
[17:06:55] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG]  | {"player":{"id":"00000000000000000000001748CE5F99","username":"Renzotom","meta":null},"commands":[{"id":564125074,"command":"crates givecrate Monthly {id} 1","payment":72185566,"package":6135539,"conditions":{"delay":0,"slots":1}},{"id":564125075,"command":"lp user {id} permission set surveyplus.survey.start.4","payment":72185566,"package":6135539,"conditions":{"delay":0,"slots":0}},{"id":564125076,"command":"lp user {id} permission set surveyplus.survey.start.5","payment":72185566,"package":6135539,"conditions":{"delay":0,"slots":0}},{"id":564125077,"command":"mail send {id} &eYour package &fMonthly Crate &ewith length of &f0 &ehas expired. You can renew it in the &f\/store&e.","payment":72185566,"package":6135539,"conditions":{"delay":0,"slots":0}},{"id":564125078,"command":"broadcast !&c&lWebstore &f\u00bb &7Player &e{username} &7donated the server &e{packageName} &7for &e0$&7.","payment":72185566,"package":null,"conditions":{"delay":0,"slots":0}}]}
[17:06:55] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG] Found 5 online commands.
[17:06:55] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG]  -> DELETE https://plugin.tebex.io/queue | {
  "ids": [
    564125074,
    564125075,
    564125076
  ]
}
[17:06:55] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG]  -> DELETE https://plugin.tebex.io/queue | {
  "ids": [
    564125077,
    564125078
  ]
}
[17:06:55] [Server thread/INFO]: [Tebex] Dispatching command 'crates givecrate Monthly Renzotom 1' for player 'Renzotom'.
[17:06:55] [Server thread/INFO]: SUCCESS! Given physical crate for crate: Monthly
[17:06:55] [Server thread/INFO]: [Tebex] Dispatching command 'lp user Renzotom permission set surveyplus.survey.start.4' for player 'Renzotom'.
[17:06:55] [Server thread/INFO]: [Tebex] Dispatching command 'lp user Renzotom permission set surveyplus.survey.start.5' for player 'Renzotom'.
[17:06:55] [Server thread/INFO]: [LP] Another command is being executed, waiting for it to finish...
[17:06:55] [Server thread/INFO]: [Tebex] Dispatching command 'mail send Renzotom &eYour package &fMonthly Crate &ewith length of &f0 &ehas expired. You can renew it in the &f/store&e.' for player 'Renzotom'.
[17:06:55] [luckperms-command-executor/INFO]: [LP] renzotom already has surveyplus.survey.start.4 set in context global.
[17:06:55] [Server thread/INFO]: Mail sent to Renzotom
[17:06:55] [Server thread/INFO]: [Tebex] Dispatching command 'broadcast !&c&lWebstore &f» &7Player &eRenzotom &7donated the server &e{packageName} &7for &e0$&7.' for player 'Renzotom'.
[17:06:55] [luckperms-command-executor/INFO]: [LP] renzotom already has surveyplus.survey.start.5 set in context global.
[17:06:55] [Server thread/INFO]: Webstore » Player Renzotom donated the server {packageName} for 0$.
[17:06:55] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG] 204 <- DELETE https://plugin.tebex.io/queue 
[17:06:55] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG] 204 <- DELETE https://plugin.tebex.io/queue 
[17:06:55] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG]  | 
[17:06:55] [OkHttp https://plugin.tebex.io/.../INFO]: [Tebex] [DEBUG]  | 

as you see the {packageName} wasn't replaced there where I set it should execute per the whole payment and not just per every package.

bobhenl commented 4 months ago

I can partially solve it by: First issue: Set the command to execute per package, but then it will send the bunch of the messages at once, I'd like rather to separate it by coma

Second issue: Remove the "on package remove" from all of my packages, but I've made it in advance to every of them just in case some of them will be temporary in the future. And I guess when there's set it never expires, then it shouldn't execute this

WildBamaBoy commented 4 months ago

Just wanted to drop an update here that our API team is looking at this and successfully reproduced the problem - it is on our API side, not the plugin. I will keep this issue open until I get confirmation that it is resolved from our API team.

bobhenl commented 4 months ago

Thanks! Yeah I thought that it probably won't be the plugin itself issue, but I wasn't sure where exactly to report it. Thanks for sharing it to them!

WildBamaBoy commented 3 months ago

So the answer here is that when you are executing per payment and not per package, the placeholders available will change from a package context to a transaction context.

These are our available placeholders for per payment transactions:

"transaction"
"price"
"currency"
"time"
"date"
"email"
"ip"
"purchaserName"
"purchaserUuid"
"server"

I do see you have other questions for configuring packages and using the store. Since this repository is only regarding the Minecraft plugin, for the best support I would recommend sending an email with your store questions to our support team at support@tebex.io.