Bug with my DoubleJump plugin - players can fly?

Discussion in 'Plugin Development' started by jxcd, May 18, 2020.

  1. Offline

    jxcd

    Here's the paste of my code:
    https://pastebin.com/YsGcsZYt

    I'm trying to add an item (golden boots to test) which, if worn, lets a player double jump. For some reason, when a player joins they can't fly or double jump, when a player puts golden boots on they can double jump (which is what I want, that all works), but when they take the boots off they can fly. For some reason in my onGround() method, the else statement isn't executing. It's supposed to disable flight/double jump if a player isn't wearing golden boots. It should be a simple else statement, does anyone know what I am doing wrong?
     
  2. Offline

    timtower Moderator Moderator

    @jxcd setFlyOnJump, add an else statement on the first check to disable flying.
     

Share This Page