Merge changes in develop branch.

This commit is contained in:
BONNe1704 2019-02-14 14:31:07 +02:00
commit 3b4a64bb39
1 changed files with 9 additions and 3 deletions

View File

@ -211,7 +211,9 @@ public class TryToComplete
// Item rewards
for (ItemStack reward : this.challenge.getRewardItems())
{
this.user.getInventory().addItem(reward).forEach((k, v) ->
// Clone is necessary because otherwise it will chane reward itemstack
// amount.
this.user.getInventory().addItem(reward.clone()).forEach((k, v) ->
this.user.getWorld().dropItem(this.user.getLocation(), v));
}
@ -248,7 +250,9 @@ public class TryToComplete
// Item Repeat Rewards
for (ItemStack reward : this.challenge.getRepeatItemReward())
{
this.user.getInventory().addItem(reward).forEach((k, v) ->
// Clone is necessary because otherwise it will chane reward itemstack
// amount.
this.user.getInventory().addItem(reward.clone()).forEach((k, v) ->
this.user.getWorld().dropItem(this.user.getLocation(), v));
}
@ -281,7 +285,9 @@ public class TryToComplete
// Item rewards
for (ItemStack reward : level.getRewardItems())
{
this.user.getInventory().addItem(reward).forEach((k, v) ->
// Clone is necessary because otherwise it will chane reward itemstack
// amount.
this.user.getInventory().addItem(reward.clone()).forEach((k, v) ->
this.user.getWorld().dropItem(this.user.getLocation(), v));
}