Merge branch 'main' into 2027

This commit is contained in:
Peter Johnson
2025-01-16 23:17:59 -08:00
92 changed files with 2748 additions and 534 deletions

View File

@@ -180,6 +180,9 @@ public final class CommandScheduler implements Sendable, AutoCloseable {
* using those requirements have been scheduled as interruptible. If this is the case, they will
* be interrupted and the command will be scheduled.
*
* <p>WARNING: using this function directly can often lead to unexpected behavior and should be
* avoided. Instead Triggers should be used to schedule Commands.
*
* @param command the command to schedule. If null, no-op.
*/
private void schedule(Command command) {
@@ -230,6 +233,9 @@ public final class CommandScheduler implements Sendable, AutoCloseable {
/**
* Schedules multiple commands for execution. Does nothing for commands already scheduled.
*
* <p>WARNING: using this function directly can often lead to unexpected behavior and should be
* avoided. Instead Triggers should be used to schedule Commands.
*
* @param commands the commands to schedule. No-op on null.
*/
public void schedule(Command... commands) {

View File

@@ -198,15 +198,11 @@ public final class Commands {
*
* @param supplier the command supplier
* @return the command
* @deprecated The ProxyCommand supplier constructor has been deprecated in favor of directly
* proxying a {@link DeferredCommand}, see ProxyCommand documentation for more details. As a
* replacement, consider using `defer(supplier).asProxy()`.
* @see ProxyCommand
* @see DeferredCommand
*/
@Deprecated(since = "2025", forRemoval = true)
@SuppressWarnings("removal")
public static Command deferredProxy(Supplier<Command> supplier) {
return new ProxyCommand(supplier);
return defer(() -> supplier.get().asProxy(), Set.of());
}
// Command Groups