80 lines
1.8 KiB
Markdown
80 lines
1.8 KiB
Markdown
# IScriptPlayer.stopSound
|
|
|
|
[← IScriptPlayer](index.md) · [← Master](../../wiki.md)
|
|
|
|
Parça 9/11 · [önceki](stopSound-8.md) · [sonraki](stopSound-10.md)
|
|
|
|
|
|
|
|
stopSound
|
|
|
|
default void stopSound(java.lang.String event)
|
|
|
|
Stop specific sound event for this player.
|
|
|
|
c.getWorld().stopSound("minecraft:entity.pig.ambient");
|
|
|
|
|
|
stopSound
|
|
|
|
void stopSound(java.lang.String event,
|
|
java.lang.String category)
|
|
|
|
Stop specific sound event in given sound category for this player.
|
|
|
|
For list of sound categories, type into chat /playsound minecraft:entity.pig.ambient, press space, and press
|
|
Tab key. The list of sounds categories will be displayed.
|
|
|
|
c.getWorld().stopSound("minecraft:entity.pig.ambient", "master");
|
|
|
|
|
|
playStaticSound
|
|
|
|
void playStaticSound(java.lang.String event,
|
|
float volume,
|
|
float pitch)
|
|
|
|
Play a sound event to this player stationary.
|
|
|
|
The difference between this method and playSound(String, double, double, double, float, float) is that if
|
|
player will get teleported, the sound will continue playing.
|
|
|
|
var player = c.getSubject();
|
|
|
|
player.playStaticSound("minecraft:block.portal.ambient", 1.0, 0.8);
|
|
|
|
c.scheduleScript(20, function (c)
|
|
{
|
|
c.getSubject().setPosition(-15, 4, 561);
|
|
});
|
|
|
|
|
|
playStaticSound
|
|
|
|
void playStaticSound(java.lang.String event,
|
|
java.lang.String soundCategory,
|
|
float volume,
|
|
float pitch)
|
|
|
|
Play a sound event to this player stationary at specific channel.
|
|
|
|
The difference between this method and playSound(String, double, double, double, float, float) is that if
|
|
player will get teleported, the sound will continue playing.
|
|
|
|
var player = c.getSubject();
|
|
|
|
|
|
|
|
player.playStaticSound("minecraft:block.portal.ambient", "voice", 1.0, 0.8);
|
|
|
|
c.scheduleScript(20, function (c)
|
|
{
|
|
c.getSubject().setPosition(-15, 4, 561);
|
|
});
|
|
|
|
|
|
getQuests
|
|
|
|
IMappetQuests getQuests()
|
|
|