Pickup Skeleton Arrows

Discussion in 'Archived: Plugin Requests' started by TheNoobWar, Jan 29, 2012.

  1. Offline

    TheNoobWar

    Plugin category: FUN/MECH

    Suggested name: SkeletonPickup
    A bit about me: I'm a server owner and I really like getting plugins off bukkit :p.

    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.
     
    Last edited by a moderator: May 23, 2016
  2. Offline

    TheNoobWar

  3. Offline

    Gangsta_hotdog

    Bump. I like this idea, it could be useful for my server. :D
     
  4. Offline

    TheNoobWar

    I know riiiight :p this would be a cool feature, especially for donators I suppose!
     
  5. Offline

    ThatBox

    I suppose there is a way to do this. But I am busy with other things :/
     
  6. Offline

    TheNoobWar

    Alright, nice to know at least a developer says this is do-able :D
     
    ThatBox likes this.
  7. Offline

    mushroomhostage

    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.
     
    TheNoobWar and Ice_Sword like this.
  8. Offline

    Ice_Sword

    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.
     
  9. Offline

    TheNoobWar

    Great news to hear thanks guys :)
     
  10. Offline

    Gangsta_hotdog

    Also really looking forward to this. :D
     
  11. Offline

    Ice_Sword

    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. :(
     
  12. Offline

    TheNoobWar

    Alright no biggy :)
     
  13. Offline

    Ice_Sword

    I just wanted to let you know, I'm still working on it. I had a crazy weekend and didn't make any progress.
     
  14. Offline

    TheNoobWar

    Alright thanks.
     
  15. Offline

    Ice_Sword

    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.
     
  16. Offline

    TheNoobWar

    Haha alright :p
     
  17. Offline

    Ice_Sword

    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. :p
     
  18. Offline

    TheNoobWar

    Hehe I saw what you did there, I hope you can exterminate them ;)
     
  19. Offline

    TheNoobWar

  20. Offline

    mushroomhostage

    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.
     
    TheNoobWar likes this.
  21. Offline

    TheNoobWar

    Thank you good sir.
     

Share This Page