Interface Music
- All Superinterfaces:
Wrapper
Wraps the Music environment attribute's music record.
- Since:
- 2.4.1
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classBuilder for creating music records. -
Method Summary
Modifier and TypeMethodDescriptionstatic Music.Builderbuilder()Creates a new music record builder.static MusicReads Minecraft music into a wrapper.intmaxDelay()Gets the maximum delay of the music.intminDelay()Gets the minimum delay of the music.static Musicof(SoundEvent sound, int minDelay, int maxDelay, boolean replaceCurrentMusic) Creates a new music record.static MusicCreates a new music record.static MusicCreates a new music record.booleanGets whether the music should replace the current music.sound()Gets the sound of the music.default Music.BuilderCreates a new builder with the same values as this music.Methods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
sound
Gets the sound of the music.- Returns:
- the sound of the music
- Since:
- 2.4.1
-
minDelay
Gets the minimum delay of the music.- Returns:
- the minimum delay of the music
- Since:
- 2.4.1
-
maxDelay
Gets the maximum delay of the music.- Returns:
- the maximum delay of the music
- Since:
- 2.4.1
-
replaceCurrentMusic
Gets whether the music should replace the current music.- Returns:
- whether the music should replace the current music
- Since:
- 2.4.1
-
toBuilder
Creates a new builder with the same values as this music.- Returns:
- a new builder with the same values
- Since:
- 3.3.0
-
of
@AsOf("2.4.1") static Music of(SoundEvent sound, int minDelay, int maxDelay, boolean replaceCurrentMusic) Creates a new music record.- Parameters:
sound- the sound of the musicminDelay- the minimum delay of the musicmaxDelay- the maximum delay of the musicreplaceCurrentMusic- whether the music should replace the current music- Returns:
- a new music record
- Since:
- 2.4.1
-
of
@AsOf("3.0.1") static Music of(Sound bukkitSound, int minDelay, int maxDelay, boolean replaceCurrentMusic) Creates a new music record.- Parameters:
bukkitSound- the sound of the musicminDelay- the minimum delay of the musicmaxDelay- the maximum delay of the musicreplaceCurrentMusic- whether the music should replace the current music- Returns:
- a new music record
- Since:
- 3.0.1
-
of
@AsOf("3.1.0") static Music of(String soundKey, int minDelay, int maxDelay, boolean replaceCurrentMusic) Creates a new music record.- Parameters:
soundKey- the sound of the musicminDelay- the minimum delay of the musicmaxDelay- the maximum delay of the musicreplaceCurrentMusic- whether the music should replace the current music- Returns:
- a new music record
- Since:
- 3.1.0
-
builder
Creates a new music record builder.- Returns:
- a new music record builder
- Since:
- 2.4.1
-
decode
-