mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 22:15:45 +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
|
@Override
|
||||||
public @NonNull Audience audience() {
|
public @NonNull Audience audience() {
|
||||||
final Optional<ServerPlayer> player = this.player();
|
return this.player()
|
||||||
|
.map(player -> (Audience) player)
|
||||||
if (player.isEmpty()) {
|
.orElseGet(Audience::empty);
|
||||||
return Audience.empty();
|
|
||||||
}
|
|
||||||
|
|
||||||
return player.get();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private @NonNull Optional<ServerPlayer> player() {
|
private @NonNull Optional<ServerPlayer> player() {
|
||||||
|
|||||||
Reference in new issue
Block a user