DarkN3ss submitted a new plugin: ItemSpawn - Respawn with Items every time! Read more about this plugin...
Damn, I made this plugin last week. I know I should have uploaded it. I think there is already a plugin that allows you to keep items when you die.
DarkN3ss updated ItemSpawn with a new update entry: Fixes crashs Read the rest of this update entry...
This sounds like a great plugin but if I have armor in the respawn thing will the armor equip to you body? Because if it didn't that would be awesome if it did
Replace the function giveItems with this code, or just download the attached file. I try to keep my coding style as close to the author's as possible, but feel free to change it around. Code: foreach ($items['Items'] as $val) { // Armor support added by LDX if(is_numeric($val[0]) and $val[0] === 298 or $val[0] === 302 or $val[0] === 306 or $val[0] === 310 or $val[0] === 314) { $player -> setArmor(0, $this -> api -> block -> getItem($val[0])); } else if(is_numeric($val[0]) and $val[0] === 299 or $val[0] === 303 or $val[0] === 307 or $val[0] === 311 or $val[0] === 315) { $player -> setArmor(1, $this -> api -> block -> getItem($val[0])); } else if(is_numeric($val[0]) and $val[0] === 300 or $val[0] === 304 or $val[0] === 308 or $val[0] === 312 or $val[0] === 316) { $player -> setArmor(2, $this -> api -> block -> getItem($val[0])); } else if(is_numeric($val[0]) and $val[0] === 301 or $val[0] === 305 or $val[0] === 309 or $val[0] === 313 or $val[0] === 317) { $player -> setArmor(3, $this -> api -> block -> getItem($val[0])); } else { $player -> addItem($val[0], $val[1], $val[2]); } }
Add the code that existed in the original SpawnWithItems that checks if your armor slot is full, (It actually checks your inv, but I think you can fix that) If you use this, it replaces the armor in the current slot. Example. I lost my diamond armor. A full set