Package com.massivecraft.factions.cmd

## Class CommandContext

- java.lang.Object
- - com.massivecraft.factions.cmd.CommandContext

    public class CommandContext
    extends java.lang.Object

### Field Summary

Fields
Modifier and Type | Field | Description
--- | --- | ---
`java.lang.String` | `alias` |
`java.util.List<java.lang.String>` | `args` |
`java.util.List<FCommand>` | `commandChain` |
`Faction` | `faction` |
`FPlayer` | `fPlayer` |
`org.bukkit.entity.Player` | `player` |
`org.bukkit.command.CommandSender` | `sender` |

### Constructor Summary

Constructors
Constructor | Description
--- | ---
`CommandContext​(org.bukkit.command.CommandSender sender, java.util.List<java.lang.String> args, java.lang.String alias)` |

### Method Summary

Modifier and Type | Method | Description
--- | --- | ---
`FPlayer` | `argAsBestFPlayerMatch​(int idx)` |
`FPlayer` | `argAsBestFPlayerMatch​(int idx, FPlayer def)` |
`FPlayer` | `argAsBestFPlayerMatch​(int idx, FPlayer def, boolean msg)` |
`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)` |
`Faction` | `argAsFaction​(int idx)` |
`Faction` | `argAsFaction​(int idx, Faction def)` |
`Faction` | `argAsFaction​(int idx, Faction def, boolean msg)` |
`FPlayer` | `argAsFPlayer​(int idx)` |
`FPlayer` | `argAsFPlayer​(int idx, FPlayer def)` |
`FPlayer` | `argAsFPlayer​(int idx, FPlayer def, boolean msg)` |
`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)` |
`boolean` | `assertHasFaction()` |
`boolean` | `assertMinRole​(Role role)` |
`boolean` | `canAffordCommand​(double cost, java.lang.String toDoThis)` |
`boolean` | `canIAdministerYou​(FPlayer i, FPlayer you)` |
`void` | `doWarmUp​(FPlayer player, WarmUpUtil.Warmup warmup, TL translationKey, java.lang.String action, java.lang.Runnable runnable, long delay)` |
`void` | `doWarmUp​(WarmUpUtil.Warmup warmup, TL translationKey, java.lang.String action, java.lang.Runnable runnable, long delay)` |
`void` | `msg​(TL translation, java.lang.Object... args)` |
`void` | `msg​(java.lang.String str, java.lang.Object... args)` |
`boolean` | `payForCommand​(double cost, TL toDoThis, TL forDoingThis)` |
`boolean` | `payForCommand​(double cost, java.lang.String toDoThis, java.lang.String forDoingThis)` |
`void` | `sendFancyMessage​(java.util.List<mkremins.fanciful.FancyMessage> messages)` |
`void` | `sendFancyMessage​(mkremins.fanciful.FancyMessage message)` |
`void` | `sendMessage​(java.lang.String msg)` |
`void` | `sendMessage​(java.util.List<java.lang.String> msgs)` |
`FPlayer` | `strAsBestFPlayerMatch​(java.lang.String name, FPlayer def, boolean msg)` |
`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)` |
`Faction` | `strAsFaction​(java.lang.String name, Faction def, boolean msg)` |
`FPlayer` | `strAsFPlayer​(java.lang.String name, FPlayer def, boolean msg)` |
`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)` |

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### sender

    public org.bukkit.command.CommandSender sender

#### player

    public org.bukkit.entity.Player player

#### fPlayer

    public FPlayer fPlayer

#### faction

    public Faction faction

#### args

    public java.util.List<java.lang.String> args

#### alias

    public java.lang.String alias

#### commandChain

    public java.util.List<FCommand> commandChain

### Constructor Detail

#### CommandContext

    public CommandContext​(org.bukkit.command.CommandSender sender,
                          java.util.List<java.lang.String> args,
                          java.lang.String alias)

### Method Detail

#### msg

    public void msg​(java.lang.String str,
                    java.lang.Object... args)

#### msg

    public void msg​(TL translation,
                    java.lang.Object... args)

#### sendMessage

    public void sendMessage​(java.lang.String msg)

#### sendMessage

    public void sendMessage​(java.util.List<java.lang.String> msgs)

#### sendFancyMessage

    public void sendFancyMessage​(mkremins.fanciful.FancyMessage message)

#### sendFancyMessage

    public void sendFancyMessage​(java.util.List<mkremins.fanciful.FancyMessage> messages)

#### argIsSet

    public boolean argIsSet​(int idx)

#### argAsString

    public java.lang.String argAsString​(int idx,
                                        java.lang.String def)

#### argAsString

    public java.lang.String argAsString​(int idx)

#### strAsInt

    public java.lang.Integer strAsInt​(java.lang.String str,
                                      java.lang.Integer def)

#### argAsInt

    public java.lang.Integer argAsInt​(int idx,
                                      java.lang.Integer def)

#### argAsInt

    public java.lang.Integer argAsInt​(int idx)

#### strAsDouble

    public java.lang.Double strAsDouble​(java.lang.String str,
                                        java.lang.Double def)

#### argAsDouble

    public java.lang.Double argAsDouble​(int idx,
                                        java.lang.Double def)

#### argAsDouble

    public java.lang.Double argAsDouble​(int idx)

#### strAsBool

    public java.lang.Boolean strAsBool​(java.lang.String str)

#### argAsBool

    public java.lang.Boolean argAsBool​(int idx,
                                       boolean def)

#### argAsBool

    public java.lang.Boolean argAsBool​(int idx)

#### strAsPlayer

    public org.bukkit.entity.Player strAsPlayer​(java.lang.String name,
                                                org.bukkit.entity.Player def,
                                                boolean msg)

#### argAsPlayer

    public org.bukkit.entity.Player argAsPlayer​(int idx,
                                                org.bukkit.entity.Player def,
                                                boolean msg)

#### argAsPlayer

    public org.bukkit.entity.Player argAsPlayer​(int idx,
                                                org.bukkit.entity.Player def)

#### argAsPlayer

    public org.bukkit.entity.Player argAsPlayer​(int idx)

#### strAsBestPlayerMatch

    public org.bukkit.entity.Player strAsBestPlayerMatch​(java.lang.String name,
                                                         org.bukkit.entity.Player def,
                                                         boolean msg)

#### argAsBestPlayerMatch

    public org.bukkit.entity.Player argAsBestPlayerMatch​(int idx,
                                                         org.bukkit.entity.Player def,
                                                         boolean msg)

#### argAsBestPlayerMatch

    public org.bukkit.entity.Player argAsBestPlayerMatch​(int idx,
                                                         org.bukkit.entity.Player def)

#### argAsBestPlayerMatch

    public org.bukkit.entity.Player argAsBestPlayerMatch​(int idx)

#### strAsFPlayer

    public FPlayer strAsFPlayer​(java.lang.String name,
                                FPlayer def,
                                boolean msg)

#### argAsFPlayer

    public FPlayer argAsFPlayer​(int idx,
                                FPlayer def,
                                boolean msg)

#### argAsFPlayer

    public FPlayer argAsFPlayer​(int idx,
                                FPlayer def)

#### argAsFPlayer

    public FPlayer argAsFPlayer​(int idx)

#### strAsBestFPlayerMatch

    public FPlayer strAsBestFPlayerMatch​(java.lang.String name,
                                         FPlayer def,
                                         boolean msg)

#### argAsBestFPlayerMatch

    public FPlayer argAsBestFPlayerMatch​(int idx,
                                         FPlayer def,
                                         boolean msg)

#### argAsBestFPlayerMatch

    public FPlayer argAsBestFPlayerMatch​(int idx,
                                         FPlayer def)

#### argAsBestFPlayerMatch

    public FPlayer argAsBestFPlayerMatch​(int idx)

#### strAsFaction

    public Faction strAsFaction​(java.lang.String name,
                                Faction def,
                                boolean msg)

#### argAsFaction

    public Faction argAsFaction​(int idx,
                                Faction def,
                                boolean msg)

#### argAsFaction

    public Faction argAsFaction​(int idx,
                                Faction def)

#### argAsFaction

    public Faction argAsFaction​(int idx)

#### assertHasFaction

    public boolean assertHasFaction()

#### assertMinRole

    public boolean assertMinRole​(Role role)

#### canIAdministerYou

    public boolean canIAdministerYou​(FPlayer i,
                                     FPlayer you)

#### payForCommand

    public boolean payForCommand​(double cost,
                                 java.lang.String toDoThis,
                                 java.lang.String forDoingThis)

#### payForCommand

    public boolean payForCommand​(double cost,
                                 TL toDoThis,
                                 TL forDoingThis)

#### canAffordCommand

    public boolean canAffordCommand​(double cost,
                                    java.lang.String toDoThis)

#### doWarmUp

    public void doWarmUp​(WarmUpUtil.Warmup warmup,
                         TL translationKey,
                         java.lang.String action,
                         java.lang.Runnable runnable,
                         long delay)

#### doWarmUp

    public void doWarmUp​(FPlayer player,
                         WarmUpUtil.Warmup warmup,
                         TL translationKey,
                         java.lang.String action,
                         java.lang.Runnable runnable,
                         long delay)