Class PotionEffectModifier
java.lang.Object
me.hsgamer.hscore.bukkit.item.modifier.PotionEffectModifier
- All Implemented Interfaces:
ItemMetaComparator
,ItemMetaModifier
,ItemComparator<org.bukkit.inventory.ItemStack>
,ItemModifier<org.bukkit.inventory.ItemStack>
The potion effect modifier
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
compare
(@NotNull org.bukkit.inventory.meta.ItemMeta meta, @Nullable UUID uuid, @NotNull StringReplacer stringReplacer) Compare the modifier of an item metaboolean
loadFromItemMeta
(org.bukkit.inventory.meta.ItemMeta meta) Load the modifier from the item metavoid
loadFromObject
(Object object) Load the modifier from an object@NotNull org.bukkit.inventory.meta.ItemMeta
modifyMeta
(@NotNull org.bukkit.inventory.meta.ItemMeta meta, @Nullable UUID uuid, @NotNull StringReplacer stringReplacer) Modify the item metasetPotionEffect
(String... potionEffect) Set the potion effectsetPotionEffect
(Collection<org.bukkit.potion.PotionEffect> potionEffect) Set the potion effectsetPotionEffect
(List<String> potionEffect) Set the potion effectsetPotionEffect
(org.bukkit.potion.PotionEffect... potionEffect) Set the potion effecttoObject()
Serialize the modifier to an objectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface me.hsgamer.hscore.minecraft.item.ItemComparator
compare, compare
Methods inherited from interface me.hsgamer.hscore.bukkit.item.modifier.ItemMetaComparator
compare
Methods inherited from interface me.hsgamer.hscore.bukkit.item.modifier.ItemMetaModifier
loadFromItem, modify
Methods inherited from interface me.hsgamer.hscore.minecraft.item.ItemModifier
modify, modify
-
Constructor Details
-
PotionEffectModifier
public PotionEffectModifier()
-
-
Method Details
-
modifyMeta
@NotNull public @NotNull org.bukkit.inventory.meta.ItemMeta modifyMeta(@NotNull @NotNull org.bukkit.inventory.meta.ItemMeta meta, @Nullable @Nullable UUID uuid, @NotNull @NotNull StringReplacer stringReplacer) Description copied from interface:ItemMetaModifier
Modify the item meta- Specified by:
modifyMeta
in interfaceItemMetaModifier
- Parameters:
meta
- the item metauuid
- the unique idstringReplacer
- the string replacer- Returns:
- the modified item meta
-
loadFromItemMeta
public boolean loadFromItemMeta(org.bukkit.inventory.meta.ItemMeta meta) Description copied from interface:ItemMetaModifier
Load the modifier from the item meta- Specified by:
loadFromItemMeta
in interfaceItemMetaModifier
- Parameters:
meta
- the item meta- See Also:
-
compare
public boolean compare(@NotNull @NotNull org.bukkit.inventory.meta.ItemMeta meta, @Nullable @Nullable UUID uuid, @NotNull @NotNull StringReplacer stringReplacer) Description copied from interface:ItemMetaComparator
Compare the modifier of an item meta- Specified by:
compare
in interfaceItemMetaComparator
- Parameters:
meta
- the item metauuid
- the unique idstringReplacer
- the string replacer- Returns:
- true if it matches, otherwise false
- See Also:
-
toObject
Description copied from interface:ItemModifier
Serialize the modifier to an object- Specified by:
toObject
in interfaceItemModifier<org.bukkit.inventory.ItemStack>
- Returns:
- the object
-
loadFromObject
Description copied from interface:ItemModifier
Load the modifier from an object- Specified by:
loadFromObject
in interfaceItemModifier<org.bukkit.inventory.ItemStack>
- Parameters:
object
- the object
-
setPotionEffect
Set the potion effect- Parameters:
potionEffect
- the potion effect- Returns:
this
for builder chain
-
setPotionEffect
Set the potion effect- Parameters:
potionEffect
- the potion effect- Returns:
this
for builder chain
-
setPotionEffect
@Contract("_ -> this") public PotionEffectModifier setPotionEffect(Collection<org.bukkit.potion.PotionEffect> potionEffect) Set the potion effect- Parameters:
potionEffect
- the potion effect- Returns:
this
for builder chain
-
setPotionEffect
@Contract("_ -> this") public PotionEffectModifier setPotionEffect(org.bukkit.potion.PotionEffect... potionEffect) Set the potion effect- Parameters:
potionEffect
- the potion effect- Returns:
this
for builder chain
-