Search in sources :

Example 6 with Time

use of pl.themolka.arcade.time.Time in project Arcade2 by ShootGame.

the class ArcadePlayer method play.

public void play(Sound sound, Location position, float volume, float pitch) {
    Time now = Time.now();
    if (now.minus(this.getLastPlayedSound()).toMillis() >= SOUND_INTERVAL) {
        this.getBukkit().playSound(position, sound, volume, pitch);
        this.lastPlayedSound = now;
    }
}
Also used : Time(pl.themolka.arcade.time.Time)

Aggregations

Time (pl.themolka.arcade.time.Time)6 Ref (pl.themolka.arcade.config.Ref)2 BaseComponent (net.md_5.bungee.api.chat.BaseComponent)1 Color (org.bukkit.Color)1 PotionEffect (org.bukkit.potion.PotionEffect)1 PotionEffectType (org.bukkit.potion.PotionEffectType)1 Filter (pl.themolka.arcade.filter.Filter)1