Check System Added and Massive Reformat

This commit is contained in:
Driftay
2019-08-24 13:18:50 -04:00
parent 84f4e0f732
commit 72f76aeb71
199 changed files with 15584 additions and 15463 deletions

View File

@@ -6,49 +6,49 @@ import com.massivecraft.factions.zcore.util.TL;
public class CmdMoney extends FCommand {
public CmdMoneyBalance cmdMoneyBalance = new CmdMoneyBalance();
public CmdMoneyDeposit cmdMoneyDeposit = new CmdMoneyDeposit();
public CmdMoneyWithdraw cmdMoneyWithdraw = new CmdMoneyWithdraw();
public CmdMoneyTransferFf cmdMoneyTransferFf = new CmdMoneyTransferFf();
public CmdMoneyTransferFp cmdMoneyTransferFp = new CmdMoneyTransferFp();
public CmdMoneyTransferPf cmdMoneyTransferPf = new CmdMoneyTransferPf();
public CmdMoneyBalance cmdMoneyBalance = new CmdMoneyBalance();
public CmdMoneyDeposit cmdMoneyDeposit = new CmdMoneyDeposit();
public CmdMoneyWithdraw cmdMoneyWithdraw = new CmdMoneyWithdraw();
public CmdMoneyTransferFf cmdMoneyTransferFf = new CmdMoneyTransferFf();
public CmdMoneyTransferFp cmdMoneyTransferFp = new CmdMoneyTransferFp();
public CmdMoneyTransferPf cmdMoneyTransferPf = new CmdMoneyTransferPf();
public CmdMoney() {
super();
this.aliases.add("money");
this.aliases.add("bank");
public CmdMoney() {
super();
this.aliases.add("money");
this.aliases.add("bank");
//this.requiredArgs.add("");
//this.optionalArgs.put("","")
//this.requiredArgs.add("");
//this.optionalArgs.put("","")
this.isMoneyCommand = true;
this.isMoneyCommand = true;
senderMustBePlayer = false;
senderMustBeMember = false;
senderMustBeModerator = false;
senderMustBeColeader = false;
senderMustBeAdmin = false;
senderMustBePlayer = false;
senderMustBeMember = false;
senderMustBeModerator = false;
senderMustBeColeader = false;
senderMustBeAdmin = false;
this.helpLong.add(p.txt.parseTags(TL.COMMAND_MONEY_LONG.toString()));
this.helpLong.add(p.txt.parseTags(TL.COMMAND_MONEY_LONG.toString()));
this.addSubCommand(this.cmdMoneyBalance);
this.addSubCommand(this.cmdMoneyDeposit);
this.addSubCommand(this.cmdMoneyWithdraw);
this.addSubCommand(this.cmdMoneyTransferFf);
this.addSubCommand(this.cmdMoneyTransferFp);
this.addSubCommand(this.cmdMoneyTransferPf);
this.addSubCommand(this.cmdMoneyBalance);
this.addSubCommand(this.cmdMoneyDeposit);
this.addSubCommand(this.cmdMoneyWithdraw);
this.addSubCommand(this.cmdMoneyTransferFf);
this.addSubCommand(this.cmdMoneyTransferFp);
this.addSubCommand(this.cmdMoneyTransferPf);
}
}
@Override
public void perform() {
this.commandChain.add(this);
P.p.cmdAutoHelp.execute(this.sender, this.args, this.commandChain);
}
@Override
public void perform() {
this.commandChain.add(this);
P.p.cmdAutoHelp.execute(this.sender, this.args, this.commandChain);
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_MONEY_DESCRIPTION;
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_MONEY_DESCRIPTION;
}
}

View File

@@ -9,49 +9,49 @@ import org.bukkit.command.CommandSender;
public class CmdMoneyBalance extends FCommand {
public CmdMoneyBalance() {
super();
this.aliases.add("b");
this.aliases.add("balance");
public CmdMoneyBalance() {
super();
this.aliases.add("b");
this.aliases.add("balance");
//this.requiredArgs.add("");
this.optionalArgs.put("faction", "yours");
this.isMoneyCommand = true;
//this.requiredArgs.add("");
this.optionalArgs.put("faction", "yours");
this.isMoneyCommand = true;
this.permission = Permission.MONEY_BALANCE.node;
this.setHelpShort(TL.COMMAND_MONEYBALANCE_SHORT.toString());
this.permission = Permission.MONEY_BALANCE.node;
this.setHelpShort(TL.COMMAND_MONEYBALANCE_SHORT.toString());
senderMustBePlayer = false;
senderMustBeMember = false;
senderMustBeModerator = false;
senderMustBeAdmin = false;
}
senderMustBePlayer = false;
senderMustBeMember = false;
senderMustBeModerator = false;
senderMustBeAdmin = false;
}
@Override
public void perform() {
Faction faction = myFaction;
if (this.argIsSet(0)) {
faction = this.argAsFaction(0);
}
@Override
public void perform() {
Faction faction = myFaction;
if (this.argIsSet(0)) {
faction = this.argAsFaction(0);
}
if (faction == null) {
return;
}
if (faction != myFaction && !Permission.MONEY_BALANCE_ANY.has(sender, true)) {
return;
}
if (faction == null) {
return;
}
if (faction != myFaction && !Permission.MONEY_BALANCE_ANY.has(sender, true)) {
return;
}
if (fme != null) {
Econ.sendBalanceInfo((CommandSender) fme, faction);
} else {
Econ.sendBalanceInfo(sender, faction);
}
}
if (fme != null) {
Econ.sendBalanceInfo((CommandSender) fme, faction);
} else {
Econ.sendBalanceInfo(sender, faction);
}
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_MONEYBALANCE_DESCRIPTION;
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_MONEYBALANCE_DESCRIPTION;
}
}

View File

@@ -12,43 +12,43 @@ import org.bukkit.ChatColor;
public class CmdMoneyDeposit extends FCommand {
public CmdMoneyDeposit() {
super();
this.aliases.add("d");
this.aliases.add("deposit");
public CmdMoneyDeposit() {
super();
this.aliases.add("d");
this.aliases.add("deposit");
this.requiredArgs.add("amount");
this.optionalArgs.put("faction", "yours");
this.requiredArgs.add("amount");
this.optionalArgs.put("faction", "yours");
this.isMoneyCommand = true;
this.isMoneyCommand = true;
this.permission = Permission.MONEY_DEPOSIT.node;
this.permission = Permission.MONEY_DEPOSIT.node;
senderMustBePlayer = true;
senderMustBeMember = false;
senderMustBeModerator = false;
senderMustBeColeader = false;
senderMustBeAdmin = false;
}
senderMustBePlayer = true;
senderMustBeMember = false;
senderMustBeModerator = false;
senderMustBeColeader = false;
senderMustBeAdmin = false;
}
@Override
public void perform() {
double amount = this.argAsDouble(0, 0d);
EconomyParticipator faction = this.argAsFaction(1, myFaction);
if (faction == null) {
return;
}
boolean success = Econ.transferMoney(fme, fme, faction, amount);
@Override
public void perform() {
double amount = this.argAsDouble(0, 0d);
EconomyParticipator faction = this.argAsFaction(1, myFaction);
if (faction == null) {
return;
}
boolean success = Econ.transferMoney(fme, fme, faction, amount);
if (success && Conf.logMoneyTransactions) {
P.p.log(ChatColor.stripColor(P.p.txt.parse(TL.COMMAND_MONEYDEPOSIT_DEPOSITED.toString(), fme.getName(), Econ.moneyString(amount), faction.describeTo(null))));
}
}
if (success && Conf.logMoneyTransactions) {
P.p.log(ChatColor.stripColor(P.p.txt.parse(TL.COMMAND_MONEYDEPOSIT_DEPOSITED.toString(), fme.getName(), Econ.moneyString(amount), faction.describeTo(null))));
}
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_MONEYDEPOSIT_DESCRIPTION;
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_MONEYDEPOSIT_DESCRIPTION;
}
}

View File

@@ -13,52 +13,52 @@ import org.bukkit.entity.Player;
public class CmdMoneyTransferFf extends FCommand {
public CmdMoneyTransferFf() {
this.aliases.add("ff");
public CmdMoneyTransferFf() {
this.aliases.add("ff");
this.requiredArgs.add("amount");
this.requiredArgs.add("faction");
this.requiredArgs.add("faction");
this.requiredArgs.add("amount");
this.requiredArgs.add("faction");
this.requiredArgs.add("faction");
//this.optionalArgs.put("", "");
//this.optionalArgs.put("", "");
this.permission = Permission.MONEY_F2F.node;
this.permission = Permission.MONEY_F2F.node;
this.isMoneyCommand = true;
this.isMoneyCommand = true;
senderMustBePlayer = false;
senderMustBeMember = false;
senderMustBeModerator = false;
senderMustBeColeader = false;
senderMustBeAdmin = false;
}
senderMustBePlayer = false;
senderMustBeMember = false;
senderMustBeModerator = false;
senderMustBeColeader = false;
senderMustBeAdmin = false;
}
@Override
public void perform() {
double amount = this.argAsDouble(0, 0d);
EconomyParticipator from = this.argAsFaction(1);
if (from == null) {
return;
}
EconomyParticipator to = this.argAsFaction(2);
if (to == null) {
return;
}
if (Conf.econFactionStartingBalance != 0 && (System.currentTimeMillis() - myFaction.getFoundedDate()) <= (Conf.econDenyWithdrawWhenMinutesAgeLessThan * 6000)) {
msg("Your faction is too young to transfer money like this");
return;
}
boolean success = Econ.transferMoney(fme, from, to, amount);
@Override
public void perform() {
double amount = this.argAsDouble(0, 0d);
EconomyParticipator from = this.argAsFaction(1);
if (from == null) {
return;
}
EconomyParticipator to = this.argAsFaction(2);
if (to == null) {
return;
}
if (Conf.econFactionStartingBalance != 0 && (System.currentTimeMillis() - myFaction.getFoundedDate()) <= (Conf.econDenyWithdrawWhenMinutesAgeLessThan * 6000)) {
msg("Your faction is too young to transfer money like this");
return;
}
boolean success = Econ.transferMoney(fme, from, to, amount);
if (success && Conf.logMoneyTransactions) {
String name = sender instanceof Player ? fme.getName() : sender.getName();
P.p.log(ChatColor.stripColor(P.p.txt.parse(TL.COMMAND_MONEYTRANSFERFF_TRANSFER.toString(), name, Econ.moneyString(amount), from.describeTo(null), to.describeTo(null))));
}
}
if (success && Conf.logMoneyTransactions) {
String name = sender instanceof Player ? fme.getName() : sender.getName();
P.p.log(ChatColor.stripColor(P.p.txt.parse(TL.COMMAND_MONEYTRANSFERFF_TRANSFER.toString(), name, Econ.moneyString(amount), from.describeTo(null), to.describeTo(null))));
}
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_MONEYTRANSFERFF_DESCRIPTION;
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_MONEYTRANSFERFF_DESCRIPTION;
}
}

View File

@@ -12,51 +12,51 @@ import org.bukkit.ChatColor;
public class CmdMoneyTransferFp extends FCommand {
public CmdMoneyTransferFp() {
this.aliases.add("fp");
public CmdMoneyTransferFp() {
this.aliases.add("fp");
this.requiredArgs.add("amount");
this.requiredArgs.add("faction");
this.requiredArgs.add("player");
this.requiredArgs.add("amount");
this.requiredArgs.add("faction");
this.requiredArgs.add("player");
//this.optionalArgs.put("", "");
//this.optionalArgs.put("", "");
this.permission = Permission.MONEY_F2P.node;
this.permission = Permission.MONEY_F2P.node;
this.isMoneyCommand = true;
this.isMoneyCommand = true;
senderMustBePlayer = false;
senderMustBeMember = false;
senderMustBeModerator = false;
senderMustBeColeader = false;
senderMustBeAdmin = false;
}
senderMustBePlayer = false;
senderMustBeMember = false;
senderMustBeModerator = false;
senderMustBeColeader = false;
senderMustBeAdmin = false;
}
@Override
public void perform() {
double amount = this.argAsDouble(0, 0d);
EconomyParticipator from = this.argAsFaction(1);
if (from == null) {
return;
}
EconomyParticipator to = this.argAsBestFPlayerMatch(2);
if (to == null) {
return;
}
@Override
public void perform() {
double amount = this.argAsDouble(0, 0d);
EconomyParticipator from = this.argAsFaction(1);
if (from == null) {
return;
}
EconomyParticipator to = this.argAsBestFPlayerMatch(2);
if (to == null) {
return;
}
if (Conf.econFactionStartingBalance != 0 && (System.currentTimeMillis() - myFaction.getFoundedDate()) <= (Conf.econDenyWithdrawWhenMinutesAgeLessThan * 6000)) {
msg("Your faction is too young to transfer money like this");
return;
}
boolean success = Econ.transferMoney(fme, from, to, amount);
if (Conf.econFactionStartingBalance != 0 && (System.currentTimeMillis() - myFaction.getFoundedDate()) <= (Conf.econDenyWithdrawWhenMinutesAgeLessThan * 6000)) {
msg("Your faction is too young to transfer money like this");
return;
}
boolean success = Econ.transferMoney(fme, from, to, amount);
if (success && Conf.logMoneyTransactions) {
P.p.log(ChatColor.stripColor(P.p.txt.parse(TL.COMMAND_MONEYTRANSFERFP_TRANSFER.toString(), fme.getName(), Econ.moneyString(amount), from.describeTo(null), to.describeTo(null))));
}
}
if (success && Conf.logMoneyTransactions) {
P.p.log(ChatColor.stripColor(P.p.txt.parse(TL.COMMAND_MONEYTRANSFERFP_TRANSFER.toString(), fme.getName(), Econ.moneyString(amount), from.describeTo(null), to.describeTo(null))));
}
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_MONEYTRANSFERFP_DESCRIPTION;
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_MONEYTRANSFERFP_DESCRIPTION;
}
}

View File

@@ -12,51 +12,51 @@ import org.bukkit.ChatColor;
public class CmdMoneyTransferPf extends FCommand {
public CmdMoneyTransferPf() {
this.aliases.add("pf");
public CmdMoneyTransferPf() {
this.aliases.add("pf");
this.requiredArgs.add("amount");
this.requiredArgs.add("player");
this.requiredArgs.add("faction");
this.requiredArgs.add("amount");
this.requiredArgs.add("player");
this.requiredArgs.add("faction");
//this.optionalArgs.put("", "");
//this.optionalArgs.put("", "");
this.permission = Permission.MONEY_P2F.node;
this.isMoneyCommand = true;
this.permission = Permission.MONEY_P2F.node;
this.isMoneyCommand = true;
senderMustBePlayer = false;
senderMustBeMember = false;
senderMustBeModerator = false;
senderMustBeColeader = false;
senderMustBeAdmin = false;
}
senderMustBePlayer = false;
senderMustBeMember = false;
senderMustBeModerator = false;
senderMustBeColeader = false;
senderMustBeAdmin = false;
}
@Override
public void perform() {
double amount = this.argAsDouble(0, 0d);
EconomyParticipator from = this.argAsBestFPlayerMatch(1);
if (from == null) {
return;
}
EconomyParticipator to = this.argAsFaction(2);
if (to == null) {
return;
}
@Override
public void perform() {
double amount = this.argAsDouble(0, 0d);
EconomyParticipator from = this.argAsBestFPlayerMatch(1);
if (from == null) {
return;
}
EconomyParticipator to = this.argAsFaction(2);
if (to == null) {
return;
}
if (Conf.econFactionStartingBalance != 0 && (System.currentTimeMillis() - myFaction.getFoundedDate()) <= (Conf.econDenyWithdrawWhenMinutesAgeLessThan * 6000)) {
msg("Your faction is too young to transfer money like this");
return;
}
boolean success = Econ.transferMoney(fme, from, to, amount);
if (Conf.econFactionStartingBalance != 0 && (System.currentTimeMillis() - myFaction.getFoundedDate()) <= (Conf.econDenyWithdrawWhenMinutesAgeLessThan * 6000)) {
msg("Your faction is too young to transfer money like this");
return;
}
boolean success = Econ.transferMoney(fme, from, to, amount);
if (success && Conf.logMoneyTransactions) {
P.p.log(ChatColor.stripColor(P.p.txt.parse(TL.COMMAND_MONEYTRANSFERPF_TRANSFER.toString(), fme.getName(), Econ.moneyString(amount), from.describeTo(null), to.describeTo(null))));
}
}
if (success && Conf.logMoneyTransactions) {
P.p.log(ChatColor.stripColor(P.p.txt.parse(TL.COMMAND_MONEYTRANSFERPF_TRANSFER.toString(), fme.getName(), Econ.moneyString(amount), from.describeTo(null), to.describeTo(null))));
}
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_MONEYTRANSFERPF_DESCRIPTION;
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_MONEYTRANSFERPF_DESCRIPTION;
}
}

View File

@@ -14,53 +14,53 @@ import org.bukkit.ChatColor;
public class CmdMoneyWithdraw extends FCommand {
public CmdMoneyWithdraw() {
this.aliases.add("w");
this.aliases.add("withdraw");
public CmdMoneyWithdraw() {
this.aliases.add("w");
this.aliases.add("withdraw");
this.requiredArgs.add("amount");
this.optionalArgs.put("faction", "yours");
this.requiredArgs.add("amount");
this.optionalArgs.put("faction", "yours");
this.permission = Permission.MONEY_WITHDRAW.node;
this.isMoneyCommand = true;
this.permission = Permission.MONEY_WITHDRAW.node;
this.isMoneyCommand = true;
senderMustBePlayer = true;
senderMustBeMember = false;
senderMustBeModerator = false;
senderMustBeColeader = false;
senderMustBeAdmin = false;
}
senderMustBePlayer = true;
senderMustBeMember = false;
senderMustBeModerator = false;
senderMustBeColeader = false;
senderMustBeAdmin = false;
}
@Override
public void perform() {
@Override
public void perform() {
double amount = this.argAsDouble(0, 0d);
EconomyParticipator faction = this.argAsFaction(1, myFaction);
if (faction == null) {
return;
}
double amount = this.argAsDouble(0, 0d);
EconomyParticipator faction = this.argAsFaction(1, myFaction);
if (faction == null) {
return;
}
Access access = myFaction.getAccess(fme, PermissableAction.WITHDRAW);
if (access == Access.DENY) {
fme.msg(TL.GENERIC_NOPERMISSION, "withdraw");
return;
}
Access access = myFaction.getAccess(fme, PermissableAction.WITHDRAW);
if (access == Access.DENY) {
fme.msg(TL.GENERIC_NOPERMISSION, "withdraw");
return;
}
if (Conf.econFactionStartingBalance != 0 && (System.currentTimeMillis() - myFaction.getFoundedDate()) <= (Conf.econDenyWithdrawWhenMinutesAgeLessThan * 6000)) {
msg("Your faction is too young to withdraw money like this");
return;
}
if (Conf.econFactionStartingBalance != 0 && (System.currentTimeMillis() - myFaction.getFoundedDate()) <= (Conf.econDenyWithdrawWhenMinutesAgeLessThan * 6000)) {
msg("Your faction is too young to withdraw money like this");
return;
}
boolean success = Econ.transferMoney(fme, faction, fme, amount);
boolean success = Econ.transferMoney(fme, faction, fme, amount);
if (success && Conf.logMoneyTransactions) {
P.p.log(ChatColor.stripColor(P.p.txt.parse(TL.COMMAND_MONEYWITHDRAW_WITHDRAW.toString(), fme.getName(), Econ.moneyString(amount), faction.describeTo(null))));
}
}
if (success && Conf.logMoneyTransactions) {
P.p.log(ChatColor.stripColor(P.p.txt.parse(TL.COMMAND_MONEYWITHDRAW_WITHDRAW.toString(), fme.getName(), Econ.moneyString(amount), faction.describeTo(null))));
}
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_MONEYWITHDRAW_DESCRIPTION;
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_MONEYWITHDRAW_DESCRIPTION;
}
}