Randomizes the working sound somewhat
This commit is contained in:
parent
904adf46f0
commit
384893b01a
@ -108,7 +108,11 @@ public abstract class Session implements Runnable {
|
|||||||
|
|
||||||
taskId = scheduler.scheduleSyncDelayedTask(BlacksmithPlugin.getInstance(), this, actionDelay * 20L);
|
taskId = scheduler.scheduleSyncDelayedTask(BlacksmithPlugin.getInstance(), this, actionDelay * 20L);
|
||||||
int playWorkSound = scheduler.scheduleSyncRepeatingTask(BlacksmithPlugin.getInstance(),
|
int playWorkSound = scheduler.scheduleSyncRepeatingTask(BlacksmithPlugin.getInstance(),
|
||||||
this::playWorkSound, 20, 20);
|
() -> {
|
||||||
|
if (random.nextInt(100) < 20) {
|
||||||
|
this.playWorkSound();
|
||||||
|
}
|
||||||
|
}, 20, 5);
|
||||||
scheduler.scheduleSyncDelayedTask(BlacksmithPlugin.getInstance(), () -> scheduler.cancelTask(playWorkSound),
|
scheduler.scheduleSyncDelayedTask(BlacksmithPlugin.getInstance(), () -> scheduler.cancelTask(playWorkSound),
|
||||||
(actionDelay * 20L) - 20);
|
(actionDelay * 20L) - 20);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user