Package ch.njol.skript.lang.util.common
Interface AnyNamed
- All Superinterfaces:
AnyProvider
- All Known Implementing Classes:
Config,CursorSlot,DisplayEntitySlot,DroppedItemSlot,DynamicFunctionReference,EntryNode,EquipmentSlot,InvalidNode,InventorySlot,ItemFrameSlot,ItemType,Node,Script,SectionNode,SimpleNode,Slot,SlotWithIndex,ThrowableProjectileSlot,VoidNode
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
@Deprecated(since="2.13",
forRemoval=true)
public interface AnyNamed
extends AnyProvider
Deprecated, for removal: This API element is subject to removal in a future version.
A provider for anything with a (text) name.
Anything implementing this (or convertible to this) can be used by the
PropExprName
property expression.- See Also:
-
Method Summary
Modifier and TypeMethodDescription@UnknownNullability Stringname()Deprecated, for removal: This API element is subject to removal in a future version.default voidDeprecated, for removal: This API element is subject to removal in a future version.The behaviour for changing this thing's name, if possible.default booleanDeprecated, for removal: This API element is subject to removal in a future version.This is called beforesetName(String).
-
Method Details
-
name
@UnknownNullability String name()Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- This thing's name
-
supportsNameChange
default boolean supportsNameChange()Deprecated, for removal: This API element is subject to removal in a future version.This is called beforesetName(String). If the result is false, setting the name will never be attempted.- Returns:
- Whether this supports being set
-
setName
Deprecated, for removal: This API element is subject to removal in a future version.The behaviour for changing this thing's name, if possible. If not possible, thensupportsNameChange()should return false and this may throw an error.- Parameters:
name- The name to change- Throws:
UnsupportedOperationException- If this is impossible
-
Property.NAMEinstead.