Adjust visuals
This commit is contained in:
parent
1aa4b4a47d
commit
2d30983711
@ -228,7 +228,7 @@ public abstract class Tutorial implements Listener, ObjectiveListener
|
|||||||
|
|
||||||
int objectiveIndex = session.getObjectiveIndex();
|
int objectiveIndex = session.getObjectiveIndex();
|
||||||
Objective currentObjective = _objectives.get(objectiveIndex);
|
Objective currentObjective = _objectives.get(objectiveIndex);
|
||||||
lines.add(C.cGoldB + "Current Task (" + (objectiveIndex + 1) + "/" + _objectives.size() + ")");
|
lines.add(C.cGoldB + currentObjective.getName(player)); //+ " (" + (objectiveIndex + 1) + "/" + _objectives.size() + ")");
|
||||||
currentObjective.addScoreboardLines(player, lines);
|
currentObjective.addScoreboardLines(player, lines);
|
||||||
}
|
}
|
||||||
return lines;
|
return lines;
|
||||||
|
@ -56,14 +56,6 @@ public abstract class OrderedObjective<Plugin> extends Objective<Plugin, Ordered
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getName(Player player)
|
|
||||||
{
|
|
||||||
OrderedObjectiveData data = getData(player);
|
|
||||||
int index = data == null ? 0 : data.getIndex();
|
|
||||||
return _goals.get(index).getName(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDescription(Player player)
|
public String getDescription(Player player)
|
||||||
{
|
{
|
||||||
|
@ -5,6 +5,8 @@ import java.util.List;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
import mineplex.core.common.util.C;
|
||||||
|
|
||||||
public abstract class SingleObjective<Plugin> extends Objective<Plugin, ObjectiveData>
|
public abstract class SingleObjective<Plugin> extends Objective<Plugin, ObjectiveData>
|
||||||
{
|
{
|
||||||
private final ObjectiveData _nullData;
|
private final ObjectiveData _nullData;
|
||||||
@ -42,9 +44,11 @@ public abstract class SingleObjective<Plugin> extends Objective<Plugin, Objectiv
|
|||||||
@Override
|
@Override
|
||||||
public void addScoreboardLines(Player player, List<String> lines)
|
public void addScoreboardLines(Player player, List<String> lines)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
if (contains(player))
|
if (contains(player))
|
||||||
{
|
{
|
||||||
lines.add(" " + getName(player));
|
lines.add(" " + C.cRed + getName(player));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -55,16 +55,6 @@ public abstract class UnorderedObjective<Plugin> extends Objective<Plugin, Unord
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getName(Player player)
|
|
||||||
{
|
|
||||||
// Use first incomplete objective
|
|
||||||
UnorderedObjectiveData data = getData(player);
|
|
||||||
if (data == null) return super.getName(player);
|
|
||||||
int index = data.getFirstIncompleteIndex();
|
|
||||||
return index == -1 ? super.getName(player) : _goals.get(index).getName(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDescription(Player player)
|
public String getDescription(Player player)
|
||||||
{
|
{
|
||||||
|
@ -44,13 +44,13 @@ import mineplex.game.clans.tutorial.tutorials.clans.objective.FinalObjective;
|
|||||||
import mineplex.game.clans.tutorial.tutorials.clans.objective.LeaveSpawnObjective;
|
import mineplex.game.clans.tutorial.tutorials.clans.objective.LeaveSpawnObjective;
|
||||||
import mineplex.game.clans.tutorial.tutorials.clans.objective.PurchaseItemsObjective;
|
import mineplex.game.clans.tutorial.tutorials.clans.objective.PurchaseItemsObjective;
|
||||||
import mineplex.game.clans.tutorial.tutorials.clans.objective.ShopsObjective;
|
import mineplex.game.clans.tutorial.tutorials.clans.objective.ShopsObjective;
|
||||||
import mineplex.game.clans.tutorial.tutorials.clans.repository.TutorialRepository;
|
//import mineplex.game.clans.tutorial.tutorials.clans.repository.TutorialRepository;
|
||||||
|
|
||||||
public class ClansMainTutorial extends Tutorial
|
public class ClansMainTutorial extends Tutorial
|
||||||
{
|
{
|
||||||
private TutorialMapManager _mapManager;
|
private TutorialMapManager _mapManager;
|
||||||
|
|
||||||
private TutorialRepository _repository;
|
// private TutorialRepository _repository;
|
||||||
|
|
||||||
public ClansMainTutorial(JavaPlugin plugin, ClansMessageManager message, HologramManager hologram, NpcManager npcManager)
|
public ClansMainTutorial(JavaPlugin plugin, ClansMessageManager message, HologramManager hologram, NpcManager npcManager)
|
||||||
{
|
{
|
||||||
@ -67,7 +67,7 @@ public class ClansMainTutorial extends Tutorial
|
|||||||
|
|
||||||
_mapManager = new TutorialMapManager(plugin, getWorldManager().getTutorialWorld(), -10, 0, 117, 127);
|
_mapManager = new TutorialMapManager(plugin, getWorldManager().getTutorialWorld(), -10, 0, 117, 127);
|
||||||
|
|
||||||
_repository = new TutorialRepository(ClansManager.getInstance().getClientManager());
|
// _repository = new TutorialRepository(ClansManager.getInstance().getClientManager());
|
||||||
|
|
||||||
addObjective(new LeaveSpawnObjective(this, plugin));
|
addObjective(new LeaveSpawnObjective(this, plugin));
|
||||||
addObjective(new ClanObjective(this, plugin));
|
addObjective(new ClanObjective(this, plugin));
|
||||||
@ -89,6 +89,7 @@ public class ClansMainTutorial extends Tutorial
|
|||||||
|
|
||||||
ClansManager.getInstance().getPvpTimer().unpause(player);
|
ClansManager.getInstance().getPvpTimer().unpause(player);
|
||||||
|
|
||||||
|
/*
|
||||||
ClansManager.getInstance().runAsync(() -> {
|
ClansManager.getInstance().runAsync(() -> {
|
||||||
_repository.SetTimesPlayed(player.getUniqueId(), _repository.GetTimesPlayed(player.getUniqueId()) + 1);
|
_repository.SetTimesPlayed(player.getUniqueId(), _repository.GetTimesPlayed(player.getUniqueId()) + 1);
|
||||||
|
|
||||||
@ -107,6 +108,7 @@ public class ClansMainTutorial extends Tutorial
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -341,12 +343,15 @@ public class ClansMainTutorial extends Tutorial
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onJoin(PlayerJoinEvent event)
|
public void onJoin(PlayerJoinEvent event)
|
||||||
{
|
{
|
||||||
|
start(event.getPlayer());
|
||||||
|
/*
|
||||||
ClansManager.getInstance().runAsync(() -> {
|
ClansManager.getInstance().runAsync(() -> {
|
||||||
if (_repository.GetTimesPlayed(event.getPlayer().getUniqueId()) == 0)
|
if (_repository.GetTimesPlayed(event.getPlayer().getUniqueId()) == 0)
|
||||||
{
|
{
|
||||||
ClansManager.getInstance().runSync(() -> start(event.getPlayer()));
|
ClansManager.getInstance().runSync(() -> start(event.getPlayer()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public TutorialMapManager getMapManager()
|
public TutorialMapManager getMapManager()
|
||||||
|
Loading…
Reference in New Issue
Block a user