hello, i would love to have a plugin that keeps track of how many ores there are of each kind, and sending them to a webserver, my site, daily. Pim
This may cause major lag, crashes, and in some cases map corruptions. Though it is do-able. However, for it to send it to your webserver then you would either have to use a mysql database or use a php data plugin.
but, euhm... aren't there any ways for it to go faster? laod it all once and after that one time only keeping track of the blocks that are broken and send it to the webserver every 24 hours?
The algorithm isn't so bad. For every chunk that is loaded, see if we have a database entry with the ore data for that chunk. If not, scan the chunk, counting every type of ore. Store it in the database. Every time a block is broken, if its one of the ores we track, decrement the amount in the database record. Interfacing with a webserver isn't so hard. Could drop html into directory, or provide an API to read the data from the plugin, or just have a php script access the db directly. There are a lot more intensive plugins than that out there.