Skip to content

Commit 7ea3747

Browse files
committed
feat(api): add delivery condition methods to Sender interface
1 parent 3053b4e commit 7ea3747

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

api/src/main/java/dev/objz/commandbridge/api/channel/MessageChannel.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import java.time.Duration;
88
import java.util.Collection;
9+
import java.util.UUID;
910
import java.util.concurrent.CompletableFuture;
1011

1112
/**
@@ -71,5 +72,21 @@ interface Sender<P extends ChannelPayload> {
7172
* @return a future containing the response payload
7273
*/
7374
CompletableFuture<P> request(P payload, Duration timeout);
75+
76+
default Sender<P> requirePlayer(UUID player) {
77+
throw new UnsupportedOperationException("requirePlayer is not supported by this sender");
78+
}
79+
80+
default Sender<P> requirePlayer() {
81+
throw new UnsupportedOperationException("requirePlayer is not supported by this sender");
82+
}
83+
84+
default Sender<P> whenOnline(UUID player) {
85+
throw new UnsupportedOperationException("whenOnline is not supported by this sender");
86+
}
87+
88+
default Sender<P> whenOnline() {
89+
throw new UnsupportedOperationException("whenOnline is not supported by this sender");
90+
}
7491
}
7592
}

0 commit comments

Comments
 (0)