basic classes objectives

This commit is contained in:
Shaun Bennett 2016-03-25 13:07:53 +11:00
parent d23804be70
commit 8afed30c5a
3 changed files with 54 additions and 2 deletions

View File

@ -5,6 +5,7 @@ import org.bukkit.plugin.java.JavaPlugin;
import mineplex.game.clans.tutorial.objective.OrderedObjective;
import mineplex.game.clans.tutorial.tutorials.clans.ClansMainTutorial;
import mineplex.game.clans.tutorial.tutorials.clans.objective.goals.classes.EquipDefaultBuildGoal;
import mineplex.game.clans.tutorial.tutorials.clans.objective.goals.classes.OpenClassManagerGoal;
import mineplex.game.clans.tutorial.tutorials.clans.objective.goals.classes.UseBullsChargeGoal;
@ -14,8 +15,9 @@ public class ClassesObjective extends OrderedObjective<ClansMainTutorial>
{
super(clansMainTutorial, javaPlugin, "Classes", "Learn to use our fully customizable classes");
addGoal(new OpenClassManagerGoal(this)); // IMPLEMENTED
addGoal(new UseBullsChargeGoal(this)); // TODO: not sure if we want JUST bulls charge or any other skill?
addGoal(new OpenClassManagerGoal(this)); // IMPLEMENTED\
addGoal(new EquipDefaultBuildGoal(this));
addGoal(new UseBullsChargeGoal(this));
}
@Override

View File

@ -0,0 +1,37 @@
package mineplex.game.clans.tutorial.tutorials.clans.objective.goals.classes;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import mineplex.game.clans.tutorial.objective.ObjectiveGoal;
import mineplex.game.clans.tutorial.tutorials.clans.objective.ClassesObjective;
import mineplex.minecraft.game.classcombat.Class.event.ClassEquipEvent;
public class EquipDefaultBuildGoal extends ObjectiveGoal<ClassesObjective>
{
public EquipDefaultBuildGoal(ClassesObjective objective)
{
super(objective, "Equip Kit", "Equip the default Build in Class Manager");
}
@Override
protected void customStart(Player player)
{
}
@Override
protected void customFinish(Player player)
{
}
@EventHandler
public void classEquip(ClassEquipEvent event)
{
if (contains(event.getUser()))
{
finish(event.getUser());
}
}
}

View File

@ -1,9 +1,12 @@
package mineplex.game.clans.tutorial.tutorials.clans.objective.goals.classes;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import mineplex.game.clans.tutorial.objective.Objective;
import mineplex.game.clans.tutorial.objective.ObjectiveGoal;
import mineplex.minecraft.game.classcombat.Skill.event.SkillEvent;
import mineplex.minecraft.game.classcombat.Skill.event.SkillTriggerEvent;
public class UseBullsChargeGoal extends ObjectiveGoal
{
@ -21,4 +24,14 @@ public class UseBullsChargeGoal extends ObjectiveGoal
protected void customFinish(Player player)
{
}
@EventHandler
public void checkSkill(SkillTriggerEvent event)
{
if (contains(event.GetPlayer()))
{
if (event.GetSkillName().equalsIgnoreCase("Bulls Charge"))
finish(event.GetPlayer());
}
}
}