@Override public boolean queueBlockBreakEffect(Platform server, BlockVector3 position, BlockType blockType, double priority) { if (taskId == -1) { taskId = server.schedule(0, 1, () -> { int max = Math.max(1, Math.min(30, effectQueue.size() / 3)); for (int i = 0; i < max; ++i) { if (effectQueue.isEmpty()) return; effectQueue.poll().play(); } }); } if (taskId == -1) { return false; } effectQueue.offer(new QueuedEffect(position.toVector3(), blockType, priority)); return true; }