fix voice, pvp
This commit is contained in:
parent
37c9b4888d
commit
a74abf3d4b
7 changed files with 30750 additions and 30746 deletions
35863
javascript/classes.js
35863
javascript/classes.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
|
@ -254,7 +254,7 @@ window.initializeVoiceClient = (() => {
|
|||
}
|
||||
|
||||
signalConnect(peerId, offer) {
|
||||
if (!this.hasInit) initializeDevices();
|
||||
if (!this.hasInit) this.initializeDevices();
|
||||
try {
|
||||
const peerConnection = new RTCPeerConnection({ iceServers: this.ICEServers, optional: [ { DtlsSrtpKeyAgreement: true } ] });
|
||||
const peerInstance = new EaglercraftVoicePeer(this, peerId, peerConnection, offer);
|
||||
|
|
|
@ -31,6 +31,7 @@ public class EAGMinecraftServer extends MinecraftServer {
|
|||
this.gamemode = gamemode;
|
||||
this.setCanSpawnAnimals(true);
|
||||
this.setCanSpawnNPCs(true);
|
||||
this.setAllowPvp(true);
|
||||
}
|
||||
|
||||
public void mainLoop() {
|
||||
|
|
|
@ -144,7 +144,7 @@ public class VoiceChatPlugin {
|
|||
dos2.write(sig);
|
||||
dos2.writeUTF(user);
|
||||
dos2.writeUTF(data);
|
||||
player.playerNetServerHandler.sendPacket(new Packet250CustomPayload("EAG|Voice", baos2.toByteArray()));
|
||||
voicePlayers.get(targetUser2).playerNetServerHandler.sendPacket(new Packet250CustomPayload("EAG|Voice", baos2.toByteArray()));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -163,7 +163,6 @@ public class VoiceChatPlugin {
|
|||
|
||||
public static void activate(List<String> ice) {
|
||||
if(iceServers.size() == 0) {
|
||||
iceServers.clear();
|
||||
iceServers.addAll(ice);
|
||||
for(Object o : MinecraftServer.getServer().getConfigurationManager().playerEntityList) {
|
||||
handleConnect((EntityPlayerMP) o);
|
||||
|
|
Loading…
Reference in a new issue