No Jump Potion Fall Damage icon

No Jump Potion Fall Damage -----

Prevents fall damage when you have Jump Boost



A super simple plugin that cancels fall damage when you have the jump boost effect.

Code (Java):
package me.datatags.nojumppotionfalldamage ;

import org.bukkit.Bukkit ;
import org.bukkit.entity.EntityType ;
import org.bukkit.entity.Player ;
import org.bukkit.event.EventHandler ;
import org.bukkit.event.Listener ;
import org.bukkit.event.entity.EntityDamageEvent ;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause ;
import org.bukkit.plugin.java.JavaPlugin ;
import org.bukkit.potion.PotionEffectType ;

public class NoJumpPotionFallDamage extends JavaPlugin implements Listener {
   @Override
    public void onEnable ( ) {
       Bukkit. getPluginManager ( ). registerEvents ( this, this ) ;
    }
 
   @EventHandler
    public void onDamage (EntityDamageEvent e ) {
        if (e. getEntityType ( ) != EntityType. PLAYER ) return ;
        if (e. getCause ( ) != DamageCause. FALL ) return ;
       Player player = (Player ) e. getEntity ( ) ;
        if ( !player. hasPotionEffect (PotionEffectType. JUMP ) ) return ;
       e. setCancelled ( true ) ;
    }
}
Resource Information
Author:
----------
Total Downloads: 68
First Release: Jul 24, 2021
Last Update: Jul 24, 2021
Category: ---------------
All-Time Rating:
2 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings