PC-61 - Remove all diamonds from inventory after sell diamonds objective
This commit is contained in:
parent
da99a12b23
commit
3412082f37
@ -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;
|
||||
@ -34,6 +35,7 @@ public class SellDiamondsGoal extends ObjectiveGoal<FieldsObjective>
|
||||
{
|
||||
// Close Middle Gate
|
||||
getObjective().getPlugin().destroyFences(getObjective().getPlugin().getRegion(player), DyeColor.RED);
|
||||
|
||||
// Close Fields Gate
|
||||
getObjective().getPlugin().destroyFences(getObjective().getPlugin().getRegion(player), DyeColor.BLACK);
|
||||
}
|
||||
@ -45,6 +47,7 @@ public class SellDiamondsGoal extends ObjectiveGoal<FieldsObjective>
|
||||
{
|
||||
if (event.getItem().getType() == Material.DIAMOND)
|
||||
{
|
||||
UtilInv.removeAll(event.getPlayer(), Material.DIAMOND, (byte) 0);
|
||||
finish(event.getPlayer());
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user