mirror of
https://github.com/MilkBowl/VaultAPI.git
synced 2024-11-22 10:25:44 +01:00
added some more missing spaces
This commit is contained in:
parent
0099eed037
commit
a46a8ef1a0
10
README.md
10
README.md
@ -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!");
|
||||
|
Loading…
Reference in New Issue
Block a user