PC-35
This commit is contained in:
parent
fd3a04e794
commit
eab7cbe385
|
@ -1,5 +1,6 @@
|
|||
package mineplex.game.clans.tutorial.tutorials.clans.objective;
|
||||
|
||||
import mineplex.game.clans.clans.siege.weapon.Cannon;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
@ -13,8 +14,14 @@ import mineplex.game.clans.tutorial.tutorials.clans.objective.goals.attackenemy.
|
|||
import mineplex.game.clans.tutorial.tutorials.clans.objective.goals.attackenemy.MountCannonGoal;
|
||||
import mineplex.game.clans.tutorial.tutorials.clans.objective.goals.attackenemy.StealEnemyPotatoesGoal;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class AttackEnemyObjective extends OrderedObjective<ClansMainTutorial>
|
||||
{
|
||||
|
||||
private Map<String, Cannon> _cannon = new HashMap<>();
|
||||
|
||||
public AttackEnemyObjective(ClansMainTutorial clansMainTutorial, JavaPlugin javaPlugin)
|
||||
{
|
||||
super(clansMainTutorial, javaPlugin, "Attack Enemy", "Attack and raid this enemy!");
|
||||
|
@ -36,4 +43,6 @@ public class AttackEnemyObjective extends OrderedObjective<ClansMainTutorial>
|
|||
protected void customFinish(Player player)
|
||||
{
|
||||
}
|
||||
|
||||
public Map<String, Cannon> getCannons() {return _cannon; }
|
||||
}
|
||||
|
|
|
@ -107,5 +107,6 @@ public class BlowUpWallGoal extends ObjectiveGoal<AttackEnemyObjective>
|
|||
@Override
|
||||
protected void customFinish(Player player)
|
||||
{
|
||||
getObjective().getCannons().remove(player.getName()).kill(); //Kill cannon after goal complete
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,8 +18,6 @@ import mineplex.game.clans.tutorial.tutorials.clans.objective.AttackEnemyObjecti
|
|||
|
||||
public class MountCannonGoal extends ObjectiveGoal<AttackEnemyObjective>
|
||||
{
|
||||
private Map<String, Cannon> _cannon = new HashMap<>();
|
||||
|
||||
public MountCannonGoal(AttackEnemyObjective objective)
|
||||
{
|
||||
super(objective, "Get on Cannon", "Right click on the Cannon to hop on!");
|
||||
|
@ -28,14 +26,14 @@ public class MountCannonGoal extends ObjectiveGoal<AttackEnemyObjective>
|
|||
@Override
|
||||
protected void customStart(Player player)
|
||||
{
|
||||
_cannon.put(player.getName(), SiegeManager.Instance.spawnCannon(player, getObjective().getPlugin().getPoint(getObjective().getPlugin().getRegion(player), Point.CANNON), false));
|
||||
_cannon.get(player.getName()).SetForcedVelocity(0.4, 2.45);
|
||||
getObjective().getCannons().put(player.getName(), SiegeManager.Instance.spawnCannon(player, getObjective().getPlugin().getPoint(getObjective().getPlugin().getRegion(player), Point.CANNON), false));
|
||||
getObjective().getCannons().get(player.getName()).SetForcedVelocity(0.4, 2.45);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void clean(Player player, TutorialRegion region)
|
||||
{
|
||||
_cannon.remove(player.getName()).kill();
|
||||
getObjective().getCannons().remove(player.getName()).kill();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue