PermissionUtil

public class PermissionUtil

Constructors

Link copied to clipboard
public void PermissionUtil()

Functions

Link copied to clipboard
public static ItemStack applyFavorite(HMCWraps plugin, Player player, ItemStack item)
Apply a favorite wrap to an item if possible.
Link copied to clipboard
public static ItemStack check(HMCWraps plugin, Player player, ItemStack item)
This combines permission checks and favorite wrap applications.
Link copied to clipboard
@Nullable()
public static @Nullable() ItemStack hasPermission(HMCWraps plugin, ItemStack item, Player player)
Check if the player has permission for the wrap on the item.
public static boolean hasPermission(HMCWraps plugin, Wrap wrap, ItemStack item, Player player)
Check if a player has the permission to use a wrap on an item based on the configuration.
Link copied to clipboard
public static void loopThroughInventory(HMCWraps plugin, Player player, Inventory inventory)
Loops through an inventory and unwraps items the player doesn't have access to and apply favorites if possible.