PC-55 - Remove all potatoes from inventory when player completes "Sell Potatoes"

This commit is contained in:
Shaun Bennett 2016-03-31 17:08:26 +11:00
parent 25975e47b8
commit f229da1327

View File

@ -6,6 +6,7 @@ import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilInv;
import mineplex.core.common.util.UtilPlayer;
import mineplex.game.clans.clans.event.ClansPlayerSellItemEvent;
import mineplex.game.clans.tutorial.objective.ObjectiveGoal;
@ -29,6 +30,9 @@ public class SellPotatoesGoal extends ObjectiveGoal<ShopsObjective>
{
// Shops Fences Closed
getObjective().getPlugin().spawnFences(getObjective().getPlugin().getRegion(player), DyeColor.BROWN);
// Remove all potatoes from inventory
UtilInv.removeAll(player, Material.POTATO_ITEM, (byte) 0);
}
@EventHandler