diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 60d4f6f4f0..785ca2d595 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -648,16 +648,16 @@ public class CraftWorld implements World { world.pvpMode = pvp; } - public void playEffect(Player player, Effect sound, int data) { - playEffect(player.getLocation(), sound, data, 0); + public void playEffect(Player player, Effect effect, int data) { + playEffect(player.getLocation(), effect, data, 0); } - public void playEffect(Location location, Effect sound, int data) { - playEffect(location, sound, data, 64); + public void playEffect(Location location, Effect effect, int data) { + playEffect(location, effect, data, 64); } - public void playEffect(Location location, Effect sound, int data, int radius) { - int packetData = sound.getId(); + public void playEffect(Location location, Effect effect, int data, int radius) { + int packetData = effect.getId(); Packet61 packet = new Packet61(packetData, location.getBlockX(), location.getBlockY(), location.getBlockZ(), data); int distance; for (Player player : getPlayers()) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index ef9822e9bf..ecc8d1174c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -11,6 +11,7 @@ import net.minecraft.server.Packet3Chat; import net.minecraft.server.Packet51MapChunk; import net.minecraft.server.Packet53BlockChange; import net.minecraft.server.Packet54PlayNoteBlock; +import net.minecraft.server.Packet61; import net.minecraft.server.Packet6SpawnPosition; import net.minecraft.server.ServerConfigurationManager; import net.minecraft.server.WorldServer; @@ -18,6 +19,7 @@ import net.minecraft.server.ChunkCoordIntPair; import net.minecraft.server.Packet9Respawn; import net.minecraft.server.World; import org.bukkit.Achievement; +import org.bukkit.Effect; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.Statistic; @@ -153,6 +155,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { new Packet54PlayNoteBlock(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), instrument, note)); } + public void playEffect(Location loc, Effect effect, int data) { + int packetData = effect.getId(); + Packet61 packet = new Packet61(packetData, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), data); + getHandle().netServerHandler.sendPacket(packet); + } + public void sendBlockChange(Location loc, Material material, byte data) { sendBlockChange(loc, material.getId(), data); }