diff --git a/paper-api/src/main/java/org/bukkit/Effect.java b/paper-api/src/main/java/org/bukkit/Effect.java new file mode 100644 index 0000000000..05921e1125 --- /dev/null +++ b/paper-api/src/main/java/org/bukkit/Effect.java @@ -0,0 +1,25 @@ +package org.bukkit; + +/** + * A list of effects that the server is able to send to players. + */ +public enum Effect { + BOW_FIRE(1002), + CLICK1(1001), + CLICK2(1000), + DOOR_TOGGLE(1003), + EXTINGUISH(1004), + RECORD_PLAY(1005), + SMOKE(2000), + STEP_SOUND(2001); + + private final int id; + + Effect(int id) { + this.id = id; + } + + public int getId() { + return this.id; + } +} diff --git a/paper-api/src/main/java/org/bukkit/Sound.java b/paper-api/src/main/java/org/bukkit/Sound.java deleted file mode 100644 index 1bc0135575..0000000000 --- a/paper-api/src/main/java/org/bukkit/Sound.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.bukkit; - -/** - * A list of sounds that the server is able to send to players. - */ -public enum Sound { - BOW_FIRE(1002), - CLICK1(1001), - CLICK2(1000), - DOOR_SOUND(1003), - EXTINGUISH(1004), - RECORD_PLAY(1005), - SMOKE(2000), - STEP_SOUND(2001); - private final int soundIdentifier; - - Sound(int soundIdentifier) { - this.soundIdentifier = soundIdentifier; - } - - public int getSoundIdentifier() { - return this.soundIdentifier; - } -} - diff --git a/paper-api/src/main/java/org/bukkit/World.java b/paper-api/src/main/java/org/bukkit/World.java index 666d49dab9..3229ee50fc 100644 --- a/paper-api/src/main/java/org/bukkit/World.java +++ b/paper-api/src/main/java/org/bukkit/World.java @@ -533,29 +533,32 @@ public interface World { public List getPopulators(); /** - * Plays a sound to just one player. - * @param player the player to play the sound for - * @param sound the {@link Sound} + * Plays an effect to just one player. + * + * @param player the player to play the effect for + * @param effect the {@link Effect} * @param data a data bit needed for the RECORD_PLAY, SMOKE, and STEP_SOUND sounds */ - public void playSound(Player player, Sound sound, int data); + public void playEffect(Player player, Effect effect, int data); /** - * Plays a sound to all players within a default radius around a given location. + * Plays an effect to all players within a default radius around a given location. + * * @param location the {@link Location} around which players must be to hear the sound - * @param sound the {@link Sound} + * @param effect the {@link Effect} * @param data a data bit needed for the RECORD_PLAY, SMOKE, and STEP_SOUND sounds */ - public void playSound(Location location, Sound sound, int data); + public void playEffect(Location location, Effect effect, int data); /** - * Plays a sound to all players within a given radius around a location. - * @param location the {@link Location} around which players must be to hear the sound - * @param sound the {@link Sound} - * @param data a data bit needed for the RECORD_PLAY, SMOKE, and STEP_SOUND sounds + * Plays an effect to all players within a given radius around a location. + * + * @param location the {@link Location} around which players must be to hear the effect + * @param effect the {@link Effect} + * @param data a data bit needed for the RECORD_PLAY, SMOKE, and STEP effects * @param radius the radius around the location */ - public void playSound(Location location, Sound sound, int data, int radius); + public void playEffect(Location location, Effect effect, int data, int radius); /** * Represents various map environment types that a world may be