I run a family Minecraft server. I use Craftbukkit for the server as it allows adding plugins without the need to unzip jars, etc.
One of the plugins called Savage Death Chest automatically put your items into chests so they are not lost upon death. This is great however finding the chest can be a pain.
I discovered the plugin uses a small sqllite database (deathchests.db) file for storing deaths including X, Y, Z coordinates. Eureka!
I wrote an SH script file to interrogate the file for the latest coordinates and display them in the terminal.
Then it's simply a case of executing the Minecraft TPC command for teleporting to the spot:
/tpc X Y Z
Note: Be careful with the Y coordinate as you may teleport into a rock or into water. It may be worth adding 10 to the Y coordinate to be sure you above the chest.
The SH file is quite simple:
sqlite3 /Minecraft/CraftBukkit\ Server/plugins/SavageDeathChest/deathchests.db 'select x, y, z from blocks where blockid = (select max(blockid) from blocks)'
Note: You may need to install sqllite to get this to work
No comments:
Post a Comment