mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Merchant#getRecipes should return an immutable list
This commit is contained in:
parent
f8a55d3645
commit
41fd1852ae
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ public interface CraftMerchant extends Merchant {
|
|||
|
||||
@Override
|
||||
default List<MerchantRecipe> getRecipes() {
|
||||
return Collections.unmodifiableList(Lists.transform(this.getMerchant().getOffers(), new Function<net.minecraft.world.item.trading.MerchantOffer, MerchantRecipe>() {
|
||||
return List.copyOf(Lists.transform(this.getMerchant().getOffers(), new Function<net.minecraft.world.item.trading.MerchantOffer, MerchantRecipe>() { // Paper - javadoc says 'an immutable list of trades' - not 'an unmodifiable view of a list of trades'. fixes issue with setRecipes(getRecipes())
|
||||
@Override
|
||||
public MerchantRecipe apply(net.minecraft.world.item.trading.MerchantOffer recipe) {
|
||||
return recipe.asBukkit();
|
||||
|
|
Loading…
Reference in a new issue