Make Java-like PvP

Discussion in 'Development' started by ethaniccc, Apr 19, 2020.

  1. ethaniccc

    ethaniccc Baby Zombie

    Messages:
    185
    GitHub:
    ethaniccc
    I'm trying to make 1.8 Java PvP style in my KitPvP server, and I used setAttackCooldown to remove the attack cooldown. The thing is, the knockback goes crazy and I die within 2 seconds of my friend clicking 15 cps on me @[email protected] I tried to reduce the knockback the player being attacked receives, but it's still not like how Java PvP is. Anything that I should add to make a 1.8-like PvP experience?
     
    Last edited: Apr 19, 2020
  2. Muqsit

    Muqsit Chicken

    Messages:
    1,549
    GitHub:
    muqsit
    The default value of attack cooldown is 10 ticks meaning your friend with 15cps will only land 2 hits in one second.
    If you change the value of attack cooldown to anything else, you're making it less "Java-like".
     
  3. ethaniccc

    ethaniccc Baby Zombie

    Messages:
    185
    GitHub:
    ethaniccc
    Should've mentioned I want it to be like 1.8 pvp (which I heard has no cooldown)
     
  4. Muqsit

    Muqsit Chicken

    Messages:
    1,549
    GitHub:
    muqsit
    1.8 has a cooldown of 10 ticks, same as bedrock edition (the 1.9 combat updates weren't added to bedrock edition).
     
    ethaniccc and HimbeersaftLP like this.
  5. Muqsit

    Muqsit Chicken

    Messages:
    1,549
    GitHub:
    muqsit
    You probably would want to reduce the knockback when in air. A $player->isOnGround() check may help.
     
    ethaniccc likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.