2013-04-16 12:04:12 +02:00
|
|
|
package com.massivecraft.factions.cmd.req;
|
|
|
|
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
|
2014-09-17 13:17:33 +02:00
|
|
|
import com.massivecraft.factions.entity.MConf;
|
2014-06-04 14:02:23 +02:00
|
|
|
import com.massivecraft.massivecore.cmd.MassiveCommand;
|
|
|
|
import com.massivecraft.massivecore.cmd.req.ReqAbstract;
|
|
|
|
import com.massivecraft.massivecore.util.Txt;
|
2013-04-16 12:04:12 +02:00
|
|
|
|
|
|
|
public class ReqBankCommandsEnabled extends ReqAbstract
|
|
|
|
{
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// INSTANCE & CONSTRUCT
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
private static ReqBankCommandsEnabled i = new ReqBankCommandsEnabled();
|
|
|
|
public static ReqBankCommandsEnabled get() { return i; }
|
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// OVERRIDE
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
@Override
|
2014-06-04 14:02:23 +02:00
|
|
|
public boolean apply(CommandSender sender, MassiveCommand command)
|
2013-04-16 12:04:12 +02:00
|
|
|
{
|
2014-09-17 13:17:33 +02:00
|
|
|
return MConf.get().econEnabled && MConf.get().bankEnabled;
|
2013-04-16 12:04:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2014-06-04 14:02:23 +02:00
|
|
|
public String createErrorMessage(CommandSender sender, MassiveCommand command)
|
2013-04-16 12:04:12 +02:00
|
|
|
{
|
2014-09-17 13:17:33 +02:00
|
|
|
if (!MConf.get().bankEnabled)
|
2013-04-16 12:04:12 +02:00
|
|
|
{
|
2014-09-17 13:17:33 +02:00
|
|
|
return Txt.parse("<b>Faction banks are disabled.");
|
2013-04-16 12:04:12 +02:00
|
|
|
}
|
2014-09-17 13:17:33 +02:00
|
|
|
return Txt.parse("<b>Faction economy features are disabled.");
|
2013-04-16 12:04:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|