Class BlockClassInfo.BlockChanger
java.lang.Object
org.skriptlang.skript.bukkit.base.types.BlockClassInfo.BlockChanger
- All Implemented Interfaces:
Changer<org.bukkit.block.Block>
- Enclosing class:
BlockClassInfo
-
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 TypeMethodDescriptionClass<?> @Nullable []Tests whether this changer supports the given mode, and if yes what type(s) it expects the elements ofdeltato be.voidchange(org.bukkit.block.Block[] blocks, Object @Nullable [] delta, Changer.ChangeMode mode)
-
Constructor Details
-
BlockChanger
public BlockChanger()
-
-
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<org.bukkit.block.Block>- 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
public void change(org.bukkit.block.Block[] blocks, Object @Nullable [] delta, Changer.ChangeMode mode) - Specified by:
changein interfaceChanger<org.bukkit.block.Block>- Parameters:
blocks- The objects to changedelta- 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.
-