hasPermission

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.

Return

If the player has permission to use the wrap on the item

Parameters

plugin

The plugin

wrap

The wrap

item

The item stack

player

The player


@Nullable()
public static @Nullable() ItemStack hasPermission(HMCWraps plugin, ItemStack item, Player player)

Check if the player has permission for the wrap on the item.

Return

If the player doesn't have the required permission, it returns the item but unwrapped, while it returns null when the player has permission

Parameters

plugin

The plugin

item

The item

player

The player