BentoBoxWorld / BentoBox

Expandable Minecraft server plugin for island-type games like SkyBlock or AcidIsland.
https://bentobox.world
Eclipse Public License 2.0
328 stars 137 forks source link

deleting islands without a owner after x days (via config, not commands) #1186

Open tastybento opened 4 years ago

tastybento commented 4 years ago

Description

Is your feature request related to a problem?

Players try a server and then never log on again. Their island takes up space and the world grows bigger. You have to manually purge the islands.

Describe the solution you'd like us to implement.

A constant pruning would be good of islands when the player has not logged in after say 10 days.

One issue is that this could remove islands of players who are on vacation or just taking a rest. On ASkyBlock it was linked to the level of the island.

Also, what to do about team islands?

Describe alternatives you've considered.

Purge command on a CRON job :-)

Additional context

Nedjii commented 4 years ago

The purge function from factionsuuid for example kicks players one by one from the team when they didn't log for x days which is good I think, when the last member is kicked the island is removed. It'd put owner of the island the highest member in rank left in the team if the owner is kicked, if 2 or more players are the same highest rank it would be random between both..

Aevox01 commented 4 years ago

My original idea was to delete islands that do not have an owner after 10 days. As long as an island has an owner, there would be no reason to delete them (that's at least how we would like to handle it on our server).

Nedjii commented 4 years ago

So if the owner leaved the server the rest of the team is left without any owner and their island is deleted ?

Aevox01 commented 4 years ago

No, I am talking about island that have been abandoned due to /is reset for example.

Nedjii commented 4 years ago

Islands are deleted when you make a reset...

Aevox01 commented 4 years ago

You can disable that in the options.

Nedjii commented 4 years ago

What's the point of disabling the removal of unused islands to make a purge task to delete them ?

Aevox01 commented 4 years ago

The fact that players might rethink their choice on resetting their island or maybe one of their siblings used their account to reset the island. It's just some working around the worst cases.

Poslovitch commented 4 years ago

Sort of related to #167.

tastybento commented 4 years ago

@Aevox01 's request is definitely different to this enhancement. Right now, islands are deleted about 5 seconds after the player gets their new island. Then the spot can be reused after the next server reset. What @Aevox01 's request is that this doesn't happen and instead the islands are kept so that it could be possible to go back to them in some situations. @BONNe a while ago suggested an option where islands were not deleted and instead we relied on purging. I don't recall why, but this is similar. It could be done. I'm not sure what the implications are, but I recommend it becomes its own enhancement request. I made one here: https://github.com/BentoBoxWorld/BentoBox/issues/1188

This one is geared around auto purging. One other question is around island level. In ASkyBlock I didn't purge any island over level 10. This was because I wanted to keep "cool" islands around that players could see and visit via warps, even if the player had long stopped playing. With Bentobox, Level is not hardwired in, so it could be checked if it existed, but maybe there's some other metric. For example, we know when an island is created so if someone plays for say > 30 days then we can assume they put in some effort and leave the island as is instead of purging it? This could be configurable. Thoughts?

Poslovitch commented 4 years ago

Just so you know, I have heard quite some time ago that a few servers encountered an issue with a similar feature in PlotMe/PlotSquared.

Basically, PlotMe or PlotSquared did not follow the "do not trust time" rule (and we do not either). The NTP server the concerned servers were using had an issue. And it basically led to a jump in time of a few years (e.g. they went from 2017 to 2020 within seconds). A lot of plots were consequently considered "inactive" and the automated deletion kicked in.

Said servers fortunately had backups but such an event would have been irrecoverable otherwise. Moreover, in the case of said servers, it was the result of a bug in the NTP server (I think it was some sort of edge case in the protocol that got fixed later that year), yet it could also be the result of a malicious intent.

Nedjii commented 4 years ago

There could be multiple settings like if the player played 30 days he's purged from the island after x days and if he played 60 days that's y days, factionsuuid also has such a feature. You could kick all members one by one, only purging when the full team is inactive could lead to one member alone unable to use the island as he's only rank member, saw that a lot of times paste two years.