-
Notifications
You must be signed in to change notification settings - Fork 3
Player Inactivity
The plugin can automatically clean up the shops of players who have not logged in for a long time. This feature is disabled by default.
See Configuration for details. Relevant settings:
-
player-shopkeeper-inactive-days(default:0, disabled): The number of days a player's last login has to be in the past for them to be considered inactive.
The plugin checks for inactive players shorty after plugin startup, and then again roughly every few hours.
The plugin uses the last login time that the server records in its player data files. If that information is not available for a player (e.g. some servers deliberately delete player data files), the plugin cannot reliably identify their inactivity state and therefore does not process their shops.
Only the activity of the shop owner matters. The activity of other shop members has no effect.
Normal player shops are deleted. Their containers and contents remain in the world, but they are no longer protected by the plugin.
If hired-player-shop-expiration-days is enabled, hired shops revert to the for-hire state instead of being deleted. Any shops that are already for hire are not affected by this feature. The inactive player remains the shop owner until the shop is hired. See Hireable Player Shops and Player Shop Expiration.
Every deletion and for-hire reversion is logged to the server log.
-
PlayerInactiveEvent: Called for every inactive player whose shops are about to be deleted or reverted to the for-hire state.
The event is cancellable, and the collection returned by#getShopkeepers()can be modified to exclude individual shops from the processing.
If hired shops revert to their for-hire state, the event is not called for owners whose remaining shops are all already for hire, because those shops are not affected.
Wiki Home | Bukkit | Spigot | Language Files | Source Code | Issues | Discord