player cant shoot themself

Discussion in 'Plugin Requests' started by bardiamgtgc, May 30, 2020.

Thread Status:
Not open for further replies.
  1. Offline

    bardiamgtgc

    Minecraft version: 1.8.8

    Suggested name: personaunshooter

    What I want: i need a plugin that prevents players from shooting themselves
    i have noticed some kind of bug that player shoots himself on minecart for some reason(guessing a bug) and because its running on a one shot one kill plugin they die immediately

    When I'd like it by: in a day or two if possible
     
  2. Offline

    Jonnyfant

    I can make that, however not sure on how well it works together with your one hit=kill Plugin.
     
  3. Offline

    bardiamgtgc

    i would really appreciate it
     
  4. Offline

    Jonnyfant

  5. Offline

    KarimAKL

    @Jonnyfant This is just an idea but, if it's not compatible with the other plugin, or the arrow still hits them without damaging them, you could try listening to the ProjectileLaunchEvent, then cancel it and spawn the arrow a little distance further away with the same velocity.
     
    Legendary_zotar likes this.
  6. Offline

    Jonnyfant

    Good idea. I went for the easy route of cancelling EntityDamagedByEntity event if the source is an Arrow and Damager and Damagee are the same. I imagine that the other plugin would also listen to that event and either crank up the damage or simply set Health to 0.
    Since your approach (at least how I imagine) might decrease accuracy I thought it might be better to just try the easy way. If that doesn't work, I could set the Priority to High, or even simply add the one shot one kill part.

    (When your post was visible, I already posted the link to the plugin which was finished at the time)

    Since it was so simple, I quickly added a config file to choose the priority the Plugin is running on.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 31, 2020
  7. Offline

    Jonnyfant

    The file is now available.
     
  8. Offline

    bardiamgtgc

    thanks!
     
Thread Status:
Not open for further replies.

Share This Page