ReplaceCommand

public class ReplaceCommand extends AbstractPlayerCommand

Command for replac operations. Registered with the command system and callable by players.

java.lang.Object > AbstractPlayerCommand > ReplaceCommand

Field Summary

playerComponent

final Player playerComponent

Field playerComponent.

toValue

final String toValue

Field toValue.

toBlockIds

final Integer[] toBlockIds

Field toBlockIds.

fromMaterial

final Material fromMaterial

Field fromMaterial.

toMaterial

final Material toMaterial

Field toMaterial.

blockKeys

final String[] blockKeys

Field blockKeys.

swapMap

final Int2IntArrayMap swapMap

Field swapMap.

blockType

final BlockType blockType

Field blockType.

blockKeyStr

final String blockKeyStr

Field blockKeyStr.

index

final int index

Field index.

toIds2

final int[] toIds2

Field toIds2.

valueKey

final String valueKey

Field valueKey.

fromBlockId

final int fromBlockId

Field fromBlockId.

result

final int[] result

Field result.

Method Detail

ReplaceCommand

public public ReplaceCommand ()

Method ReplaceCommand.

ReplaceFromToCommand

public new ReplaceFromToCommand ()

Method ReplaceFromToCommand.

execute

protected void execute (@Nonnull final CommandContext context, @Nonnull final Store store, @Nonnull final Ref ref, @Nonnull final PlayerRef playerRef, @Nonnull final World world)

Method execute.

Parameters:
@Nonnull final CommandContext context
@Nonnull final Store store
@Nonnull final Ref ref
@Nonnull final PlayerRef playerRef
@Nonnull final World world

executeReplace

static void executeReplace (@Nonnull final CommandContext context, @Nonnull final Store store, @Nonnull final Ref ref, @Nonnull final PlayerRef playerRef, @Nullable final String fromValue, @Nonnull final BlockPattern toPattern, final boolean substringSwap, final boolean regex)

Method executeReplace.

Parameters:
@Nonnull final CommandContext context
@Nonnull final Store store
@Nonnull final Ref ref
@Nonnull final PlayerRef playerRef
@Nullable final String fromValue
@Nonnull final BlockPattern toPattern
final boolean substringSwap
final boolean regex

toIntArray

static int[] toIntArray (final Integer[] arr)

Method toIntArray.

Parameters:
final Integer[] arr