Fix issue with seeling potatoes

This commit is contained in:
phobia 2016-04-02 22:53:41 +11:00
parent d4e9f638da
commit b4cfbebf3f

View File

@ -49,22 +49,13 @@ public class SellPotatoesGoal extends ObjectiveGoal<ShopsObjective>
@EventHandler
public void onSell(ClansPlayerSellItemEvent event)
{
if (contains(event.getPlayer()))
{
if (event.getItem().getType() == Material.POTATO_ITEM)
{
if (contains(event.getPlayer())) {
if (event.getItem().getType() == Material.POTATO_ITEM) {
finish(event.getPlayer());
}
else
{
} else {
event.setCancelled(true);
UtilPlayer.message(event.getPlayer(), F.main("Tutorial", "You need to sell your potatoes to the Organic Produce NPC!"));
}
}
else
{
if (event.getItem().getType() == Material.POTATO_ITEM)
event.setCancelled(true);
}
}
}