Class AbstractValueChangeEvent
- java.lang.Object
-
- org.spongepowered.api.event.impl.data.AbstractValueChangeEvent
-
- All Implemented Interfaces:
Cancellable
,ChangeDataHolderEvent
,ChangeDataHolderEvent.ValueChange
,Event
public abstract class AbstractValueChangeEvent extends Object implements ChangeDataHolderEvent.ValueChange
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.spongepowered.api.event.data.ChangeDataHolderEvent
ChangeDataHolderEvent.ValueChange
-
-
Field Summary
Fields Modifier and Type Field Description protected DataTransactionResult
endResult
protected DataTransactionResult
originalChanges
-
Constructor Summary
Constructors Constructor Description AbstractValueChangeEvent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
init()
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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.spongepowered.api.event.Cancellable
isCancelled, setCancelled
-
Methods inherited from interface org.spongepowered.api.event.data.ChangeDataHolderEvent
targetHolder
-
Methods inherited from interface org.spongepowered.api.event.data.ChangeDataHolderEvent.ValueChange
endResult, originalChanges
-
-
-
-
Field Detail
-
originalChanges
protected DataTransactionResult originalChanges
-
endResult
protected DataTransactionResult endResult
-
-
Method Detail
-
init
protected void init()
-
proposeChanges
public ChangeDataHolderEvent.ValueChange proposeChanges(DataTransactionResult result)
Description copied from interface:ChangeDataHolderEvent.ValueChange
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 theChangeDataHolderEvent.ValueChange.originalChanges()
, the provided changes suggested to be successfully offered will be re-offered- Specified by:
proposeChanges
in interfaceChangeDataHolderEvent.ValueChange
- Parameters:
result
- The resulting offer- Returns:
- This event, for chaining
-
-