added some more missing spaces

This commit is contained in:
Jack 2022-09-15 22:03:45 -04:00 committed by GitHub
parent 0099eed037
commit a46a8ef1a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -132,26 +132,26 @@ public class ExamplePlugin extends JavaPlugin {
}
public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args) {
if(!(sender instanceof Player)) {
if (!(sender instanceof Player)) {
log.info("Only players are supported for this Example Plugin, but you should not do this!!!");
return true;
}
Player player = (Player) sender;
if(command.getLabel().equals("test-economy")) {
if (command.getLabel().equals("test-economy")) {
// Let's give the player 1.05 currency (note that SOME economic plugins require rounding!)
sender.sendMessage(String.format("You have %s", econ.format(econ.getBalance(player.getName()))));
EconomyResponse r = econ.depositPlayer(player, 1.05);
if(r.transactionSuccess()) {
if (r.transactionSuccess()) {
sender.sendMessage(String.format("You were given %s and now have %s", econ.format(r.amount), econ.format(r.balance)));
} else {
sender.sendMessage(String.format("An error occurred: %s", r.errorMessage));
}
return true;
} else if(command.getLabel().equals("test-permission")) {
} else if (command.getLabel().equals("test-permission")) {
// Let's test if user has the node "example.plugin.awesome" to determine if they are awesome or just suck
if(perms.has(player, "example.plugin.awesome")) {
if (perms.has(player, "example.plugin.awesome")) {
sender.sendMessage("You are awesome!");
} else {
sender.sendMessage("You suck!");