The JavaPlugin class provides plugins with their own logger via getLogger() which is the preferred means of logging content to the console as it prepends the plugin's name. Using a Logger with the Minecraft prefix is non-descript and poor practice because it will not properly source from where the log message is coming. Beginners should not be given this poor practice as an example.
New methods include:
- UUID-focused methods replacing the Name and OfflinePlayer methods.
- getUUIDNameMap() which makes the economy plugin able to supply a Map
of UUIDs and last-known-names on request. This will be used to replace
the code in Vault which converts between economy plugins (and is
currently only able to convert accounts belonging to players which have
logged in.) The @Nullable annotation is used here in order to declare
that the last-known-name of the account is allowed to be null.
- getAccountName(UUID) which will return the last-known-name of an
account or null.
Other Changes:
- Minor changes to javadocs.
To match the PR I have opened at the Vault repo, which has had the
native economy plugin support removed, the VaultAPI plugin no longer
requires the AbstractEconomy class.
Removal means that this Pull Request no longer calls
Bukkit.getOfflinePlayer(uuid), making this much safer.
This commit adds UUID support to Vault, allowing plugins to bypass the
OfflinePlayer methods which result in Bukkit trying to resolve a player
to associate with the OfflinePlayer (via the server playercache and if
that player doesn't exist via Mojang.)
This is incredibly useful for any plugin which wants to have an Economy
account that isn't associated with a player. This includes Towny,
Factions, Shops plugins and others.
Most importantly: having UUID methods will give these plugins an avenue
to update from using the String accountName methods deprecated since
Vault 1.4, which doesn't result in slow OfflinePlayer creation.
AbstractEconomy has been updated so that the various Economy plugins
supported internally by Vault will have support for the new methods in
the same manner as when the OfflinePlayer methods were added.
Small javadoc typos have also been fixed up (extra {'s, an additional
{@link, etc.)