2018-09-21 08:28:20 +02:00
|
|
|
package com.massivecraft.factions.cmd;
|
|
|
|
|
2019-06-29 03:49:46 +02:00
|
|
|
import com.massivecraft.factions.SaberFactions;
|
2018-09-21 08:29:28 +02:00
|
|
|
import com.massivecraft.factions.struct.Permission;
|
|
|
|
import com.massivecraft.factions.zcore.util.TL;
|
|
|
|
|
2018-11-07 06:38:43 +01:00
|
|
|
public class CmdPaypalSet extends FCommand {
|
2018-09-21 08:29:28 +02:00
|
|
|
|
2019-03-03 04:51:21 +01:00
|
|
|
public CmdPaypalSet() {
|
|
|
|
this.aliases.add("setpaypal");
|
|
|
|
this.requiredArgs.add("email");
|
2019-06-02 07:52:34 +02:00
|
|
|
|
2019-03-03 04:51:21 +01:00
|
|
|
this.permission = Permission.PAYPALSET.node;
|
2019-06-02 07:52:34 +02:00
|
|
|
|
2019-03-03 04:51:21 +01:00
|
|
|
this.disableOnLock = false;
|
|
|
|
this.senderMustBePlayer = true;
|
2019-06-02 07:52:34 +02:00
|
|
|
this.senderMustBeMember = true;
|
2019-03-03 04:51:21 +01:00
|
|
|
this.senderMustBeModerator = false;
|
2019-03-23 07:02:46 +01:00
|
|
|
this.senderMustBeColeader = false;
|
|
|
|
this.senderMustBeAdmin = true;
|
2018-12-21 22:46:10 +01:00
|
|
|
|
2019-03-03 04:51:21 +01:00
|
|
|
}
|
2019-03-23 07:02:46 +01:00
|
|
|
@Override
|
2019-03-03 04:51:21 +01:00
|
|
|
public void perform() {
|
2019-06-29 03:49:46 +02:00
|
|
|
if (!SaberFactions.plugin.getConfig().getBoolean("fpaypal.Enabled")) {
|
2019-03-03 04:51:21 +01:00
|
|
|
fme.msg(TL.GENERIC_DISABLED);
|
2019-03-23 07:02:46 +01:00
|
|
|
return;
|
2019-03-03 04:51:21 +01:00
|
|
|
}
|
2019-03-23 07:02:46 +01:00
|
|
|
|
|
|
|
String paypal = this.argAsString(0);
|
|
|
|
if(paypal == null)
|
|
|
|
return;
|
|
|
|
myFaction.paypalSet(paypal);
|
|
|
|
fme.msg(TL.COMMAND_PAYPALSET_SUCCESSFUL, paypal);
|
2019-03-03 04:51:21 +01:00
|
|
|
}
|
2018-09-21 08:29:28 +02:00
|
|
|
|
2019-03-23 07:02:46 +01:00
|
|
|
@Override
|
2019-03-03 04:51:21 +01:00
|
|
|
public TL getUsageTranslation() {
|
|
|
|
return TL.COMMAND_PAYPALSET_DESCRIPTION;
|
|
|
|
}
|
2018-09-21 08:28:20 +02:00
|
|
|
}
|
2018-09-21 08:29:28 +02:00
|
|
|
|