crwdns129809:0crwdne129809:0

crwdns129811:0crwdne129811:0

crwdns129813:0:javadoc:crwdne129813:0

crwdns129815:0crwdne129815:0

crwdns129817:0:javadoc:crwdne129817:0

crwdns129819:0crwdne129819:0

crwdns129821:0crwdne129821:0

crwdns129823:0crwdne129823:0

crwdns129825:0crwdne129825:0

crwdns129827:0crwdne129827:0

crwdns129829:0crwdne129829:0

crwdns129831:0crwdne129831:0

crwdns129833:0crwdne129833:0

crwdns129835:0crwdne129835:0

crwdns129837:0crwdne129837:0

crwdns129839:0crwdne129839:0

crwdns129841:0crwdne129841:0

crwdns129843:0crwdne129843:0

crwdns129845:0crwdne129845:0

crwdns129847:0crwdne129847:0

crwdns129849:0crwdne129849:0

crwdns129851:0crwdne129851:0

crwdns129853:0crwdne129853:0

crwdns129855:0crwdne129855:0

crwdns129857:0crwdne129857:0

crwdns129859:0:doc:crwdne129859:0

  • crwdns129861:0crwdne129861:0

  • crwdns129863:0crwdne129863:0

  • crwdns129865:0crwdne129865:0

  • crwdns129867:0crwdne129867:0

crwdns129869:0:doc:crwdnd129869:0:javadoc:crwdne129869:0

crwdns129871:0crwdne129871:0

crwdns129873:0:javadoc:crwdne129873:0

  • crwdns129875:0crwdne129875:0

  • crwdns129877:0crwdne129877:0

  • crwdns129879:0crwdne129879:0

crwdns129881:0crwdne129881:0

crwdns129883:0crwdne129883:0

crwdns129885:0crwdne129885:0

import org.spongepowered.api.data.DataHolder;
import org.spongepowered.api.data.DataTransactionResult;
import org.spongepowered.api.data.manipulator.DataManipulator;

public void safeOffer(DataHolder target, DataManipulator data) {
    DataTransactionResult result = target.offer(data);
    if (result.getType() != DataTransactionResult.Type.SUCCESS) {
        target.undo(result);
    }
}