Package org.spongepowered.api.event.data
Interface ChangeDataHolderEvent.ValueChange
-
- All Superinterfaces:
Cancellable
,ChangeDataHolderEvent
,Event
- All Known Implementing Classes:
AbstractValueChangeEvent
- Enclosing interface:
- ChangeDataHolderEvent
public static interface ChangeDataHolderEvent.ValueChange extends ChangeDataHolderEvent
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.spongepowered.api.event.data.ChangeDataHolderEvent
ChangeDataHolderEvent.ValueChange
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DataTransactionResult
endResult()
Gets the ending resultingDataTransactionResult
that will be offered to theDataHolder
.DataTransactionResult
originalChanges()
Gets the originalDataTransactionResult
of theValue.Mutable
s that have changed in this event.ChangeDataHolderEvent.ValueChange
proposeChanges(DataTransactionResult result)
Submits a newDataTransactionResult
as a proposal of variousValue.Mutable
s to be successfully offered/changed on the originalDataHolder.Mutable
.-
Methods inherited from interface org.spongepowered.api.event.Cancellable
isCancelled, setCancelled
-
Methods inherited from interface org.spongepowered.api.event.data.ChangeDataHolderEvent
targetHolder
-
-
-
-
Method Detail
-
originalChanges
DataTransactionResult originalChanges()
Gets the originalDataTransactionResult
of theValue.Mutable
s that have changed in this event.- Returns:
- The original changes of values
-
proposeChanges
ChangeDataHolderEvent.ValueChange proposeChanges(DataTransactionResult result)
Submits a newDataTransactionResult
as a proposal of variousValue.Mutable
s to be successfully offered/changed on the originalDataHolder.Mutable
.If the proposed
DataTransactionResult
provides additional values that were not changed in theoriginalChanges()
, the provided changes suggested to be successfully offered will be re-offered- Parameters:
result
- The resulting offer- Returns:
- This event, for chaining
-
endResult
DataTransactionResult endResult()
Gets the ending resultingDataTransactionResult
that will be offered to theDataHolder
.- Returns:
- The final transaction details to be submitted
-
-