Minecraft Name Vwman67 Suggestion OK i get it that there has be a little maintenance of players off line to save hard disk space. but i think there needs to be added a filter for star tools. to be overlooked added in there some where. Reason as we have lost on due to it.
Please note: The following is based on my own experiments. ECC might use a different approach to reduce server file space, but this one appears to match the visible effects of ECC's 14-days-offline clear. Minecraft/Spigot stores player-specific data in NBT files. They contain a lot of data, but most importantly the player inventory (and enderchest, which I had to omit from the following examination because I don't have enough time right now). This data can be arranged in a tree. I decided to focus on my own file, d9d1654b-ce73-46dd-a6e8-fcde92b53926.dat. Spoiler: Properly formatted NBT data My inventory contains one minecraft:diamond_pickaxe with an enchant ID of 32 (efficiency) at level VII and an enchant ID 33 (silk touch) at level I. It's possible to read this data when it's formatted like that, but there is a problem. This is what the actual d9d1654b-ce73-46dd-a6e8-fcde92b53926.dat file looks like. Can you find the Eff7? I can't. Okay, I'm not being absolutely truthful here: There is an old NBT format specification at http://web.archive.org/web/20110723210920/http://www.minecraft.net/docs/NBT.txt, which tells us that the data we see is actually a gzip archive. One gzip -d later... This looks much better. However, as the name says, NBT is a Named Binary Tag - which means that parts of our data are actually stored in binary data. Can you find the eff7? It's right here. "lvl[NUL][BEL][STX][NUL][STX]id[NUL] " identifies it as an efficiency 7 pickaxe. Why? Let's convert everything from ASCII to actual binary values. Code: "lvl" NUL 0 BEL 7 STX 2 NUL 0 STX 2 "id" NUL 0 Spacebar 32 Long story short: The BEL byte with the decimal value 7 identifies it as a level 7 enchantment, the spacebar byte with the decimal value 32 identifies it as enchantment ID 32, i.e. efficiency. To summarize, we would need a program that does the following: Unzip the NBT data file. Search for eligible items (pickaxes, shovels, axes, armor, fishing rods, [potentially equipped] elytras [which would then be at a different location in the NBT data]). Search an efficiency enchantment with ID 32 ( ) and level 7 (BEL) to identify an eff7 pickaxe. Search an efficiency enchantment with ID 32 ( ) and level 10 (LF) to identify an eff10 shovel or axe. Search a protection enchantment with ID 0 (NUL) and level 5 (ENQ) to identify prot5 star armor. Search a lure enchantment with ID 62 (>) and level 5 (ENQ) to identify a lure5 fishing rod. Continue searching for every single star shop item in every single inventory slot because I can't be bothered to add another I-don't-even-know-how-many cases for every single star tool to this list. Repeat steps 2-7 for the enderchest contents, which I had to ignore due to a lack of time. Decide whether to delete or skip the file based on the previous tests. Star tools can't just be "overlooked" unless you want to make this even more complicated, so we won't wipe any other items from an inventory that contains a star item. Repeat steps 1-9 for every single user who has been offline for a bit. To be honest: I'd say Jamie has more important things to do than writing a program that evaluates Minecraft's binary data format.
@314 please correct me if I'm wrong. If this program had to do this for every offline player, would it not lag the server?
The effect should be negligible compared to a server that needs to send chunk data to 60-70 players at the same time, handle their movement, chat, commands, inventories and so much more.
as an inactive player i absolutely support the clearing of items... helps the economy a bit and then there's the fact that it's really not that hard to not lose stuff as long as you don't get banned or something with star tools in your inv