forked from SteamWar/SteamWar
PR Stuff
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user