Package com.cryptomorin.xseries
Class XSound.Record
java.lang.Object
com.cryptomorin.xseries.XSound.Record
- All Implemented Interfaces:
Cloneable
- Enclosing class:
XSound
A class to help caching and playing sound properties parsed from config.
- Since:
- 3.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()longfloatgetPitch()getSeed()getSound()floatinCategory(XSound.Category category) publicSound(boolean publicSound) Whether to play this sound to all nearby players or just the players specified in theXSound.SoundPlayer.playerslist.rebuild()toString()withPitch(float pitch) Some sounds have different variations.The sound including the namespace and the key.withVolume(float volume)
-
Constructor Details
-
Record
public Record()
-
-
Method Details
-
getSeed
-
getSound
-
getCategory
-
getVolume
public float getVolume() -
getPitch
public float getPitch() -
inCategory
-
soundPlayer
- Returns:
- a new
XSound.SoundPlayerobject.
-
withSound
-
withSound
The sound including the namespace and the key. E.g. forXSound.ENTITY_PLAYER_HURTit'd beminecraft:entity_player_hurtyou can use other namespaces instead of "minecraft" to use sounds from resource packs. -
generateSeed
public long generateSeed() -
withVolume
-
publicSound
Whether to play this sound to all nearby players or just the players specified in theXSound.SoundPlayer.playerslist. -
withPitch
-
withSeed
Some sounds have different variations. Using a static seed will always play the same variation for that sound.- Parameters:
seed- Randomizes the variation of null.
-
rebuild
-
toString
-
clone
-