Add bypass for testing servers to skip tutorials
This commit is contained in:
parent
08784d3f0a
commit
c172d226c4
@ -10,14 +10,16 @@ public class FinishCommand extends CommandBase<TutorialManager>
|
|||||||
{
|
{
|
||||||
public FinishCommand(TutorialManager plugin)
|
public FinishCommand(TutorialManager plugin)
|
||||||
{
|
{
|
||||||
super(plugin, Rank.JNR_DEV, "finish", "end");
|
super(plugin, Rank.ALL, "finish", "end");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void Execute(Player caller, String[] args)
|
public void Execute(Player caller, String[] args)
|
||||||
|
{
|
||||||
|
boolean testServer = Plugin.getPlugin().getConfig().getString("serverstatus.group").equalsIgnoreCase("Testing");
|
||||||
|
if (CommandCenter.Instance.GetClientManager().hasRank(caller, testServer ? Rank.ALL : Rank.JNR_DEV))
|
||||||
{
|
{
|
||||||
Plugin.finishTutorial(caller);
|
Plugin.finishTutorial(caller);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ public class TutorialCommand extends MultiCommandBase<TutorialManager>
|
|||||||
{
|
{
|
||||||
public TutorialCommand(TutorialManager plugin)
|
public TutorialCommand(TutorialManager plugin)
|
||||||
{
|
{
|
||||||
super(plugin, Rank.JNR_DEV, "tutorial", "tut");
|
super(plugin, Rank.ALL, "tutorial", "tut");
|
||||||
|
|
||||||
AddCommand(new StartCommand(plugin));
|
AddCommand(new StartCommand(plugin));
|
||||||
AddCommand(new FinishCommand(plugin));
|
AddCommand(new FinishCommand(plugin));
|
||||||
@ -24,4 +24,14 @@ public class TutorialCommand extends MultiCommandBase<TutorialManager>
|
|||||||
{
|
{
|
||||||
UtilPlayer.message(caller, F.main("Tutorial", "/tutorial start <name>"));
|
UtilPlayer.message(caller, F.main("Tutorial", "/tutorial start <name>"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void Execute(Player caller, String[] args)
|
||||||
|
{
|
||||||
|
boolean testServer = Plugin.getPlugin().getConfig().getString("serverstatus.group").equalsIgnoreCase("Testing");
|
||||||
|
if (CommandCenter.GetClientManager().hasRank(caller, testServer ? Rank.ALL : Rank.JNR_DEV))
|
||||||
|
{
|
||||||
|
super.Execute(caller, args);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user