Package com.sucy.skill.dynamic
Class ItemChecker
java.lang.Object
com.sucy.skill.dynamic.ItemChecker
Handles checking items for dynamic effects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheck(org.bukkit.entity.Player player, int level, EffectComponent component, boolean remove) Checks the player inventory for items matching the settingsstatic booleanChecks an individual item to see if it matches the settingsstatic booleanChecks the lore of an itemstatic booleanChecks the display name of the itemstatic booleanfindLore(org.bukkit.entity.LivingEntity caster, org.bukkit.inventory.ItemStack item, String regex, String key, double multiplier)
-
Constructor Details
-
ItemChecker
public ItemChecker()
-
-
Method Details
-
check
public static boolean check(org.bukkit.entity.Player player, int level, EffectComponent component, boolean remove) Checks the player inventory for items matching the settings- Parameters:
player- player to checklevel- level of the effectcomponent- effect component checking forremove- whether to remove matching items- Returns:
- true if all conditions met, false otherwise
-
check
Checks an individual item to see if it matches the settings- Parameters:
item- item to checklevel- level of the effectsettings- settings to apply- Returns:
- true if passes all conditions, false otherwise
-
checkName
Checks the display name of the item- Parameters:
item- item to checktarget- display name desiredregex- whether the target is a regex pattern- Returns:
- true if matches, false otherwise
-
checkLore
Checks the lore of an item- Parameters:
item- item to checktarget- lore text desiredregex- whether the target is a regex pattern- Returns:
- true if matches, false otherwise
-
findLore
-