This commit is contained in:
2025-06-03 23:39:16 +02:00
parent c920664920
commit 1014df5f31
3 changed files with 9 additions and 23 deletions
@@ -85,14 +85,12 @@ public interface Chatter {
else
return withPlayer.apply(player);
}
default boolean withPlayerOrOffline(Consumer<Player> withPlayer, Runnable withOffline) {
default void withPlayerOrOffline(Consumer<Player> withPlayer, Runnable withOffline) {
Player player = getPlayer();
if(player == null) {
withOffline.run();
return false;
} else {
withPlayer.accept(player);
return true;
}
}
default void withPlayer(Consumer<Player> function) {