Class ExprFoodExhaustion

java.lang.Object
ch.njol.skript.lang.util.SimpleExpression<Float>
ch.njol.skript.expressions.base.PropertyExpression<org.bukkit.damage.DamageSource,Float>
ch.njol.skript.expressions.base.SimplePropertyExpression<org.bukkit.damage.DamageSource,Float>
org.skriptlang.skript.bukkit.damagesource.elements.ExprFoodExhaustion
All Implemented Interfaces:
Debuggable, Expression<Float>, Loopable<Float>, Simplifiable<Expression<? extends Float>>, SyntaxElement, DamageSourceExperimentSyntax, Converter<org.bukkit.damage.DamageSource,Float>, ExperimentalSyntax, SimpleExperimentalSyntax, RuntimeErrorProducer, SyntaxRuntimeErrorProducer

@Name("Damage Source - Food Exhaustion") @Description("The amount of hunger exhaustion caused by a damage source.") @Example("on damage:\n\tif the food exhaustion of event-damage source is 10:\n") @Since("2.12") @RequiredPlugins("Minecraft 1.20.4+") public class ExprFoodExhaustion extends ch.njol.skript.expressions.base.SimplePropertyExpression<org.bukkit.damage.DamageSource,Float> implements DamageSourceExperimentSyntax
  • Constructor Details

    • ExprFoodExhaustion

      public ExprFoodExhaustion()
  • Method Details

    • convert

      @Nullable public @Nullable Float convert(org.bukkit.damage.DamageSource damageSource)
      Description copied from interface: Converter
      Converts an object using this Converter.
      Specified by:
      convert in interface Converter<org.bukkit.damage.DamageSource,Float>
      Specified by:
      convert in class ch.njol.skript.expressions.base.SimplePropertyExpression<org.bukkit.damage.DamageSource,Float>
      Parameters:
      damageSource - The object to convert.
      Returns:
      The converted object.
    • getReturnType

      public Class<Float> getReturnType()
      Description copied from interface: Expression
      Gets the return type of this expression.
      Specified by:
      getReturnType in interface Expression<Float>
      Returns:
      A supertype of any objects returned by Expression.getSingle(Event) and the component type of any arrays returned by Expression.getArray(Event)
    • getPropertyName

      protected String getPropertyName()
      Specified by:
      getPropertyName in class ch.njol.skript.expressions.base.SimplePropertyExpression<org.bukkit.damage.DamageSource,Float>