コード例 #1
0
 @Override
 public DataTransactionResult removeFrom(ValueContainer<?> container) {
   if (container instanceof ItemStack) {
     final ItemStack itemStack = (ItemStack) container;
     if (itemStack.getItem() == Items.water_bucket) {
       itemStack.setItem(Items.bucket);
       return DataTransactionResult.successRemove(constructImmutableValue(WATER));
     } else if (itemStack.getItem() == Items.lava_bucket) {
       itemStack.setItem(Items.bucket);
       return DataTransactionResult.successRemove(constructImmutableValue(LAVA));
     }
   }
   return DataTransactionResult.failNoData();
 }
コード例 #2
0
 @Override
 public DataTransactionResult removeFrom(ValueContainer<?> container) {
   return DataTransactionResult.failNoData();
 }
コード例 #3
0
 @Override
 public DataTransactionResult remove(DataHolder dataHolder) {
   return DataTransactionResult.failNoData();
 }