TreasureChestState

public class TreasureChestState extends ItemContainerState implements BreakValidatedBlockState

Class TreasureChestState. Provides treasurecheststate functionality for the Hytale server.

java.lang.Object > ItemContainerState > TreasureChestState

Field Summary

objectiveUUID

protected UUID objectiveUUID

Field objectiveUUID.

chestUUID

protected UUID chestUUID

Field chestUUID.

opened

protected boolean opened

Field opened.

uuidComponent

final UUIDComponent uuidComponent

Field uuidComponent.

objective

final Objective objective

Field objective.

Method Detail

canOpen

public boolean canOpen (@Nonnull final Ref ref, @Nonnull final ComponentAccessor componentAccessor)

Method canOpen.

Parameters:
@Nonnull final Ref ref
@Nonnull final ComponentAccessor componentAccessor

canDestroy

public boolean canDestroy (@Nonnull final Ref playerRef, @Nonnull final ComponentAccessor componentAccessor)

Method canDestroy.

Parameters:
@Nonnull final Ref playerRef
@Nonnull final ComponentAccessor componentAccessor

onOpen

public void onOpen (@Nonnull final Ref ref, @Nonnull final World world, @Nonnull final Store store)

Method onOpen.

Parameters:
@Nonnull final Ref ref
@Nonnull final World world
@Nonnull final Store store

TreasureChestOpeningEvent

public new TreasureChestOpeningEvent (this.objectiveUUID, this.chestUUID, ref, store)

Method TreasureChestOpeningEvent.

Parameters:
this.objectiveUUID this.objectiveUUID
this.chestUUID this.chestUUID
ref ref
store store

setOpened

public void setOpened (final boolean opened)

Method setOpened.

Parameters:
final boolean opened

setObjectiveData

public void setObjectiveData (final UUID objectiveUUID, final UUID chestUUID, final List itemStacks)

Method setObjectiveData.

Parameters:
final UUID objectiveUUID
final UUID chestUUID
final List itemStacks