Add Rules Command (#272)

* Added a /rules command

* Remove unused space

* More Spaces!
This commit is contained in:
Sam 2016-11-17 00:59:24 +00:00 committed by Shaun Bennett
parent 70ca2c7964
commit 684432d7dc
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,26 @@
package mineplex.core.punish.Command;
import org.bukkit.entity.Player;
import mineplex.core.command.CommandBase;
import mineplex.core.common.Rank;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.punish.Punish;
public class RulesCommand extends CommandBase<Punish>
{
private static final String RULES_MESSAGE = "The rules can be found here:" + C.cGreen + " www.mineplex.com/rules";
public RulesCommand(Punish plugin)
{
super(plugin, Rank.ALL, "rules");
}
@Override
public void Execute(Player caller, String[] args)
{
caller.sendMessage(F.main("Rules", RULES_MESSAGE));
}
}

View File

@ -30,6 +30,7 @@ import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTime;
import mineplex.core.common.util.UtilTime.TimeUnit;
import mineplex.core.punish.Command.PunishCommand;
import mineplex.core.punish.Command.RulesCommand;
import mineplex.core.punish.Tokens.PunishClientToken;
import mineplex.core.punish.Tokens.PunishmentToken;
import mineplex.core.updater.UpdateType;
@ -62,6 +63,7 @@ public class Punish extends MiniPlugin
public void addCommands()
{
addCommand(new PunishCommand(this));
addCommand(new RulesCommand(this));
}
@EventHandler