mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 22:15:08 +00:00
Very important change
This commit is contained in:
1 parent
23ac7daad7
commit
39b3f12d1d
1 file changed
+3
-7
@@ -23,13 +23,9 @@ public class CarbonPlayerSponge extends CarbonPlayerCommon {
|
||||
|
||||
@Override
|
||||
public @NonNull Audience audience() {
|
||||
final Optional<ServerPlayer> player = this.player();
|
||||
|
||||
if (player.isEmpty()) {
|
||||
return Audience.empty();
|
||||
}
|
||||
|
||||
return player.get();
|
||||
return this.player()
|
||||
.map(player -> (Audience) player)
|
||||
.orElseGet(Audience::empty);
|
||||
}
|
||||
|
||||
private @NonNull Optional<ServerPlayer> player() {
|
||||
|
||||
Reference in new issue
Block a user