Skip to content

Commit

Permalink
Add Permission.has() methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Foulest committed Jan 15, 2025
1 parent 02eb76c commit 596fe8f
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/main/java/net/milkbowl/vault/permission/Permission.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,41 @@ public abstract class Permission {
*/
public abstract boolean hasSuperPermsCompat();

@Deprecated
public boolean has(UUID uuid, String permission) {
return playerHas(uuid, permission);
}

@Deprecated
public boolean has(@NotNull Player player, String permission) {
return playerHas(player, permission);
}

@Deprecated
public boolean has(@NotNull OfflinePlayer player, String permission) {
return playerHas(player, permission);
}

@Deprecated
public boolean has(@NotNull String playerName, String permission) {
return playerHas(playerName, permission);
}

@Deprecated
public boolean has(String world, @NotNull Player player, String permission) {
return playerHas(world, player, permission);
}

@Deprecated
public boolean has(String world, @NotNull OfflinePlayer player, String permission) {
return playerHas(world, player, permission);
}

@Deprecated
public boolean has(String world, @NotNull String playerName, String permission) {
return playerHas(world, playerName, permission);
}

/**
* Check if a player has a specific permission.
*
Expand Down

0 comments on commit 596fe8f

Please sign in to comment.