Fix potatoes

This commit is contained in:
Shaun Bennett 2016-03-25 12:26:13 +11:00
parent 17c214c282
commit c221e0e24f
2 changed files with 6 additions and 3 deletions

View File

@ -53,7 +53,7 @@ public class ClansMainTutorial extends Tutorial
e.printStackTrace();
}
_mapManager = new TutorialMapManager(plugin, getWorldManager().getTutorialWorld(), -10, 0, 117, 127);
// _mapManager = new TutorialMapManager(plugin, getWorldManager().getTutorialWorld(), -10, 0, 117, 127);
addObjective(new LeaveSpawnObjective(this, plugin));
addObjective(new ClanObjective(this, plugin));
@ -239,7 +239,7 @@ public class ClansMainTutorial extends Tutorial
public void destroyFences(TutorialRegion region, DyeColor dataLoc)
{
List<Location> locations = region.getLocationMap().getIronLocations(dataLoc);
locations.stream().map(Location::getBlock).forEach(this::spawnFence);
locations.stream().map(Location::getBlock).forEach(this::destroyFence);
}
@EventHandler

View File

@ -28,6 +28,8 @@ public class StealEnemyPotatoesGoal extends ObjectiveGoal<ClanObjective>
public StealEnemyPotatoesGoal(ClanObjective objective)
{
super(objective, "Steal Enemy Potatoes", "Steal the enemies potatoes");
_playersMap = new HashMap<>();
}
@Override
@ -40,6 +42,7 @@ public class StealEnemyPotatoesGoal extends ObjectiveGoal<ClanObjective>
@Override
protected void customStart(Player player)
{
_playersMap.put(player.getUniqueId(), new AtomicInteger(0));
UtilPlayer.message(player, F.main("Clans", "Now that you have blown a hole in the enemy's base, go and steal their potatoes."));
}
@ -58,7 +61,7 @@ public class StealEnemyPotatoesGoal extends ObjectiveGoal<ClanObjective>
System.out.println("b");
TutorialRegion region = getObjective().getPlugin().getRegion(event.getPlayer());
if (getObjective().getPlugin().isIn(event.getBlock().getLocation(), region, ClansMainTutorial.Bounds.ENEMY_LAND))
if (getObjective().getPlugin().isIn(event.getBlock().getLocation().add(0, 1, 0), region, ClansMainTutorial.Bounds.ENEMY_LAND))
{
System.out.println("c");
event.setCancelled(true);