2018-09-21 08:28:20 +02:00
|
|
|
package com.massivecraft.factions.cmd;
|
|
|
|
|
2018-09-21 08:29:28 +02:00
|
|
|
import com.massivecraft.factions.Faction;
|
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;
|
|
|
|
|
2018-11-07 06:38:43 +01:00
|
|
|
public class CmdPaypalSee extends FCommand {
|
2019-03-03 04:51:21 +01:00
|
|
|
public CmdPaypalSee() {
|
|
|
|
aliases.add("seepaypal");
|
|
|
|
aliases.add("getpaypal");
|
|
|
|
requiredArgs.add("faction");
|
|
|
|
permission = Permission.ADMIN.node;
|
|
|
|
disableOnLock = false;
|
|
|
|
senderMustBePlayer = false;
|
|
|
|
senderMustBeMember = false;
|
|
|
|
senderMustBeModerator = false;
|
|
|
|
senderMustBeColeader = false;
|
|
|
|
senderMustBeAdmin = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public void perform() {
|
|
|
|
if (!SavageFactions.plugin.getConfig().getBoolean("fpaypal.Enabled")) {
|
|
|
|
fme.msg(TL.GENERIC_DISABLED);
|
|
|
|
} else {
|
|
|
|
Faction faction = argAsFaction(0);
|
|
|
|
|
|
|
|
if (faction != null) {
|
|
|
|
if (!faction.isWilderness() && !faction.isSafeZone() && !faction.isWarZone()) {
|
|
|
|
if (faction.getPaypal() != null) {
|
|
|
|
fme.msg(TL.COMMAND_PAYPALSEE_FACTION_PAYPAL.toString(), faction.getTag(), faction.getPaypal());
|
|
|
|
} else {
|
|
|
|
fme.msg(TL.COMMAND_PAYPALSEE_FACTION_NOTSET.toString(), faction.getTag(), faction.getPaypal());
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
fme.msg(TL.COMMAND_PAYPALSEE_FACTION_NOFACTION.toString(), me.getName());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public TL getUsageTranslation() {
|
|
|
|
return TL.COMMAND_PAYPALSEE_DESCRIPTION;
|
|
|
|
}
|
2018-09-21 08:28:20 +02:00
|
|
|
}
|
2018-09-21 08:29:28 +02:00
|
|
|
|
|
|
|
|