PC-20 - Detailed Objective Text
This commit is contained in:
parent
19b2b00a13
commit
4ec833727f
@ -53,9 +53,13 @@ public enum UpdateType
|
||||
*/
|
||||
SLOWEST(32000),
|
||||
/**
|
||||
* ONce every 30 seconds
|
||||
* Once every 30 seconds
|
||||
*/
|
||||
SEC_30(30000),
|
||||
/**
|
||||
* Once every 20 seconds
|
||||
*/
|
||||
SEC_20(20000),
|
||||
/**
|
||||
* Once every 16 seconds
|
||||
*/
|
||||
|
@ -34,7 +34,9 @@ public class ClansButtonClickEvent extends Event
|
||||
return _cancelled;
|
||||
}
|
||||
|
||||
public ButtonType getButtonType() { return _type}
|
||||
public ButtonType getButtonType() {
|
||||
return _type;
|
||||
}
|
||||
|
||||
public HandlerList getHandlers()
|
||||
{
|
||||
|
@ -20,8 +20,10 @@ import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilTextBottom;
|
||||
import mineplex.core.hologram.Hologram;
|
||||
import mineplex.core.hologram.HologramManager;
|
||||
@ -286,6 +288,36 @@ public abstract class Tutorial implements Listener, ObjectiveListener
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void displayText(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.SEC)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (Map.Entry<Player, TutorialSession> entry : _playerSessionMap.entrySet())
|
||||
{
|
||||
String extra = _objectives.get(entry.getValue().getObjectiveIndex()).getExtraDescription(entry.getKey());
|
||||
if (extra == null)
|
||||
{
|
||||
// None defined.
|
||||
continue;
|
||||
}
|
||||
|
||||
if (entry.getValue().incrementAndGetTextSeconds() < 20)
|
||||
{
|
||||
// 20 second delay between displaying.
|
||||
return;
|
||||
}
|
||||
|
||||
UtilPlayer.message(entry.getKey(), C.cGold + C.Strike + "---------------------------------------------");
|
||||
UtilPlayer.message(entry.getKey(), C.cGray + " " + extra);
|
||||
UtilPlayer.message(entry.getKey(), C.cGold + C.Strike + "---------------------------------------------");
|
||||
entry.getValue().setTextSeconds(0);
|
||||
}
|
||||
}
|
||||
|
||||
public void addHologram(Player player, Location location, String... text)
|
||||
{
|
||||
if (_playerSessionMap.containsKey(player))
|
||||
|
@ -14,6 +14,7 @@ public class TutorialSession
|
||||
private List<Hologram> _hologramList = new ArrayList<>();
|
||||
private Location _homeLocation;
|
||||
private int _colorTick;
|
||||
private int _textSeconds;
|
||||
|
||||
public TutorialSession()
|
||||
{
|
||||
@ -58,4 +59,15 @@ public class TutorialSession
|
||||
{
|
||||
return ++_colorTick;
|
||||
}
|
||||
|
||||
public void setTextSeconds(int seconds)
|
||||
{
|
||||
_textSeconds = seconds;
|
||||
}
|
||||
|
||||
public int incrementAndGetTextSeconds()
|
||||
{
|
||||
_textSeconds++;
|
||||
return _textSeconds;
|
||||
}
|
||||
}
|
||||
|
@ -15,12 +15,13 @@ import org.bukkit.plugin.java.JavaPlugin;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilTextMiddle;
|
||||
import mineplex.game.clans.tutorial.Tutorial;
|
||||
import mineplex.game.clans.tutorial.TutorialRegion;
|
||||
|
||||
/**
|
||||
* An Objective represents a set of goals that need to be completed to move on to the next Objective in the quest
|
||||
*/
|
||||
public abstract class Objective<Plugin, Data extends ObjectiveData> implements Listener
|
||||
public abstract class Objective<Plugin extends Tutorial, Data extends ObjectiveData> implements Listener
|
||||
{
|
||||
private Plugin _plugin;
|
||||
private JavaPlugin _javaPlugin;
|
||||
|
@ -9,6 +9,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Listener;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilTextMiddle;
|
||||
import mineplex.game.clans.tutorial.TutorialRegion;
|
||||
|
||||
@ -112,6 +113,8 @@ public abstract class ObjectiveGoal <T extends Objective> implements Listener
|
||||
{
|
||||
System.out.println(String.format("Tutorial> [%s] finished objective goal [%s]", player.getName(), getName(player)));
|
||||
|
||||
getObjective().getPlugin().getTutorialSession(player).setTextSeconds(0);
|
||||
|
||||
_active.remove(player.getUniqueId());
|
||||
|
||||
if (_displayFinishMessage)
|
||||
@ -153,7 +156,21 @@ public abstract class ObjectiveGoal <T extends Objective> implements Listener
|
||||
|
||||
protected void displayStartMessage(Player player)
|
||||
{
|
||||
if (player == null || !player.isOnline())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
UtilTextMiddle.display(C.cYellow + "New Objective", getName(player), player);
|
||||
|
||||
if (getExtraDescription(player) != null)
|
||||
{
|
||||
// Display extra information for the first time.
|
||||
UtilPlayer.message(player, C.cGold + C.Strike + "---------------------------------------------");
|
||||
UtilPlayer.message(player, C.cGray + " " + getExtraDescription(player));
|
||||
UtilPlayer.message(player, C.cGold + C.Strike + "---------------------------------------------");
|
||||
getObjective().getPlugin().getTutorialSession(player).setTextSeconds(0);
|
||||
}
|
||||
}
|
||||
|
||||
public void setDisplayStartMessage(boolean displayStartMessage)
|
||||
|
@ -6,9 +6,10 @@ import java.util.List;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import mineplex.game.clans.tutorial.Tutorial;
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
|
||||
public abstract class OrderedObjective<Plugin> extends Objective<Plugin, OrderedObjectiveData>
|
||||
public abstract class OrderedObjective<Plugin extends Tutorial> extends Objective<Plugin, OrderedObjectiveData>
|
||||
{
|
||||
private List<ObjectiveGoal> _goals;
|
||||
|
||||
|
@ -6,8 +6,9 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.game.clans.tutorial.Tutorial;
|
||||
|
||||
public abstract class SingleObjective<Plugin> extends Objective<Plugin, ObjectiveData>
|
||||
public abstract class SingleObjective<Plugin extends Tutorial> extends Objective<Plugin, ObjectiveData>
|
||||
{
|
||||
private final ObjectiveData _nullData;
|
||||
|
||||
|
@ -6,9 +6,10 @@ import java.util.List;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import mineplex.game.clans.tutorial.Tutorial;
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
|
||||
public abstract class UnorderedObjective<Plugin> extends Objective<Plugin, UnorderedObjectiveData>
|
||||
public abstract class UnorderedObjective<Plugin extends Tutorial> extends Objective<Plugin, UnorderedObjectiveData>
|
||||
{
|
||||
private List<ObjectiveGoal> _goals;
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package mineplex.game.clans.tutorial.tutorials.clans.objective;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.game.clans.clans.siege.weapon.Cannon;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -29,7 +30,14 @@ public class AttackEnemyObjective extends OrderedObjective<ClansMainTutorial>
|
||||
_cannon = new HashMap<>();
|
||||
|
||||
addGoal(new GetMapGoal(this));
|
||||
addGoal(new HoldItemGoal(this, Material.MAP, "Identify Enemy on Map", "By looking at your map, identify your new enemy", 40));
|
||||
addGoal(new HoldItemGoal(
|
||||
this, Material.MAP,
|
||||
"Identify Enemy on Map",
|
||||
"Find the red square land on the map.",
|
||||
"Look at your map to help find where the Enemy Clan is. It's marked by " +
|
||||
"a " + C.cRed + "red square" + C.mBody + ".",
|
||||
40
|
||||
));
|
||||
addGoal(new ClanInfoGoal(this));
|
||||
addGoal(new MountCannonGoal(this));
|
||||
addGoal(new LoadCannonGoal(this));
|
||||
|
@ -5,6 +5,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.game.clans.tutorial.objective.OrderedObjective;
|
||||
import mineplex.game.clans.tutorial.tutorials.clans.ClansMainTutorial;
|
||||
import mineplex.game.clans.tutorial.tutorials.clans.objective.goals.HoldItemGoal;
|
||||
@ -18,7 +19,13 @@ public class FieldsObjective extends OrderedObjective<ClansMainTutorial>
|
||||
{
|
||||
super(clansMainTutorial, javaPlugin, "Fields", "Get various resources by mining for them in the fields");
|
||||
|
||||
addGoal(new HoldItemGoal(this, Material.MAP, "Identify Fields on Map", "Look at your map and find the Fields Region"));
|
||||
addGoal(new HoldItemGoal(
|
||||
this,
|
||||
Material.MAP,
|
||||
"Identify Fields on Map",
|
||||
"Find the Orange Striped Area on your map",
|
||||
"Fields are marked by " + C.cGold + "Orange Stripes" + C.mBody + "."
|
||||
));
|
||||
addGoal(new GoToFieldsGoal(this));
|
||||
addGoal(new MineDiamondsGoal(this));
|
||||
addGoal(new SellDiamondsGoal(this));
|
||||
|
@ -14,11 +14,21 @@ public class PurchaseItemsObjective extends UnorderedObjective<ClansMainTutorial
|
||||
{
|
||||
super(clansMainTutorial, javaPlugin, "Purchase Items", "Purchase Items from Shop");
|
||||
|
||||
addGoal(new PurchaseGoal(this, Material.IRON_HELMET, "Purchase Iron Helmet", "Talk to the Pvp Gear NPC and purchase an Iron Helmet"));
|
||||
addGoal(new PurchaseGoal(this, Material.IRON_CHESTPLATE, "Purchase Iron Chestplate", "Talk to the Pvp Gear NPC and purchase an Iron Chestplate"));
|
||||
addGoal(new PurchaseGoal(this, Material.IRON_LEGGINGS, "Purchase Iron Leggings", "Talk to the Pvp Gear NPC and purchase Iron Leggings"));
|
||||
addGoal(new PurchaseGoal(this, Material.IRON_BOOTS, "Purchase Iron Boots", "Talk to the Pvp Gear NPC and purchase Iron Boots"));
|
||||
addGoal(new PurchaseGoal(this, Material.IRON_AXE, "Purchase Iron Axe", "Talk to the Pvp Gear NPC and purchase an Iron Axe"));
|
||||
addGoal(new PurchaseGoal(
|
||||
this,
|
||||
Material.IRON_HELMET,
|
||||
"Purchase Iron Helmet",
|
||||
"Buy an Iron Helmet",
|
||||
"The shops sell everything you could ever need and more."
|
||||
));
|
||||
addGoal(new PurchaseGoal(this, Material.IRON_CHESTPLATE, "Purchase Iron Chestplate",
|
||||
"Buy an Iron Chestplate"));
|
||||
addGoal(new PurchaseGoal(this, Material.IRON_LEGGINGS, "Purchase Iron Leggings",
|
||||
"Buy Iron Leggings"));
|
||||
addGoal(new PurchaseGoal(this, Material.IRON_BOOTS, "Purchase Iron Boots",
|
||||
"Buy Iron Boots"));
|
||||
addGoal(new PurchaseGoal(this, Material.IRON_AXE, "Purchase Iron Axe",
|
||||
"Buy an Iron Axe"));
|
||||
// addGoal(new PurchaseGoal(this, Material.IRON_PICKAXE, "Purchase Iron Pickaxe", "Talk to the Pvp Gear NPC and purchase an Iron Pickaxe"));
|
||||
|
||||
setStartMessageDelay(60);
|
||||
|
@ -13,6 +13,7 @@ import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.npc.Npc;
|
||||
import mineplex.core.npc.NpcManager;
|
||||
import mineplex.database.tables.records.NpcsRecord;
|
||||
@ -35,7 +36,13 @@ public class ShopsObjective extends OrderedObjective<ClansMainTutorial>
|
||||
_npcMap = new HashMap<>();
|
||||
_npcManager = npcManager;
|
||||
|
||||
addGoal(new HoldItemGoal(this, Material.MAP, "Identify Shops on Map", "Look at your map and find the shops"));
|
||||
addGoal(new HoldItemGoal(
|
||||
this,
|
||||
Material.MAP,
|
||||
"Identify Shops on Map",
|
||||
"Find the Yellow striped area on your map",
|
||||
"Shops are marked on the map by the " + F.elem("Yellow Stripes") + "."
|
||||
));
|
||||
addGoal(new GoToShopsGoal(this));
|
||||
addGoal(new SellPotatoesGoal(this));
|
||||
|
||||
|
@ -17,18 +17,18 @@ public class HoldItemGoal extends ObjectiveGoal<Objective>
|
||||
private DefaultHashMap<String, EnclosedObject<Integer>> _ticksHeld = new DefaultHashMap<>(key -> new EnclosedObject<>(Integer.valueOf(0)));
|
||||
private Material _material;
|
||||
|
||||
public HoldItemGoal(Objective objective, Material material, String name, String description, int startDelay)
|
||||
public HoldItemGoal(Objective objective, Material material, String name, String description, String helpText, int startDelay)
|
||||
{
|
||||
super(objective, name, description);
|
||||
super(objective, name, description, helpText);
|
||||
|
||||
_material = material;
|
||||
|
||||
setStartMessageDelay(startDelay);
|
||||
}
|
||||
|
||||
public HoldItemGoal(Objective objective, Material material, String name, String description)
|
||||
public HoldItemGoal(Objective objective, Material material, String name, String description, String helpText)
|
||||
{
|
||||
this(objective, material, name, description, 120);
|
||||
this(objective, material, name, description, helpText, 120);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -24,7 +24,12 @@ public class BlowUpWallGoal extends ObjectiveGoal<AttackEnemyObjective>
|
||||
{
|
||||
public BlowUpWallGoal(AttackEnemyObjective objective)
|
||||
{
|
||||
super(objective, "Blow up the Enemy Base", "Attack enemy clan! Blow a hole in their base by Left-Clicking to fire the Cannon.");
|
||||
super(
|
||||
objective,
|
||||
"Blow up the Enemy Base",
|
||||
"Left-Click whilst sitting on the cannon to fire",
|
||||
"This is the fun part. Use the Cannon to smash a hole in your enemy’s wall KA-BOOM!"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -6,6 +6,7 @@ import java.util.Map;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.game.clans.clans.map.events.PlayerGetMapEvent;
|
||||
import mineplex.game.clans.clans.siege.weapon.Cannon;
|
||||
import mineplex.game.clans.tutorial.objective.ObjectiveGoal;
|
||||
@ -15,7 +16,15 @@ public class GetMapGoal extends ObjectiveGoal<AttackEnemyObjective>
|
||||
{
|
||||
public GetMapGoal(AttackEnemyObjective objective)
|
||||
{
|
||||
super(objective, "Get a Map", "Use the /map command to recieve a map.");
|
||||
super(
|
||||
objective,
|
||||
"Get a Map",
|
||||
"Get a Map ( Type /map )",
|
||||
"You can get a Map any time you need one. The map will show you who " +
|
||||
"owns the land around the map. Your clan is " + C.cAqua + "aqua" +
|
||||
C.mBody + ", your allies are " + C.cGreen + "green" + C.mBody + ", " +
|
||||
"and your enemies are " + C.cRed + "red" + C.mBody + "."
|
||||
);
|
||||
|
||||
setStartMessageDelay(120);
|
||||
}
|
||||
|
@ -13,7 +13,13 @@ public class LoadCannonGoal extends ObjectiveGoal<AttackEnemyObjective>
|
||||
{
|
||||
public LoadCannonGoal(AttackEnemyObjective objective)
|
||||
{
|
||||
super(objective, "Load the Cannon", "Right click to open the Cannon, and load it with TNT!");
|
||||
super(
|
||||
objective,
|
||||
"Load the Cannon",
|
||||
"Right click whilst sitting on the Cannon, and load it with TNT!",
|
||||
"First you’ll need to load this baby up with some TNT. Right click whilst sitting " +
|
||||
"on the Cannon, and load it with TNT!"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -20,7 +20,13 @@ public class MountCannonGoal extends ObjectiveGoal<AttackEnemyObjective>
|
||||
{
|
||||
public MountCannonGoal(AttackEnemyObjective objective)
|
||||
{
|
||||
super(objective, "Get on the Cannon", "Right click on the Cannon to hop on!");
|
||||
super(
|
||||
objective,
|
||||
"Get on the Cannon",
|
||||
"Right click on the Cannon to hop on!",
|
||||
"To break through an enemy Clan’s fortress you’ll need some serious " +
|
||||
"firepower. Try using this TNT Cannon to get the job done!"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -27,14 +27,20 @@ public class StealEnemyPotatoesGoal extends ObjectiveGoal<AttackEnemyObjective>
|
||||
|
||||
public StealEnemyPotatoesGoal(AttackEnemyObjective objective)
|
||||
{
|
||||
super(objective, "Steal Potatoes", "Steal the enemy's potatoes");
|
||||
super(
|
||||
objective,
|
||||
"Steal Potatoes",
|
||||
"Retrieve the potatoes from the Enemy Clan’s base",
|
||||
"Now that their walls are down, it’s time to get rich! Go steal their " +
|
||||
"potatoes for your Clan!"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription(Player player)
|
||||
{
|
||||
int count = _playersMap.get(player.getUniqueId()).get();
|
||||
return "Steal Potatoes " + count + "/10";
|
||||
return "Retrieve the potatoes from the Enemy Clan’s base " + count + "/10";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -35,7 +35,13 @@ public class BuildHouseGoal extends ObjectiveGoal<ClanObjective>
|
||||
|
||||
public BuildHouseGoal(ClanObjective objective)
|
||||
{
|
||||
super(objective, "Build a House", "Build a Stone Brick house. (Place all your blocks)");
|
||||
super(
|
||||
objective,
|
||||
"Build a House",
|
||||
"Build a House (place all your blocks)",
|
||||
"The first thing you should do on your land is build a house, even " +
|
||||
"if it’s made of dirt! This will give you a safe place to store your loot!"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -22,7 +22,13 @@ public class ClaimLandGoal extends ObjectiveGoal<ClanObjective>
|
||||
{
|
||||
public ClaimLandGoal(ClanObjective objective)
|
||||
{
|
||||
super(objective, "Claim Land", "Claim land by opening the Clan Management page with /c and click the Claim Land Button");
|
||||
super(
|
||||
objective,
|
||||
"Claim Land",
|
||||
"Claim Land using the Clan Menu ( Type /c )",
|
||||
"The first thing your Clan needs to do before you can start to " +
|
||||
"build your fortress is claim the land in an area for your Clan."
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -22,7 +22,14 @@ public class ClanInfoGoal extends ObjectiveGoal<AttackEnemyObjective>
|
||||
{
|
||||
public ClanInfoGoal(AttackEnemyObjective objective)
|
||||
{
|
||||
super(objective, "Lookup Enemy Details", "View info about the enemy clan by typing /c EnemyClan");
|
||||
super(
|
||||
objective,
|
||||
"Lookup Enemy Details",
|
||||
"View info about the enemy clan by typing /c EnemyClan",
|
||||
"You can lookup details about your enemy before going for an " +
|
||||
"attack! This can give you a crucial advantage before " +
|
||||
"you begin."
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -19,7 +19,13 @@ public class ClanManagementGoal extends ObjectiveGoal<ClanObjective>
|
||||
{
|
||||
public ClanManagementGoal(ClanObjective objective)
|
||||
{
|
||||
super(objective, "Open the Clan Menu", "Manage your clan by using the command /c");
|
||||
super(
|
||||
objective,
|
||||
"Open the Clan Menu",
|
||||
"Open the Clan Menu ( Type /c )",
|
||||
"Clan Menu lets you view all clan information and perform actions: " +
|
||||
"who is online, Claiming Land, Inviting Players and much more."
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,5 +1,6 @@
|
||||
package mineplex.game.clans.tutorial.tutorials.clans.objective.goals.clan;
|
||||
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.game.clans.clans.gui.events.ClansButtonClickEvent;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -14,7 +15,14 @@ public class CreateClanGoal extends ObjectiveGoal<ClanObjective>
|
||||
{
|
||||
public CreateClanGoal(ClanObjective objective)
|
||||
{
|
||||
super(objective, "Create a Clan", "Create a Clan using /c create");
|
||||
super(
|
||||
objective,
|
||||
"Create a Clan",
|
||||
"Type /c create <name> to create a new Clan",
|
||||
F.elem("Clans") + " are groups of players that can claim land, build fortresses, " +
|
||||
"and fight epic battles. Together they will challenge other clans for " +
|
||||
"control of the land."
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -7,6 +7,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.game.clans.tutorial.TutorialRegion;
|
||||
@ -18,7 +19,15 @@ public class LeaveSpawnGoal extends ObjectiveGoal<ClanObjective>
|
||||
{
|
||||
public LeaveSpawnGoal(ClanObjective objective)
|
||||
{
|
||||
super(objective, "Leave Spawn", "Exit the tutorial spawn area");
|
||||
super(
|
||||
objective,
|
||||
"Leave Spawn",
|
||||
"Jump off Spawn Island",
|
||||
F.elem("Spawn Island") + " is where you will respawn when you die. This area is " +
|
||||
"a " + F.elem("Safe Zone") + ", meaning that players cannot hurt each other. " +
|
||||
"From here, you can teleport to various places, as well as read some helpful " +
|
||||
"hints. To leave " + F.elem("Spawn Island") + ", simply jump off!"
|
||||
);
|
||||
|
||||
// 2 seconds after start message
|
||||
setStartMessageDelay(20 * 3);
|
||||
|
@ -18,7 +18,14 @@ public class SetHomeGoal extends ObjectiveGoal<ClanObjective>
|
||||
{
|
||||
public SetHomeGoal(ClanObjective objective)
|
||||
{
|
||||
super(objective, "Set Clan Home", "Set your Clan's home by typing /c sethome");
|
||||
super(
|
||||
objective,
|
||||
"Set Clan Home",
|
||||
"Set your Clan's Home ( Type /c sethome )",
|
||||
"Your Clan Home is a special place in your base that you can teleport " +
|
||||
"to from " + F.elem("Spawn Island") + ". You can teleport to it " +
|
||||
"at any time by typing " + F.elem("/c home") + "."
|
||||
);
|
||||
|
||||
setDisplayFinishMessage(false);
|
||||
}
|
||||
|
@ -11,7 +11,13 @@ public class EquipDefaultBuildGoal extends ObjectiveGoal<ClassesObjective>
|
||||
{
|
||||
public EquipDefaultBuildGoal(ClassesObjective objective)
|
||||
{
|
||||
super(objective, "Equip Armor", "Equip your newly bought armor to try out it's abilities");
|
||||
super(
|
||||
objective,
|
||||
"Equip Armor",
|
||||
"Put on your Iron Armor",
|
||||
"When you wear a full set of armor, it will equip a class! The Iron set makes you " +
|
||||
"into a Knight. Each class has different skills and is strong in its own way."
|
||||
);
|
||||
|
||||
setStartMessageDelay(120);
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.game.clans.tutorial.objective.ObjectiveGoal;
|
||||
@ -14,7 +15,13 @@ public class OpenClassManagerGoal extends ObjectiveGoal<ClassesObjective>
|
||||
{
|
||||
public OpenClassManagerGoal(ClassesObjective objective)
|
||||
{
|
||||
super(objective, "Open Class Manager", "Open the Class Manager by right clicking on an enchantment table");
|
||||
super(
|
||||
objective, "Open Class Manager",
|
||||
"Right-Click on the Enchantment Table",
|
||||
"Each class has lots of different skills, and you can pick which ones you want to " +
|
||||
"equip! Click on an " + F.elem("Enchanting Table") + " to have a look at " +
|
||||
"this menu."
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -4,6 +4,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.game.clans.clans.ClansManager;
|
||||
import mineplex.game.clans.tutorial.objective.ObjectiveGoal;
|
||||
@ -32,6 +33,11 @@ public class SelectBullsChargeGoal extends ObjectiveGoal<ClassesObjective>
|
||||
@EventHandler
|
||||
public void update(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.TICK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
getActivePlayers().forEach(uuid -> {
|
||||
Player player = UtilPlayer.searchExact(uuid);
|
||||
|
||||
|
@ -11,7 +11,13 @@ public class UseBullsChargeGoal extends ObjectiveGoal<ClassesObjective>
|
||||
{
|
||||
public UseBullsChargeGoal(ClassesObjective objective)
|
||||
{
|
||||
super(objective, "Use Bulls Charge", "Use the Bull's Charge skill to make yourself run faster");
|
||||
super(
|
||||
objective,
|
||||
"Use Bulls Charge",
|
||||
"Right-Click with Axe to use Bull's Charge",
|
||||
"One of your default abilities as Knight is Bulls Charge. This ability will make " +
|
||||
"you run faster for a short time, and deal extra damage to enemies."
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -12,7 +12,12 @@ public class BuyEnergyGoal extends ObjectiveGoal<EnergyObjective>
|
||||
{
|
||||
public BuyEnergyGoal(EnergyObjective objective)
|
||||
{
|
||||
super(objective, "Buy Energy", "Buy Energy from the Energy Shop");
|
||||
super(
|
||||
objective,
|
||||
"Buy Energy",
|
||||
"Buy Clan Energy from the Energy Shop",
|
||||
"You can buy Clan Energy at the Shops."
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -17,7 +17,14 @@ public class ExplainEnergyGoal extends ObjectiveGoal<EnergyObjective>
|
||||
{
|
||||
public ExplainEnergyGoal(EnergyObjective objective)
|
||||
{
|
||||
super(objective, "About Energy", "Check your Energy");
|
||||
super(
|
||||
objective,
|
||||
"About Energy",
|
||||
"Look at your energy in your Clans Menu ( Type /c )",
|
||||
"Owning land isn’t free! You will need to buy Energy from the Shops to retain " +
|
||||
"ownership of it. If your Clan Energy ever reaches 0, you will lose your " +
|
||||
"land claims!"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -20,7 +20,13 @@ public class GoToFieldsGoal extends ObjectiveGoal<FieldsObjective>
|
||||
{
|
||||
public GoToFieldsGoal(FieldsObjective objective)
|
||||
{
|
||||
super(objective, "Go to the Fields", "Run to the center of the map, to the Fields");
|
||||
super(
|
||||
objective,
|
||||
"Go to the Fields",
|
||||
"Go to the Fields",
|
||||
"The Fields are a very dangerous place where players come to fight and harvest " +
|
||||
"resources!"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -25,7 +25,13 @@ public class MineDiamondsGoal extends ObjectiveGoal<FieldsObjective>
|
||||
|
||||
public MineDiamondsGoal(FieldsObjective objective)
|
||||
{
|
||||
super(objective, "Mine Diamonds", "Search for some diamonds in the Fields and mine them");
|
||||
super(
|
||||
objective,
|
||||
"Mine Diamonds",
|
||||
"Search for some diamonds in the Fields and mine them",
|
||||
"Mining in the Fields is a great way to make lots of money! The ores will " +
|
||||
"regenerate over time. Be careful of enemies though!"
|
||||
);
|
||||
|
||||
_playersMap = new HashMap<>();
|
||||
}
|
||||
|
@ -15,7 +15,12 @@ public class SellDiamondsGoal extends ObjectiveGoal<FieldsObjective>
|
||||
{
|
||||
public SellDiamondsGoal(FieldsObjective objective)
|
||||
{
|
||||
super(objective, "Sell Diamonds", "Return to shops and sell your diamonds to the Mining NPC");
|
||||
super(
|
||||
objective,
|
||||
"Sell Diamonds",
|
||||
"Sell your Diamonds to the Mining Shop",
|
||||
"Go back to the Shops and sell your precious diamonds!"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -19,7 +19,14 @@ public class DisbandClanGoal extends ObjectiveGoal<FinalObjective>
|
||||
{
|
||||
public DisbandClanGoal(FinalObjective objective)
|
||||
{
|
||||
super(objective, "Disband Clan", "Use the /c command to disband your Tutorial Clan");
|
||||
super(
|
||||
objective,
|
||||
"Disband Clan",
|
||||
"Disband your Clan ( Type /c )",
|
||||
"Now that the tutorial is almost finished, let’s delete your Clan. Disbanding a " +
|
||||
"Clan will delete it, and unclaim all of your land. Open the Clans Menu " +
|
||||
"and do this now."
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -20,7 +20,12 @@ public class TpClanHomeGoal extends ObjectiveGoal<FinalObjective>
|
||||
{
|
||||
public TpClanHomeGoal(FinalObjective objective)
|
||||
{
|
||||
super(objective, "Teleport to Clan Home", "Use the /c home command to teleport to your Clan Home");
|
||||
super(
|
||||
objective,
|
||||
"Teleport to Clan Home",
|
||||
"Teleport back to your Clan Home ( Type /c home )",
|
||||
"You can teleport back to your Clan Home at any time, as long as it's set!"
|
||||
);
|
||||
|
||||
setStartMessageDelay(120);
|
||||
}
|
||||
|
@ -20,7 +20,12 @@ public class GoToShopsGoal extends ObjectiveGoal<ShopsObjective>
|
||||
{
|
||||
public GoToShopsGoal(ShopsObjective objective)
|
||||
{
|
||||
super(objective, "Go to the Shops", "Head over to the Shops (use your map)");
|
||||
super(
|
||||
objective,
|
||||
"Go to the Shops",
|
||||
"Head over to the Shops (use your map)",
|
||||
"The shops are the place where you can buy and sell all sorts of items!"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -22,6 +22,16 @@ public class PurchaseGoal extends ObjectiveGoal
|
||||
setDisplayFinishMessage(false);
|
||||
}
|
||||
|
||||
public PurchaseGoal(Objective objective, Material material, String name, String description,
|
||||
String helpText)
|
||||
{
|
||||
super(objective, name, description, helpText);
|
||||
_material = material;
|
||||
|
||||
setDisplayStartMessage(false);
|
||||
setDisplayFinishMessage(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void customStart(Player player)
|
||||
{
|
||||
|
@ -16,7 +16,14 @@ public class SellPotatoesGoal extends ObjectiveGoal<ShopsObjective>
|
||||
{
|
||||
public SellPotatoesGoal(ShopsObjective objective)
|
||||
{
|
||||
super(objective, "Sell Potatoes", "Right click the Organic Produce NPC and sell your potatoes");
|
||||
super(
|
||||
objective,
|
||||
"Sell Potatoes",
|
||||
"Sell your Potatoes to the " + F.elem("Organic Produce Shop NPC") + ".",
|
||||
"Farming is a great way to make money in Clans. Build a farm in your land, " +
|
||||
"harvest " +
|
||||
"the crops and sell it to the shops for profit!"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user