Class RepairItemListener.RepairKit
java.lang.Object
me.deecaad.weaponmechanics.listeners.RepairItemListener.RepairKit
- All Implemented Interfaces:
me.deecaad.core.file.Serializer<RepairItemListener.RepairKit>
- Enclosing class:
RepairItemListener
public static class RepairItemListener.RepairKit
extends Object
implements me.deecaad.core.file.Serializer<RepairItemListener.RepairKit>
Repair-Kits are items that can be used to repair multiple different weapons/armors, instead of
redefining a repair-item for every weapon.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanUseArmor(String armorTitle) Returnstrueif this repair-kit can be used on a piece of armor with the given armor-title.booleancanUseWeapon(String weaponTitle) Returnstrueif this repair-kit can be used on a weapon item with the given weapon-title.me.deecaad.core.mechanics.Mechanicsorg.bukkit.inventory.ItemStackgetItem()intintbooleanboolean@NotNull RepairItemListener.RepairKitserialize(@NotNull me.deecaad.core.file.SerializeData data) voidsetConsumeOnUse(boolean consumeOnUse) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.deecaad.core.file.Serializer
canUsePathTo, getKeyword, getName, getParentKeywords, getWikiLink, letPassThrough, shouldSerialize, tryPathTo, useLater
-
Constructor Details
-
RepairKit
public RepairKit()Default constructor for serializers. -
RepairKit
-
-
Method Details
-
getItem
public org.bukkit.inventory.ItemStack getItem() -
getTotalDurability
public int getTotalDurability() -
getOverrideMaxDurabilityLoss
public int getOverrideMaxDurabilityLoss() -
isBlacklist
public boolean isBlacklist() -
getWeapons
-
getArmors
-
getBreakMechanics
public me.deecaad.core.mechanics.Mechanics getBreakMechanics() -
isConsumeOnUse
public boolean isConsumeOnUse() -
setConsumeOnUse
public void setConsumeOnUse(boolean consumeOnUse) -
canUseWeapon
Returnstrueif this repair-kit can be used on a weapon item with the given weapon-title.- Parameters:
weaponTitle- The non-null weapon-title of the weapon.- Returns:
- true if this kit can repair the weapon.
-
canUseArmor
Returnstrueif this repair-kit can be used on a piece of armor with the given armor-title.- Parameters:
armorTitle- The non-null armor-title of the armor.- Returns:
- true if this kit can repair the armor.
-
serialize
@NotNull public @NotNull RepairItemListener.RepairKit serialize(@NotNull @NotNull me.deecaad.core.file.SerializeData data) throws me.deecaad.core.file.SerializerException - Specified by:
serializein interfaceme.deecaad.core.file.Serializer<RepairItemListener.RepairKit>- Throws:
me.deecaad.core.file.SerializerException
-