Class XSound.Record

java.lang.Object
net.islandearth.rpgregions.utils.XSound.Record
Enclosing class:
XSound

public static class XSound.Record extends Object
A class to help caching sound properties parsed from config.
Since:
3.0.0
  • Field Details

    • sound

      @Nonnull public final XSound sound
    • volume

      public final float volume
    • pitch

      public final float pitch
    • playAtLocation

      public boolean playAtLocation
    • player

      @Nullable public org.bukkit.entity.Player player
    • location

      @Nullable public org.bukkit.Location location
  • Constructor Details

    • Record

      public Record(@Nonnull XSound sound, @Nullable org.bukkit.entity.Player player, @Nullable org.bukkit.Location location, float volume, float pitch, boolean playAtLocation)
  • Method Details

    • forPlayer

      public XSound.Record forPlayer(@Nullable org.bukkit.entity.Player player)
    • atLocation

      public XSound.Record atLocation(@Nullable org.bukkit.Location location)
    • forPlayerAtLocation

      public XSound.Record forPlayerAtLocation(@Nullable org.bukkit.entity.Player player, @Nullable org.bukkit.Location location)
    • play

      public void play()
      Plays the sound with the given options and updating the players location.
      Since:
      3.0.0
    • play

      public void play(@Nonnull org.bukkit.Location updatedLocation)
      Plays the sound with the updated location.
      Parameters:
      updatedLocation - the upated location.
      Since:
      3.0.0