first commit
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

This commit is contained in:
asminme committed 2026-10-24 15:18:03 +02:00
commit bbccd4a815
454 files changed
+45050

No files matched your search

@@ -0,0 +1,114 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.annotation.Nullable
* org.bukkit.World
* org.bukkit.entity.Entity
* org.bukkit.entity.Player
*/
package de.maxhenkel.voicechat.plugins.impl;
import de.maxhenkel.voicechat.api.Entity;
import de.maxhenkel.voicechat.api.Position;
import de.maxhenkel.voicechat.api.ServerLevel;
import de.maxhenkel.voicechat.api.ServerPlayer;
import de.maxhenkel.voicechat.api.VoicechatApi;
import de.maxhenkel.voicechat.api.VolumeCategory;
import de.maxhenkel.voicechat.api.audio.AudioConverter;
import de.maxhenkel.voicechat.api.mp3.Mp3Decoder;
import de.maxhenkel.voicechat.api.mp3.Mp3Encoder;
import de.maxhenkel.voicechat.api.opus.OpusDecoder;
import de.maxhenkel.voicechat.api.opus.OpusEncoder;
import de.maxhenkel.voicechat.api.opus.OpusEncoderMode;
import de.maxhenkel.voicechat.plugins.impl.EntityImpl;
import de.maxhenkel.voicechat.plugins.impl.PositionImpl;
import de.maxhenkel.voicechat.plugins.impl.ServerLevelImpl;
import de.maxhenkel.voicechat.plugins.impl.ServerPlayerImpl;
import de.maxhenkel.voicechat.plugins.impl.VolumeCategoryImpl;
import de.maxhenkel.voicechat.plugins.impl.audio.AudioConverterImpl;
import de.maxhenkel.voicechat.plugins.impl.opus.OpusManager;
import de.maxhenkel.voicechat.voice.common.Utils;
import java.io.InputStream;
import java.io.OutputStream;
import javax.annotation.Nullable;
import javax.sound.sampled.AudioFormat;
import org.bukkit.World;
import org.bukkit.entity.Player;
public abstract class VoicechatApiImpl
implements VoicechatApi {
private static final AudioConverter AUDIO_CONVERTER = new AudioConverterImpl();
@Override
public OpusEncoder createEncoder() {
return OpusManager.createEncoder(null);
}
@Override
public OpusEncoder createEncoder(OpusEncoderMode mode) {
return OpusManager.createEncoder(mode);
}
@Override
@Nullable
public Mp3Encoder createMp3Encoder(AudioFormat audioFormat, int bitrate, int quality, OutputStream outputStream) {
return null;
}
@Override
@Nullable
public Mp3Decoder createMp3Decoder(InputStream inputStream) {
return null;
}
@Override
public OpusDecoder createDecoder() {
return OpusManager.createDecoder();
}
@Override
public AudioConverter getAudioConverter() {
return AUDIO_CONVERTER;
}
@Override
public Entity fromEntity(Object entity) {
if (entity instanceof org.bukkit.entity.Entity) {
return new EntityImpl((org.bukkit.entity.Entity)entity);
}
throw new IllegalArgumentException("entity is not an instance of Entity");
}
@Override
public ServerLevel fromServerLevel(Object serverLevel) {
if (serverLevel instanceof World) {
return new ServerLevelImpl((World)serverLevel);
}
throw new IllegalArgumentException("serverLevel is not an instance of World");
}
@Override
public ServerPlayer fromServerPlayer(Object serverPlayer) {
if (serverPlayer instanceof Player) {
return new ServerPlayerImpl((Player)serverPlayer);
}
throw new IllegalArgumentException("serverPlayer is not an instance of Player");
}
@Override
public Position createPosition(double x, double y, double z) {
return new PositionImpl(x, y, z);
}
@Override
public VolumeCategory.Builder volumeCategoryBuilder() {
return new VolumeCategoryImpl.BuilderImpl();
}
@Override
public double getVoiceChatDistance() {
return Utils.getDefaultDistance();
}
}