PC-55 - Remove all potatoes from inventory when player completes "Sell Potatoes"
This commit is contained in:
parent
25975e47b8
commit
f229da1327
@ -6,6 +6,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
|
||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
|
import mineplex.core.common.util.UtilInv;
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import mineplex.game.clans.clans.event.ClansPlayerSellItemEvent;
|
import mineplex.game.clans.clans.event.ClansPlayerSellItemEvent;
|
||||||
import mineplex.game.clans.tutorial.objective.ObjectiveGoal;
|
import mineplex.game.clans.tutorial.objective.ObjectiveGoal;
|
||||||
@ -29,6 +30,9 @@ public class SellPotatoesGoal extends ObjectiveGoal<ShopsObjective>
|
|||||||
{
|
{
|
||||||
// Shops Fences Closed
|
// Shops Fences Closed
|
||||||
getObjective().getPlugin().spawnFences(getObjective().getPlugin().getRegion(player), DyeColor.BROWN);
|
getObjective().getPlugin().spawnFences(getObjective().getPlugin().getRegion(player), DyeColor.BROWN);
|
||||||
|
|
||||||
|
// Remove all potatoes from inventory
|
||||||
|
UtilInv.removeAll(player, Material.POTATO_ITEM, (byte) 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
Loading…
Reference in New Issue
Block a user