From 61596d8c60621bbc769566b9bad977e3eab038c0 Mon Sep 17 00:00:00 2001 From: Sleaker Date: Mon, 10 Sep 2018 22:05:46 -0700 Subject: [PATCH] remove a few deprecated permission functions --- .../milkbowl/vault/permission/Permission.java | 45 +++---------------- 1 file changed, 5 insertions(+), 40 deletions(-) diff --git a/src/main/java/net/milkbowl/vault/permission/Permission.java b/src/main/java/net/milkbowl/vault/permission/Permission.java index e5d3b60..66fce32 100644 --- a/src/main/java/net/milkbowl/vault/permission/Permission.java +++ b/src/main/java/net/milkbowl/vault/permission/Permission.java @@ -199,19 +199,7 @@ public abstract class Permission { public boolean playerAdd(Player player, String permission) { return playerAdd(player.getWorld().getName(), player, permission); } - - /** - * @deprecated As of VaultAPI 1.4 use {@link #playerAddTransient(OfflinePlayer, String)} instead. - */ - @Deprecated - public boolean playerAddTransient(String player, String permission) throws UnsupportedOperationException { - Player p = plugin.getServer().getPlayer(player); - if (p == null) { - throw new UnsupportedOperationException(getName() + " does not support offline player transient permissions!"); - } - return playerAddTransient(p, permission); - } - + /** * Add transient permission to a player. * This implementation can be used by any subclass which implements a "pure" superperms plugin, i.e. @@ -260,7 +248,7 @@ public abstract class Permission { * @return Success or Failure */ public boolean playerAddTransient(String worldName, OfflinePlayer player, String permission) { - return playerAddTransient(worldName, player.getName(), permission); + return playerAddTransient(worldName, player, permission); } /** @@ -276,18 +264,6 @@ public abstract class Permission { return playerAddTransient(player, permission); } - /** - * @deprecated As of VaultAPI 1.4 use {@link #playerAddTransient(String, OfflinePlayer, String)} instead. - */ - @Deprecated - public boolean playerAddTransient(String worldName, String player, String permission) { - Player p = plugin.getServer().getPlayer(player); - if (p == null) { - throw new UnsupportedOperationException(getName() + " does not support offline player transient permissions!"); - } - return playerAddTransient(p, permission); - } - /** * @deprecated As of VaultAPI 1.4 use {@link #playerRemoveTransient(String, OfflinePlayer, String)} instead. */ @@ -310,7 +286,7 @@ public abstract class Permission { * @return Success or Failure */ public boolean playerRemoveTransient(String worldName, OfflinePlayer player, String permission) { - return playerRemoveTransient(worldName, player.getName(), permission); + return playerRemoveTransient(player, permission); } /** @@ -323,7 +299,7 @@ public abstract class Permission { * @return Success or Failure */ public boolean playerRemoveTransient(String worldName, Player player, String permission) { - return playerRemoveTransient(worldName, (OfflinePlayer) player, permission); + return playerRemoveTransient((OfflinePlayer) player, permission); } /** @@ -378,18 +354,7 @@ public abstract class Permission { public boolean playerRemove(Player player, String permission) { return playerRemove(player.getWorld().getName(), player, permission); } - - /** - * @deprecated As of VaultAPI 1.4 use {@link #playerRemoveTransient(OfflinePlayer, String)} instead. - */ - @Deprecated - public boolean playerRemoveTransient(String player, String permission) { - Player p = plugin.getServer().getPlayer(player); - if (p == null) - return false; - - return playerRemoveTransient(p, permission); - } + /** * Remove transient permission from a player.