3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-03 14:50:19 +01:00

Fix /fly command (#396)

* Fix /fly

* Add comment
Dieser Commit ist enthalten in:
Camotoy 2020-04-21 15:36:13 -04:00 committet von GitHub
Ursprung 1b15f3058f
Commit aad4536990
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -27,6 +27,7 @@ package org.geysermc.connector.network.translators.java.entity.player;
import java.util.Set;
import com.nukkitx.protocol.bedrock.data.CommandPermission;
import org.geysermc.connector.entity.Entity;
import org.geysermc.connector.network.session.GeyserSession;
import org.geysermc.connector.network.translators.PacketTranslator;
@ -68,6 +69,8 @@ public class JavaPlayerAbilitiesTranslator extends PacketTranslator<ServerPlayer
AdventureSettingsPacket adventureSettingsPacket = new AdventureSettingsPacket();
adventureSettingsPacket.setPlayerPermission(PlayerPermission.MEMBER);
// Required or the packet simply is not sent
adventureSettingsPacket.setCommandPermission(CommandPermission.NORMAL);
adventureSettingsPacket.setUniqueEntityId(entity.getGeyserId());
adventureSettingsPacket.getFlags().addAll(playerFlags);
session.getUpstream().sendPacket(adventureSettingsPacket);