Implement requested changes.

- Added renameAccount(UUID, String).
- Remove @Nullable annotation and remove repo/dependency from pom.xml.
- Fixed typo in javadoc in Economy.
This commit is contained in:
Llm Dl 2022-08-03 16:03:48 -05:00
parent 1af24b2e89
commit 7c7d0abcc2
3 changed files with 18 additions and 22 deletions

11
pom.xml
View File

@ -44,10 +44,6 @@ Vault currently supports the following: Permissions 3, PEX, GroupManager, bPerms
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
</repository>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
</repository>
</repositories>
<distributionManagement>
@ -65,13 +61,6 @@ Vault currently supports the following: Permissions 3, PEX, GroupManager, bPerms
<version>${bukkitVersion}</version>
<scope>provided</scope>
</dependency>
<!-- Annotations -->
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>23.0.0</version>
<scope>provided</scope>
</dependency>
<!-- Test Dependency -->
<dependency>
<groupId>junit</groupId>

View File

@ -23,7 +23,7 @@ import org.bukkit.OfflinePlayer;
/**
* The main economy API
*
* @deprecated in lieu of the modern Vault2. To update alter your import to new.milkbowl.vault2.economy and update to use the new UUID-based methods where available.
* @deprecated in lieu of the modern Vault2. To update alter your import to net.milkbowl.vault2.economy and update to use the new UUID-based methods where available.
*/
public interface Economy {

View File

@ -20,8 +20,6 @@ import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.jetbrains.annotations.Nullable;
/**
* The main economy API
*
@ -29,7 +27,7 @@ import org.jetbrains.annotations.Nullable;
public interface Economy {
/*
* Economy plugin-related methods follow.
* Economy plugin-related methods follow.
*/
/**
@ -118,23 +116,21 @@ public interface Economy {
/**
* Returns a map that represents all of the UUIDs which have accounts in the
* plugin, as well as their last-known-name whether it is null or not. This is
* used for Vault's economy converter and should be given every account
* available.
* plugin, as well as their last-known-name. This is used for Vault's economy
* converter and should be given every account available.
*
* @return a {@link Map} composed of the accounts keyed by their UUID, along
* with their associated last-known-name (null or not.)
* with their associated last-known-name.
*/
public Map<UUID, @Nullable String> getUUIDNameMap();
public Map<UUID, String> getUUIDNameMap();
/**
* Gets the last known name of an account owned by the given UUID. Required for
* messages to be more human-readable than UUIDs alone can provide.
*
* @param uuid UUID to look up.
* @return name of the account owner or null.
* @return name of the account owner.
*/
@Nullable
public String getAccountName(UUID uuid);
/**
@ -154,6 +150,17 @@ public interface Economy {
*/
public boolean hasAccount(UUID uuid, String worldName);
/**
* A method which changes the name associated with the given UUID in the
* Map<UUID, String> received from {@link #getUUIDNameMap()}.
*
* @param uuid which is having a name change.
* @param name name that will be associated with the UUID in the
* Map<UUID, String> map.
* @return true if the name change is successful.
*/
public boolean renameAccount(UUID uuid, String name);
/**
* Gets balance of a UUID
*