Add option to disable paying of online players.

This commit is contained in:
AppleDash 2020-06-03 08:11:30 -04:00
parent bb02d78b88
commit 2756e0c2d9
2 changed files with 6 additions and 0 deletions

View File

@ -68,6 +68,11 @@ public class PayCommand extends SaneCommand {
return;
}
if (!this.saneEconomy.getConfig().getConfigurationSection("economy").getBoolean("pay-offline-players", true) && !toPlayer.isOnline()) {
this.saneEconomy.getMessenger().sendMessage(sender, "You cannot pay an offline player.");
return;
}
String sAmount = args[1];
BigDecimal amount = NumberUtils.parseAndFilter(ecoMan.getCurrency(), sAmount);

View File

@ -25,6 +25,7 @@ economy:
notify-admin-give: false # Whether to notify players when /ecoadmin give is used on them.
notify-admin-take: false # Whether to notify players when /ecoadmin take is used on them.
notify-admin-set: false # Whether to notify players when /ecoadmin set is used on them.
pay-offline-players: true # Whether to allow paying offline players or not.
multi-server-sync: false # Experimental balance syncing without player rejoins, across BungeeCord networks.
update-check: true # Whether to check for updates to the plugin and notify admins about them.