How do i make it so admins can't drop items using q or whatever so others can't get items from them And how do i make admins not drop items on death
What you would do would be add the admins to a hashmap or in a config and then when a drop event happens check if it is an admin the if it is cancel the event
Here's a fast made version of your request. Can't debug on this computer, suprised it could even compile it. You may have issues, but you might not. I'll relook when I return home. @greg_t Why would you need a hashmap or anything that complex? Just use permissions. Its already integrated into the normal system, and there is no longer a 'need' for a config. Also, I didn't see a cancel for onEntityDeath so I just cleared the drops. Permissions. AdminDrop.AllowDeath = allow drops on death. AdminDrop.AllowDrop = Allow 'q' button dropping. Zip is the plugin.jar as well as the source.
Not very descriptive... I think. What appears to be the issue? Any errors/etc? If it didn't work, I apologize. I had to write it from memory and it's had no previous testing.
@Zaros no there's no error but when i kill a player he drops items also i've tried it with giving permission too.
On an other note, how will admins prevent inventory clogging? If you can't drop stuff, and you can't lose stuff when you die, you will end up with a filled inventory fairly quickly.
If it worked correctly they would lose everything on death, but nothing would appear. @lastern I'll work on it the next time I have an opportunity.
@tom Yes, this plugin isn't supposed to negate that. It just prevents players from "dropping" items. Maybe tom's idea could be a future addition, @Zaros ? Could have potential for a full-fledged, yet sort and concise, plugin. Also, the DL isn't working for me.
@TechnoCraft Is 'Admin' the highest rank on your server? I take you're wanting this plugin because you don't want your Admins spawning items and giving it to Builders, Donators, etc. If so, you know they can just do /give <username> <item> (if they have access)