From 918bda26d2fa1b7a51d33ffa62afed762119a033 Mon Sep 17 00:00:00 2001 From: Llm Dl Date: Mon, 27 Jun 2022 19:50:50 -0500 Subject: [PATCH] Update README to include new version, example code. --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c186065..e2e71e5 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ How to include the API with Maven: com.github.MilkBowl VaultAPI - 1.7 + 2.0 provided @@ -24,7 +24,7 @@ repositories { maven { url 'https://jitpack.io' } } dependencies { - compileOnly "com.github.MilkBowl:VaultAPI:1.7" + compileOnly "com.github.MilkBowl:VaultAPI:2.0" } ``` @@ -69,10 +69,10 @@ package com.example.plugin; import java.util.logging.Logger; -import net.milkbowl.vault.chat.Chat; -import net.milkbowl.vault.economy.Economy; -import net.milkbowl.vault.economy.EconomyResponse; -import net.milkbowl.vault.permission.Permission; +import net.milkbowl.vault2.chat.Chat; +import net.milkbowl.vault2.economy.Economy; +import net.milkbowl.vault2.economy.EconomyResponse; +import net.milkbowl.vault2.permission.Permission; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -137,8 +137,8 @@ public class ExamplePlugin extends JavaPlugin { if(command.getLabel().equals("test-economy")) { // Lets 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); + sender.sendMessage(String.format("You have %s", econ.format(econ.getBalance(player.getUniqueId())))); + EconomyResponse r = econ.depositPlayer(player.getUniqueId(), 1.05); if(r.transactionSuccess()) { sender.sendMessage(String.format("You were given %s and now have %s", econ.format(r.amount), econ.format(r.balance))); } else {