ReqTitlesAvailable
This commit is contained in:
parent
602ac30f8c
commit
e0548bbc60
@ -7,6 +7,7 @@ public class Lang
|
||||
|
||||
public static final String COMMAND_SENDER_MUST_BE_PLAYER = "<b>This command can only be used by ingame players.";
|
||||
public static final String COMMAND_SENDER_MUSNT_BE_PLAYER = "<b>This command can not be used by ingame players.";
|
||||
public static final String COMMAND_TITLES_MUST_BE_AVAILABLE = "<b>This command requires the Minecraft 1.8 titles.";
|
||||
public static final String COMMAND_TOO_FEW_ARGS = "<b>Not enough command input. <i>You should use it like this:";
|
||||
public static final String COMMAND_TOO_MANY_ARGS = "<b>Too much command input %s<b>.";
|
||||
public static final String COMMAND_TOO_MANY_ARGS2 = "<i>You should use the command like this:";
|
||||
|
@ -0,0 +1,37 @@
|
||||
package com.massivecraft.massivecore.cmd.req;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.massivecraft.massivecore.Lang;
|
||||
import com.massivecraft.massivecore.cmd.MassiveCommand;
|
||||
import com.massivecraft.massivecore.mixin.Mixin;
|
||||
import com.massivecraft.massivecore.util.Txt;
|
||||
|
||||
public class ReqTitlesAvailable extends ReqAbstract
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// -------------------------------------------- //
|
||||
// INSTANCE & CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static ReqTitlesAvailable i = new ReqTitlesAvailable();
|
||||
public static ReqTitlesAvailable get() { return i; }
|
||||
|
||||
// -------------------------------------------- //
|
||||
// OVERRIDE
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public boolean apply(CommandSender sender, MassiveCommand command)
|
||||
{
|
||||
return Mixin.isTitlesAvailable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String createErrorMessage(CommandSender sender, MassiveCommand command)
|
||||
{
|
||||
return Txt.parse(Lang.COMMAND_TITLES_MUST_BE_AVAILABLE);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user