Plugin category: FUN/MECH Suggested name: SkeletonPickup A bit about me: I'm a server owner and I really like getting plugins off bukkit . What I want: I'd like to have a plugin that allows some players (allowed if have permissions) to grab arrows shot from skeletons. Ideas for commands: No commands needed for this plugin. But it's up to you. Ideas for permissions: SkeletonPickup.allow (this allows the player to pick up the entity arrow shot by a skeleton) Willing to pay up to: $0 When I'd like it by: ASAP ThatBox ? EDIT by Moderator: merged posts, please use the edit button instead of double posting.
FWIW, I looked into this. Got as far as making all allows pickup-able, which is simple enough: Code: @EventHandler(priority = EventPriority.NORMAL) public void onProjectileHit(ProjectileHitEvent event) { Entity entity = event.getEntity(); if (!(entity instanceof Arrow)) { return; } Arrow arrow = (Arrow)entity; ((CraftArrow)arrow).getHandle().fromPlayer = true; The only complexity is in adding permission support, so only certain players can pickup arrows. By itself, the fromPlayer (misnomer, really means "can be picked up", since its also cleared for Infinity-bow fired arrows) cannot specify who is allowed – I suppose one could register PlayerPickupItemEvent so only permitted users could pickup the arrows. Should definitely be possible, alas, I did not investigate further.
I'll give a crack at it. Should have it back to you in the next day or two if everything goes well. I'm a newish developer, so, yeah. I'll post back when I either have it done, or am terribly stuck and may not finish.
Um, I'm having trouble with it. I'm still working on it though. I'll post/PM you whenever it's done. It just may be more than the day or two I had promised. Sorry.
I just wanted to let you know, I'm still working on it. I had a crazy weekend and didn't make any progress.
I have an INCREDIBLY buggy version. I'm trying to work out the bugs. EDIT: And I don't have permissions set up yet. And, based on my progress, I hope I'll get the bugs ironed out by the end of, erm, today.....It's late... >.> I'm going to bed.
Bug multiply....did you know they multiply? And they run around and hide under other bits of code. Nasty critters. I'm still working on an exterminator.
I took a stab at this, since someone else asked for it too. The permissions don't work exactly as requested, but hopefully its close enough. Rather than trying to solve the problem of checking whether the player has permission to pick up (which I don't know how to feasibly solve - maybe someone else has some ideas?), I set the pickup-ability when the arrow is shot, if a player is nearby with sufficient permissions. http://dev.bukkit.org/server-mods/pickuparrows/files/1-pickup-arrows-1-0/ Source included, if anyone wants to improve it.