geforkt von Mirrors/Paper
Changed sound playing to effect dispatching, since these seem more like more like encompassing effect than mere sounds.
Dieser Commit ist enthalten in:
Ursprung
baf9a9f501
Commit
846bd468d4
@ -11,7 +11,7 @@ import java.util.Random;
|
|||||||
import net.minecraft.server.*;
|
import net.minecraft.server.*;
|
||||||
|
|
||||||
import org.bukkit.entity.Arrow;
|
import org.bukkit.entity.Arrow;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Effect;
|
||||||
import org.bukkit.event.weather.WeatherChangeEvent;
|
import org.bukkit.event.weather.WeatherChangeEvent;
|
||||||
import org.bukkit.event.weather.ThunderChangeEvent;
|
import org.bukkit.event.weather.ThunderChangeEvent;
|
||||||
import org.bukkit.event.world.SpawnChangeEvent;
|
import org.bukkit.event.world.SpawnChangeEvent;
|
||||||
@ -648,16 +648,16 @@ public class CraftWorld implements World {
|
|||||||
world.pvpMode = pvp;
|
world.pvpMode = pvp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void playSound(Player player, Sound sound, int data) {
|
public void playEffect(Player player, Effect sound, int data) {
|
||||||
playSound(player.getLocation(), sound, data, 0);
|
playEffect(player.getLocation(), sound, data, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void playSound(Location location, Sound sound, int data) {
|
public void playEffect(Location location, Effect sound, int data) {
|
||||||
playSound(location, sound, data, 64);
|
playEffect(location, sound, data, 64);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void playSound(Location location, Sound sound, int data, int radius) {
|
public void playEffect(Location location, Effect sound, int data, int radius) {
|
||||||
int packetData = sound.getSoundIdentifier();
|
int packetData = sound.getId();
|
||||||
Packet61 packet = new Packet61(packetData, location.getBlockX(), location.getBlockY(), location.getBlockZ(), data);
|
Packet61 packet = new Packet61(packetData, location.getBlockX(), location.getBlockY(), location.getBlockZ(), data);
|
||||||
int distance;
|
int distance;
|
||||||
for (Player player : getPlayers()) {
|
for (Player player : getPlayers()) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren