Files
AsminVoicechat/source/decompiled/de/maxhenkel/voicechat/plugins/impl/events/PlayerStateChangedEventImpl.java
T
asminme bbccd4a815
Build AsminVoicechat / prepare-release (push) Successful in 14s
Build AsminVoicechat / build-and-test (17) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (18) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (19) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (20) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (21) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (22) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (23) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (24) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (25) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (26) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (27-ea) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (16) (push) Canceled after 38s
first commit
2026-10-24 15:18:03 +02:00

60 lines
1.6 KiB
Java

/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.annotation.Nullable
* org.bukkit.entity.Player
*/
package de.maxhenkel.voicechat.plugins.impl.events;
import de.maxhenkel.voicechat.Voicechat;
import de.maxhenkel.voicechat.api.VoicechatConnection;
import de.maxhenkel.voicechat.api.events.PlayerStateChangedEvent;
import de.maxhenkel.voicechat.plugins.impl.VoicechatConnectionImpl;
import de.maxhenkel.voicechat.plugins.impl.events.ServerEventImpl;
import de.maxhenkel.voicechat.voice.common.PlayerState;
import java.util.UUID;
import javax.annotation.Nullable;
import org.bukkit.entity.Player;
public class PlayerStateChangedEventImpl
extends ServerEventImpl
implements PlayerStateChangedEvent {
protected final PlayerState state;
@Nullable
protected VoicechatConnectionImpl connection;
public PlayerStateChangedEventImpl(PlayerState state) {
this.state = state;
}
@Override
public boolean isDisabled() {
return this.state.isDisabled();
}
@Override
public boolean isDisconnected() {
return this.state.isDisconnected();
}
@Override
public UUID getPlayerUuid() {
return this.state.getUuid();
}
@Override
@Nullable
public VoicechatConnection getConnection() {
if (this.connection == null) {
Player player = Voicechat.INSTANCE.getServer().getPlayer(this.state.getUuid());
if (player == null) {
return null;
}
this.connection = VoicechatConnectionImpl.fromPlayer(player);
}
return this.connection;
}
}