Class SoundResultExtension
java.lang.Object
me.wolfyscript.customcrafting.utils.recipe_item.extension.ResultExtension
me.wolfyscript.customcrafting.utils.recipe_item.extension.SoundResultExtension
- All Implemented Interfaces:
me.wolfyscript.utilities.util.Keyed
-
Field Summary
Fields inherited from class me.wolfyscript.customcrafting.utils.recipe_item.extension.ResultExtension
description, icon, innerRadius, outerRadius, title
-
Constructor Summary
ConstructorsConstructorDescriptionSoundResultExtension(SoundResultExtension extension)
SoundResultExtension(org.bukkit.Sound sound)
SoundResultExtension(org.bukkit.Sound sound, float volume, float pitch, org.bukkit.SoundCategory soundCategory)
SoundResultExtension(org.bukkit.Sound sound, float volume, float pitch, org.bukkit.SoundCategory soundCategory, boolean forPlayer, boolean nearPlayer, boolean nearWorkstation, boolean onBlock)
-
Method Summary
Modifier and TypeMethodDescriptionclone()
float
getPitch()
org.bukkit.Sound
getSound()
org.bukkit.SoundCategory
float
boolean
boolean
boolean
boolean
void
onLocation(org.bukkit.Location location, @Nullable org.bukkit.entity.Player player)
Called each time when the result was crafted on any location.void
onPlayer(@NotNull org.bukkit.entity.Player player, org.bukkit.Location location)
Called only if a player is involved in the crafting of the result.void
onWorkstation(org.bukkit.block.Block block, @Nullable org.bukkit.entity.Player player)
Called only when crafted in a workstation.void
setForPlayer(boolean forPlayer)
void
setNearPlayer(boolean nearPlayer)
void
setNearWorkstation(boolean nearWorkstation)
void
setOnBlock(boolean onBlock)
void
setPitch(float pitch)
void
setSound(org.bukkit.Sound sound)
void
setSoundCategory(org.bukkit.SoundCategory soundCategory)
void
setVolume(float volume)
Methods inherited from class me.wolfyscript.customcrafting.utils.recipe_item.extension.ResultExtension
getEntitiesInRange, getInnerRadius, getNamespacedKey, getOuterRadius, onCraft, setInnerRadius, setOuterRadius
-
Constructor Details
-
SoundResultExtension
public SoundResultExtension() -
SoundResultExtension
-
SoundResultExtension
public SoundResultExtension(org.bukkit.Sound sound) -
SoundResultExtension
public SoundResultExtension(org.bukkit.Sound sound, float volume, float pitch, org.bukkit.SoundCategory soundCategory) -
SoundResultExtension
public SoundResultExtension(org.bukkit.Sound sound, float volume, float pitch, org.bukkit.SoundCategory soundCategory, boolean forPlayer, boolean nearPlayer, boolean nearWorkstation, boolean onBlock)
-
-
Method Details
-
onWorkstation
public void onWorkstation(org.bukkit.block.Block block, @Nullable @Nullable org.bukkit.entity.Player player)Description copied from class:ResultExtension
Called only when crafted in a workstation. Not called if no block is involved!- Specified by:
onWorkstation
in classResultExtension
- Parameters:
block
- The block of the workstation.player
- The player that might be involved in the crafting. Might be Null if the action didn't involve a player.
-
onLocation
public void onLocation(org.bukkit.Location location, @Nullable @Nullable org.bukkit.entity.Player player)Description copied from class:ResultExtension
Called each time when the result was crafted on any location. The player might be null.- Specified by:
onLocation
in classResultExtension
- Parameters:
location
- The location of the inventory, the result was crafted in.player
- The player that crafted the item or null if it was crafted by a block.
-
onPlayer
public void onPlayer(@NotNull @NotNull org.bukkit.entity.Player player, org.bukkit.Location location)Description copied from class:ResultExtension
Called only if a player is involved in the crafting of the result.- Specified by:
onPlayer
in classResultExtension
- Parameters:
player
- The player that crafted the result.location
- The location of the inventory, the result was crafted in.
-
clone
- Specified by:
clone
in classResultExtension
-
getSound
public org.bukkit.Sound getSound() -
setSound
public void setSound(org.bukkit.Sound sound) -
getVolume
public float getVolume() -
setVolume
public void setVolume(float volume) -
getPitch
public float getPitch() -
setPitch
public void setPitch(float pitch) -
getSoundCategory
public org.bukkit.SoundCategory getSoundCategory() -
setSoundCategory
public void setSoundCategory(org.bukkit.SoundCategory soundCategory) -
isForPlayer
public boolean isForPlayer() -
setForPlayer
public void setForPlayer(boolean forPlayer) -
isNearPlayer
public boolean isNearPlayer() -
setNearPlayer
public void setNearPlayer(boolean nearPlayer) -
isNearWorkstation
public boolean isNearWorkstation() -
setNearWorkstation
public void setNearWorkstation(boolean nearWorkstation) -
isOnBlock
public boolean isOnBlock() -
setOnBlock
public void setOnBlock(boolean onBlock)
-