PlayPro / CoreProtect

CoreProtect is a blazing fast data logging and anti-griefing tool for Minecraft servers.
Artistic License 2.0
681 stars 346 forks source link

Purge command with conditions #4

Open LogGits opened 6 years ago

LogGits commented 6 years ago

It would be a great addition and I am certain a lot of people are in need of this. Purge command should have conditions/parameters. Currently in CoreProtect2 it only purges with time based argument. It should work in the same way as rollbacks where you can specify a u: a: r: t: b: etc. This way we can do in depth purging.

Intelli commented 3 years ago

Worlds can now be specified in CoreProtect v19+.

Example Command: /co purge t:30d r:#world_nether

LogGits commented 3 years ago

Hey that's great news could we get the action, block, and user aswell, having it consistent with the co l command would be the best way to handle

Intelli commented 3 years ago

It may be ideal to handle this similarly to the #preview parameter, including with a confirmation page.

(Console support would need to be added)

Spikey84 commented 2 years ago

I am attempting add the other arguments. It may take a bit of time but i am going give it a shot. So far I made some changes so some action args can be accepted. I do this by taking the purgeTables and changing it based on provided actions. One question I have is what is the significance of worldTables? Is it just a list of tables that relate to a world? My work on this is taking place on here ill make a PR once it is in a cleaner format and I am sure it works as intended.

Ceddix commented 2 years ago

It would be also really practical to implement a block count or #worldedit to the radius (r:) parameter. I have some places where I have several thousand pages of block entries just spread over a few blocks. I would like to get rid of these in order to minimise memory usage.

molor commented 1 year ago

One more vote for adding r: parameter. Players who dig snowballs using snow golems "locked" on 1 block can easily fill up a database in a few hours, just standing still with a shovel in hand.

molor commented 1 year ago

(please :c)