public abstract class MCommand<T extends MPlugin>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.util.List<java.lang.String> |
aliases |
boolean |
allowNoSlashAccess |
java.util.List<java.lang.String> |
args |
java.util.List<MCommand<?>> |
commandChain |
boolean |
errorOnToManyArgs |
java.util.List<java.lang.String> |
helpLong |
org.bukkit.entity.Player |
me |
java.util.LinkedHashMap<java.lang.String,java.lang.String> |
optionalArgs |
T |
p |
java.lang.String |
permission |
java.util.List<java.lang.String> |
requiredArgs |
org.bukkit.command.CommandSender |
sender |
boolean |
senderIsConsole |
boolean |
senderMustBePlayer |
java.util.List<MCommand<?>> |
subCommands |
CommandVisibility |
visibility |
Modifier and Type | Method and Description |
---|---|
void |
addSubCommand(MCommand<?> subCommand) |
org.bukkit.entity.Player |
argAsBestPlayerMatch(int idx) |
org.bukkit.entity.Player |
argAsBestPlayerMatch(int idx,
org.bukkit.entity.Player def) |
org.bukkit.entity.Player |
argAsBestPlayerMatch(int idx,
org.bukkit.entity.Player def,
boolean msg) |
java.lang.Boolean |
argAsBool(int idx) |
java.lang.Boolean |
argAsBool(int idx,
boolean def) |
java.lang.Double |
argAsDouble(int idx) |
java.lang.Double |
argAsDouble(int idx,
java.lang.Double def) |
java.lang.Integer |
argAsInt(int idx) |
java.lang.Integer |
argAsInt(int idx,
java.lang.Integer def) |
org.bukkit.entity.Player |
argAsPlayer(int idx) |
org.bukkit.entity.Player |
argAsPlayer(int idx,
org.bukkit.entity.Player def) |
org.bukkit.entity.Player |
argAsPlayer(int idx,
org.bukkit.entity.Player def,
boolean msg) |
java.lang.String |
argAsString(int idx) |
java.lang.String |
argAsString(int idx,
java.lang.String def) |
boolean |
argIsSet(int idx) |
void |
execute(org.bukkit.command.CommandSender sender,
java.util.List<java.lang.String> args) |
void |
execute(org.bukkit.command.CommandSender sender,
java.util.List<java.lang.String> args,
java.util.List<MCommand<?>> commandChain) |
java.lang.String |
getHelpShort() |
java.util.List<java.lang.String> |
getToolTips(Faction faction) |
java.util.List<java.lang.String> |
getToolTips(FPlayer player) |
abstract TL |
getUsageTranslation() |
java.lang.String |
getUseageTemplate() |
java.lang.String |
getUseageTemplate(boolean addShortHelp) |
java.lang.String |
getUseageTemplate(java.util.List<MCommand<?>> commandChain,
boolean addShortHelp) |
boolean |
isEnabled() |
void |
msg(java.lang.String str,
java.lang.Object... args) |
void |
msg(TL translation,
java.lang.Object... args) |
abstract void |
perform() |
java.lang.String |
replaceFactionTags(java.lang.String s,
Faction faction) |
java.lang.String |
replaceFPlayerTags(java.lang.String s,
FPlayer player) |
void |
sendFancyMessage(mkremins.fanciful.FancyMessage message) |
void |
sendFancyMessage(java.util.List<mkremins.fanciful.FancyMessage> messages) |
void |
sendMessage(java.util.List<java.lang.String> msgs) |
void |
sendMessage(java.lang.String msg) |
void |
setHelpShort(java.lang.String val) |
org.bukkit.entity.Player |
strAsBestPlayerMatch(java.lang.String name,
org.bukkit.entity.Player def,
boolean msg) |
java.lang.Boolean |
strAsBool(java.lang.String str) |
java.lang.Double |
strAsDouble(java.lang.String str,
java.lang.Double def) |
java.lang.Integer |
strAsInt(java.lang.String str,
java.lang.Integer def) |
org.bukkit.entity.Player |
strAsPlayer(java.lang.String name,
org.bukkit.entity.Player def,
boolean msg) |
boolean |
validArgs(java.util.List<java.lang.String> args) |
boolean |
validArgs(java.util.List<java.lang.String> args,
org.bukkit.command.CommandSender sender) |
boolean |
validCall(org.bukkit.command.CommandSender sender,
java.util.List<java.lang.String> args)
In this method we validate that all prerequisites to perform this command has been met.
|
boolean |
validSenderPermissions(org.bukkit.command.CommandSender sender,
boolean informSenderIfNot) |
boolean |
validSenderType(org.bukkit.command.CommandSender sender,
boolean informSenderIfNot) |
public java.util.List<MCommand<?>> subCommands
public java.util.List<java.lang.String> aliases
public boolean allowNoSlashAccess
public java.util.List<java.lang.String> requiredArgs
public java.util.LinkedHashMap<java.lang.String,java.lang.String> optionalArgs
public boolean errorOnToManyArgs
public java.util.List<java.lang.String> helpLong
public CommandVisibility visibility
public boolean senderMustBePlayer
public java.lang.String permission
public org.bukkit.command.CommandSender sender
public org.bukkit.entity.Player me
public boolean senderIsConsole
public java.util.List<java.lang.String> args
public java.util.List<MCommand<?>> commandChain
public MCommand(T p)
public void addSubCommand(MCommand<?> subCommand)
public java.lang.String getHelpShort()
public void setHelpShort(java.lang.String val)
public abstract TL getUsageTranslation()
public void execute(org.bukkit.command.CommandSender sender, java.util.List<java.lang.String> args, java.util.List<MCommand<?>> commandChain)
public void execute(org.bukkit.command.CommandSender sender, java.util.List<java.lang.String> args)
public abstract void perform()
public boolean validCall(org.bukkit.command.CommandSender sender, java.util.List<java.lang.String> args)
public boolean isEnabled()
public boolean validSenderType(org.bukkit.command.CommandSender sender, boolean informSenderIfNot)
public boolean validSenderPermissions(org.bukkit.command.CommandSender sender, boolean informSenderIfNot)
public boolean validArgs(java.util.List<java.lang.String> args, org.bukkit.command.CommandSender sender)
public boolean validArgs(java.util.List<java.lang.String> args)
public java.lang.String getUseageTemplate(java.util.List<MCommand<?>> commandChain, boolean addShortHelp)
public java.lang.String getUseageTemplate(boolean addShortHelp)
public java.lang.String getUseageTemplate()
public void msg(java.lang.String str, java.lang.Object... args)
public void msg(TL translation, java.lang.Object... args)
public void sendMessage(java.lang.String msg)
public void sendMessage(java.util.List<java.lang.String> msgs)
public void sendFancyMessage(mkremins.fanciful.FancyMessage message)
public void sendFancyMessage(java.util.List<mkremins.fanciful.FancyMessage> messages)
public java.util.List<java.lang.String> getToolTips(FPlayer player)
public java.util.List<java.lang.String> getToolTips(Faction faction)
public java.lang.String replaceFPlayerTags(java.lang.String s, FPlayer player)
public java.lang.String replaceFactionTags(java.lang.String s, Faction faction)
public boolean argIsSet(int idx)
public java.lang.String argAsString(int idx, java.lang.String def)
public java.lang.String argAsString(int idx)
public java.lang.Integer strAsInt(java.lang.String str, java.lang.Integer def)
public java.lang.Integer argAsInt(int idx, java.lang.Integer def)
public java.lang.Integer argAsInt(int idx)
public java.lang.Double strAsDouble(java.lang.String str, java.lang.Double def)
public java.lang.Double argAsDouble(int idx, java.lang.Double def)
public java.lang.Double argAsDouble(int idx)
public java.lang.Boolean strAsBool(java.lang.String str)
public java.lang.Boolean argAsBool(int idx, boolean def)
public java.lang.Boolean argAsBool(int idx)
public org.bukkit.entity.Player strAsPlayer(java.lang.String name, org.bukkit.entity.Player def, boolean msg)
public org.bukkit.entity.Player argAsPlayer(int idx, org.bukkit.entity.Player def, boolean msg)
public org.bukkit.entity.Player argAsPlayer(int idx, org.bukkit.entity.Player def)
public org.bukkit.entity.Player argAsPlayer(int idx)
public org.bukkit.entity.Player strAsBestPlayerMatch(java.lang.String name, org.bukkit.entity.Player def, boolean msg)
public org.bukkit.entity.Player argAsBestPlayerMatch(int idx, org.bukkit.entity.Player def, boolean msg)
public org.bukkit.entity.Player argAsBestPlayerMatch(int idx, org.bukkit.entity.Player def)
public org.bukkit.entity.Player argAsBestPlayerMatch(int idx)