Saber-Factions/src/main/java/com/massivecraft/factions/cmd/CmdPaypalSee.java

53 lines
1.3 KiB
Java
Raw Normal View History

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;
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 {
public CmdPaypalSee() {
aliases.add("seepaypal");
2019-03-23 07:02:46 +01:00
requiredArgs.add("faction");
2019-03-23 07:02:46 +01:00
permission = Permission.ADMIN.node;
2019-03-23 07:02:46 +01:00
disableOnLock = false;
senderMustBePlayer = false;
senderMustBeMember = false;
senderMustBeModerator = false;
senderMustBeColeader = false;
senderMustBeAdmin = false;
}
2019-03-23 07:02:46 +01:00
@Override
public void perform() {
if (!SavageFactions.plugin.getConfig().getBoolean("fpaypal.Enabled")) {
fme.msg(TL.GENERIC_DISABLED);
2019-03-23 07:02:46 +01:00
return;
}
Faction faction = argAsFaction(0);
2019-05-23 15:30:10 +02:00
if (faction == null)
2019-03-23 07:02:46 +01:00
return;
if (!faction.isWilderness() && !faction.isSafeZone() && !faction.isWarZone()) {
2019-03-23 07:02:46 +01:00
fme.msg(TL.COMMAND_PAYPALSEE_FACTION_NOFACTION.toString(), me.getName());
return;
}
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());
}
}
2019-03-23 07:02:46 +01:00
@Override
public TL getUsageTranslation() {
return TL.COMMAND_PAYPALSEE_DESCRIPTION;
}
2018-09-21 08:28:20 +02:00
}
2018-09-21 08:29:28 +02:00