From af25ed40b10c300b9eb14320675cfdb8f383ec3f Mon Sep 17 00:00:00 2001 From: Nick Minkler Date: Sat, 17 May 2014 10:36:19 -0700 Subject: [PATCH] fix some javadoc errors --- .../net/milkbowl/vault/economy/Economy.java | 9 ++++++++- .../milkbowl/vault/permission/Permission.java | 20 ++++++++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/milkbowl/vault/economy/Economy.java b/src/main/java/net/milkbowl/vault/economy/Economy.java index 7e60e43..e00ce96 100644 --- a/src/main/java/net/milkbowl/vault/economy/Economy.java +++ b/src/main/java/net/milkbowl/vault/economy/Economy.java @@ -150,7 +150,7 @@ public interface Economy { * * Gets balance of a player on the specified world. * IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned. - * @param playerName + * @param playerName name of the player * @param world name of the world * @return Amount currently held in players account */ @@ -282,6 +282,7 @@ public interface Economy { * Deposit an amount to a player - DO NOT USE NEGATIVE AMOUNTS * IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned. * @param playerName Name of player + * @param worldname Name of the world * @param amount Amount to deposit * @return Detailed response of transaction */ @@ -409,6 +410,7 @@ public interface Economy { * @deprecated As of Vault 1.3.01 use {{@link #createPlayerAccount(OfflinePlayer)} instead. * * Attempts to create a player account for the given player + * @param playerName name of the player * @return if the account creation was successful */ @Deprecated @@ -416,6 +418,7 @@ public interface Economy { /** * Attempts to create a player account for the given player + * @param player OfflinePlayer * @return if the account creation was successful */ public boolean createPlayerAccount(OfflinePlayer player); @@ -425,6 +428,8 @@ public interface Economy { * * Attempts to create a player account for the given player on the specified world * IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned. + * @param playerName String name of the player + * @param worldName String name of the world * @return if the account creation was successful */ @Deprecated @@ -433,6 +438,8 @@ public interface Economy { /** * Attempts to create a player account for the given player on the specified world * IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned. + * @param player OfflinePlayer + * @param worldName String name of the world * @return if the account creation was successful */ public boolean createPlayerAccount(OfflinePlayer player, String worldName); diff --git a/src/main/java/net/milkbowl/vault/permission/Permission.java b/src/main/java/net/milkbowl/vault/permission/Permission.java index e1e1899..6f75734 100644 --- a/src/main/java/net/milkbowl/vault/permission/Permission.java +++ b/src/main/java/net/milkbowl/vault/permission/Permission.java @@ -430,7 +430,7 @@ public abstract class Permission { } /** - * @deprecated As of Vault 1.3.01 use {{@link #playerRemoveTransient(OfflinePlayer, String)} instead + * @deprecated As of Vault 1.3.01 use {{@link #playerRemoveTransient(OfflinePlayer, String)} instead. * Remove transient permission from a player. * This implementation can be used by any subclass which implements a "pure" superperms plugin, i.e. * one that only needs the built-in Bukkit API to remove transient permissions from a player. Any subclass @@ -449,6 +449,24 @@ public abstract class Permission { return playerRemoveTransient(p, permission); } + /** + * Remove transient permission from a player. + * This implementation can be used by any subclass which implements a "pure" superperms plugin, i.e. + * one that only needs the built-in Bukkit API to remove transient permissions from a player. Any subclass + * implementing a plugin which provides its own API for this needs to override this method. + * + * @param player OfflinePlayer + * @param permission Permission node + * @return Success or Failure + */ + public boolean playerRemoveTransient(OfflinePlayer player, String permission) { + if (player.isOnline()) { + return playerRemoveTransient((Player) player, permission); + } else { + return false; + } + } + /** * Remove transient permission from a player. *