2018-09-21 08:28:20 +02:00
|
|
|
package com.massivecraft.factions.cmd;
|
|
|
|
|
2018-10-23 01:42:57 +02:00
|
|
|
import com.massivecraft.factions.SavageFactions;
|
2018-09-21 08:29:28 +02:00
|
|
|
import com.massivecraft.factions.struct.Permission;
|
|
|
|
import com.massivecraft.factions.zcore.util.TL;
|
|
|
|
|
|
|
|
public class CmdPaypalSet extends FCommand{
|
|
|
|
|
|
|
|
public CmdPaypalSet() {
|
|
|
|
this.aliases.add("setpaypal");
|
|
|
|
this.aliases.add("paypal");
|
|
|
|
this.requiredArgs.add("email");
|
|
|
|
this.permission = Permission.PAYPALSET.node;
|
|
|
|
this.disableOnLock = false;
|
|
|
|
this.senderMustBePlayer = true;
|
|
|
|
this.senderMustBeMember = false;
|
|
|
|
this.senderMustBeModerator = false;
|
|
|
|
this.senderMustBeColeader = true;
|
|
|
|
this.senderMustBeAdmin = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void perform() {
|
2018-10-23 01:42:57 +02:00
|
|
|
if (! SavageFactions.plugin.getConfig().getBoolean("fpaypal.Enabled")) {
|
2018-09-21 08:29:28 +02:00
|
|
|
fme.msg(TL.GENERIC_DISABLED);
|
|
|
|
} else {
|
|
|
|
String paypal = argAsString(0);
|
|
|
|
if (paypal != null) {
|
|
|
|
myFaction.paypalSet(paypal);
|
|
|
|
fme.msg(TL.COMMAND_PAYPALSET_SUCCESSFUL, paypal);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public TL getUsageTranslation() {
|
|
|
|
return TL.COMMAND_PAYPALSET_DESCRIPTION;
|
|
|
|
}
|
2018-09-21 08:28:20 +02:00
|
|
|
}
|
2018-09-21 08:29:28 +02:00
|
|
|
|