Class ExprSourceLocation
java.lang.Object
ch.njol.skript.lang.util.SimpleExpression<org.bukkit.Location>
ch.njol.skript.expressions.base.PropertyExpression<org.bukkit.damage.DamageSource,org.bukkit.Location>
ch.njol.skript.expressions.base.SimplePropertyExpression<org.bukkit.damage.DamageSource,org.bukkit.Location>
org.skriptlang.skript.bukkit.damagesource.elements.ExprSourceLocation
- All Implemented Interfaces:
Debuggable
,Expression<org.bukkit.Location>
,Loopable<org.bukkit.Location>
,Simplifiable<Expression<? extends org.bukkit.Location>>
,SyntaxElement
,DamageSourceExperimentSyntax
,Converter<org.bukkit.damage.DamageSource,
,org.bukkit.Location> ExperimentalSyntax
,SimpleExperimentalSyntax
,RuntimeErrorProducer
,SyntaxRuntimeErrorProducer
@Name("Damage Source - Source Location")
@Description({"The final location where the damage was originated from.","The \'source location\' for vanilla damage sources will retrieve the \'damage location\' if set. If \'damage location\' is not set, will attempt to grab the location of the \'causing entity\', otherwise, null."})
@Example("on death:\n\tset {_location} to the source location of event-damage source\n")
@Since("2.12")
@RequiredPlugins("Minecraft 1.20.4+")
public class ExprSourceLocation
extends ch.njol.skript.expressions.base.SimplePropertyExpression<org.bukkit.damage.DamageSource,org.bukkit.Location>
implements DamageSourceExperimentSyntax
-
Field Summary
Fields inherited from class ch.njol.skript.expressions.base.SimplePropertyExpression
rawExpr
Fields inherited from class ch.njol.skript.expressions.base.PropertyExpression
DEFAULT_PRIORITY
Fields inherited from interface org.skriptlang.skript.lang.converter.Converter
ALL_CHAINING, ALLOW_UNSAFE_CASTS, NO_CHAINING, NO_LEFT_CHAINING, NO_RIGHT_CHAINING
Fields inherited from interface org.skriptlang.skript.bukkit.damagesource.DamageSourceExperimentSyntax
EXPERIMENT_DATA
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class ch.njol.skript.expressions.base.SimplePropertyExpression
get, init, toString
Methods inherited from class ch.njol.skript.expressions.base.PropertyExpression
get, get, getAll, getAnd, getDefaultPatterns, getExpr, getPatterns, isSingle, register, register, registerDefault, registerDefault, setExpr, simplify
Methods inherited from class ch.njol.skript.lang.util.SimpleExpression
acceptChange, change, check, check, check, getArray, getConvertedExpr, getConvertedExpression, getNode, getSingle, getSource, getTime, isDefault, isLoopOf, iterator, preInit, setTime, setTime, setTime, setTime, setTime, supportsLoopPeeking, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.skriptlang.skript.bukkit.damagesource.DamageSourceExperimentSyntax
getExperimentData
Methods inherited from interface ch.njol.skript.lang.Expression
beforeChange, canBeSingle, canReturn, changeInPlace, changeInPlace, getAcceptedChangeModes, getOptionalSingle, getSyntaxTypeName, possibleReturnTypes, stream, streamAll
Methods inherited from interface org.skriptlang.skript.log.runtime.RuntimeErrorProducer
error, error, getRuntimeErrorManager, warning, warning
Methods inherited from interface org.skriptlang.skript.lang.experiment.SimpleExperimentalSyntax
isSatisfiedBy
Methods inherited from interface ch.njol.skript.lang.SyntaxElement
getParser, init, preInit
Methods inherited from interface org.skriptlang.skript.log.runtime.SyntaxRuntimeErrorProducer
getErrorSource
-
Constructor Details
-
ExprSourceLocation
public ExprSourceLocation()
-
-
Method Details
-
convert
@Nullable public @Nullable org.bukkit.Location convert(org.bukkit.damage.DamageSource damageSource) Description copied from interface:Converter
Converts an object using this Converter.- Specified by:
convert
in interfaceConverter<org.bukkit.damage.DamageSource,
org.bukkit.Location> - Specified by:
convert
in classch.njol.skript.expressions.base.SimplePropertyExpression<org.bukkit.damage.DamageSource,
org.bukkit.Location> - Parameters:
damageSource
- The object to convert.- Returns:
- The converted object.
-
getReturnType
Description copied from interface:Expression
Gets the return type of this expression.- Specified by:
getReturnType
in interfaceExpression<org.bukkit.Location>
- Returns:
- A supertype of any objects returned by
Expression.getSingle(Event)
and the component type of any arrays returned byExpression.getArray(Event)
-
getPropertyName
- Specified by:
getPropertyName
in classch.njol.skript.expressions.base.SimplePropertyExpression<org.bukkit.damage.DamageSource,
org.bukkit.Location>
-