Class ItemArmorBehavior
java.lang.Object
org.cloudburstmc.server.item.behavior.CloudItemBehavior
org.cloudburstmc.server.item.behavior.ItemArmorBehavior
- All Implemented Interfaces:
org.cloudburstmc.api.item.behavior.ItemBehavior
author: MagicDroidX
Nukkit Project
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetEnchantAbility(org.cloudburstmc.api.item.ItemStack item)booleanisArmor()booleanisBoots()booleanbooleanisHelmet()booleanbooleanonClickAir(org.cloudburstmc.api.item.ItemStack item, com.nukkitx.math.vector.Vector3f directionVector, org.cloudburstmc.api.player.Player p)Called when a player uses the item on air, for example throwing a projectile.Methods inherited from class org.cloudburstmc.server.item.behavior.CloudItemBehavior
canBeActivated, canBePlaced, canDestroy, canPlaceOn, getArmorPoints, getAttackDamage, getBlock, getFuelTime, getMaxDurability, getMaxStackSize, getTier, getToolType, getToughness, isAxe, isHoe, isPickaxe, isShears, isShovel, isSword, isTool, isUnbreakable, onActivate, onRelease, onUse, useOn, useOn
-
Constructor Details
-
ItemArmorBehavior
public ItemArmorBehavior()
-
-
Method Details
-
isArmor
public boolean isArmor()- Specified by:
isArmorin interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
isArmorin classCloudItemBehavior
-
isHelmet
public boolean isHelmet()- Specified by:
isHelmetin interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
isHelmetin classCloudItemBehavior
-
isChestplate
public boolean isChestplate()- Specified by:
isChestplatein interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
isChestplatein classCloudItemBehavior
-
isLeggings
public boolean isLeggings()- Specified by:
isLeggingsin interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
isLeggingsin classCloudItemBehavior
-
isBoots
public boolean isBoots()- Specified by:
isBootsin interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
isBootsin classCloudItemBehavior
-
onClickAir
public boolean onClickAir(org.cloudburstmc.api.item.ItemStack item, com.nukkitx.math.vector.Vector3f directionVector, org.cloudburstmc.api.player.Player p)Description copied from class:CloudItemBehaviorCalled when a player uses the item on air, for example throwing a projectile. Returns whether the item was changed, for example count decrease or durability change.- Specified by:
onClickAirin interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
onClickAirin classCloudItemBehaviordirectionVector- directionp- player- Returns:
- item changed
-
getEnchantAbility
public int getEnchantAbility(org.cloudburstmc.api.item.ItemStack item)- Specified by:
getEnchantAbilityin interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
getEnchantAbilityin classCloudItemBehavior
-