Tradeshop / TradeShop

Unique, new, powerful Minecraft TradeShop plugin!
https://tradeshop.github.io
Apache License 2.0
25 stars 11 forks source link

Shop goes out of stock, and then you fill it back up with an import Hopper, the shop will show <Out Of Stock> until interacted with. #130

Closed KillerOfPie closed 1 year ago

KillerOfPie commented 2 years ago

Reported by RocketManKian#8769 on discord Shop goes out of stock, and then you fill it back up with an import Hopper, the shop will show <Out Of Stock> until interacted with.

KillerOfPie commented 2 years ago

Potential Fix: add new list/cache with <ShopLocation shop, timestamp> set timestamp to x seconds in the future and update the shops status and sign then, list should get processed once every 5-10 seconds and remove any with timestamps before now

KillerOfPie commented 2 years ago

Did not use above potential but if the used fix doesn't work that is still an option.

SparklingComet commented 2 years ago

This may be subject to problems in cases of heavy TPS drops (I think)

KillerOfPie commented 2 years ago

This may be subject to problems in cases of heavy TPS drops (I think)

I thought the same, however, its running code it would have run either way just a couple ticks later(hopefully after the event finished). I also added an if statement so that it only runs when the item movement was allowed so server with it blocked should see an improvement from the change.

SparklingComet commented 2 years ago

This may be subject to problems in cases of heavy TPS drops (I think)

I thought the same, however, its running code it would have run either way just a couple ticks later(hopefully after the event finished). I also added an if statement so that it only runs when the item movement was allowed so server with it blocked should see an improvement from the change.

Hm I guess that if the lag is so severe that this has unintended circumstances, the server probably has bigger problems to worry about...

KillerOfPie commented 2 years ago

This may be subject to problems in cases of heavy TPS drops (I think)

I thought the same, however, its running code it would have run either way just a couple ticks later(hopefully after the event finished). I also added an if statement so that it only runs when the item movement was allowed so server with it blocked should see an improvement from the change.

Hm I guess that if the lag is so severe that this has unintended circumstances, the server probably has bigger problems to worry about...

If this works but causes problems I'll find another solution.

KillerOfPie commented 1 year ago

Fixed in #127