snowgears / shopbugs

Shop bug tracker
8 stars 4 forks source link

[BUG] Shop keeps "restarting" #440

Closed 95-inf closed 1 month ago

95-inf commented 2 months ago

Is there an existing issue for this?

Type of bug

Other unexpected behaviour

Environment

- Server Version: Paper 1.21
- Shop Version: 1.9.0.1

Server startup log

https://paste.gg/p/anonymous/4231c53d475e4e7baae786e3eaf76beb

Shop config files

https://paste.gg/p/anonymous/ee57861cc6874fd588eb5f2fcc5658ec

Error log (if applicable)

No response

Bug description

Shop keeps "restarting" - the console is being spammed with the below every ~20 seconds:

[19:20:05 INFO]: [Shop] Shops will use diamond as the currency on the server.
[19:20:05 INFO]: [Shop] Using default display class - com.snowgears.shop.display.Display

It makes the shop display disappear every time the message is sent in console, as if the plugin is restarting.

Steps to reproduce

  1. Create a shop
  2. Wait for the console message
  3. See that the sign display "reloads"

Expected behaviour

The message should not occur in the console every 20 seconds and the display signs should not reload.

Actual behaviour

The console is being spammed with

[19:20:05 INFO]: [Shop] Shops will use diamond as the currency on the server.
[19:20:05 INFO]: [Shop] Using default display class - com.snowgears.shop.display.Display

It makes the shop display disappear every time the message is sent in console.

Other information

No response

95-inf commented 2 months ago

It looks like I have found the cause.

Setting the Bluemap integration to false stopped the plugin from "reloading".

# If you use BlueMap, this controls how shops show up as markers #
bluemap-marker:
  enabled: false
  icon: 'https://i.imgur.com/oCI3XJC.png'
  label: 'Item: [item](x[item amount])\n\nOwner: [owner]\n\nType: [shop type]\n\nPrice: [price]\n\nStock: [stock]'
  minDistance: 0
  maxDistance: 500
OstlerDev commented 2 months ago

Able to properly reproduce the bug, and I have fixed it. BlueMap was causing a reload of the full plugin periodically, this has been changed so that the BlueMap integration will wait until BlueMap has booted before hooking into it.

Fix will be included in v1.9.1.0