Class SlotClassInfo.SlotChanger
java.lang.Object
org.skriptlang.skript.bukkit.base.types.SlotClassInfo.SlotChanger
- Enclosing class:
SlotClassInfo
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.njol.skript.classes.Changer
Changer.ChangeMode, Changer.ChangerUtils -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionTests whether this changer supports the given mode, and if yes what type(s) it expects the elements ofdeltato be.voidchange(Slot[] slots, Object @Nullable [] deltas, Changer.ChangeMode mode)
-
Constructor Details
-
SlotChanger
public SlotChanger()
-
-
Method Details
-
acceptChange
Description copied from interface:ChangerTests whether this changer supports the given mode, and if yes what type(s) it expects the elements ofdeltato be.Unlike
Expression.acceptChange(ChangeMode)this method must not print errors.- Specified by:
acceptChangein interfaceChanger<Slot>- Parameters:
mode- TheChanger.ChangeModeto test.- Returns:
- An array of types that
Changer.change(Object[], Object[], ChangeMode)accepts as itsdeltaparameter (which can be arrays to denote that multiple of that type are accepted), or null if the given mode is not supported. ForChanger.ChangeMode.DELETEandChanger.ChangeMode.RESETthis can return any non-null array to mark them as supported.
-
change
- Specified by:
changein interfaceChanger<Slot>- Parameters:
slots- The objects to changedeltas- An array with one or more instances of one or more of the the classes returned byChanger.acceptChange(ChangeMode)for the given change mode (null forChanger.ChangeMode.DELETEandChanger.ChangeMode.RESET). This can be a Object[], thus casting is not allowed.mode- TheChanger.ChangeModeto test.
-