forked from GeyserMC/Geyser
parent
1b15f3058f
commit
aad4536990
1 changed files with 3 additions and 0 deletions
|
@ -27,6 +27,7 @@ package org.geysermc.connector.network.translators.java.entity.player;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import com.nukkitx.protocol.bedrock.data.CommandPermission;
|
||||||
import org.geysermc.connector.entity.Entity;
|
import org.geysermc.connector.entity.Entity;
|
||||||
import org.geysermc.connector.network.session.GeyserSession;
|
import org.geysermc.connector.network.session.GeyserSession;
|
||||||
import org.geysermc.connector.network.translators.PacketTranslator;
|
import org.geysermc.connector.network.translators.PacketTranslator;
|
||||||
|
@ -68,6 +69,8 @@ public class JavaPlayerAbilitiesTranslator extends PacketTranslator<ServerPlayer
|
||||||
|
|
||||||
AdventureSettingsPacket adventureSettingsPacket = new AdventureSettingsPacket();
|
AdventureSettingsPacket adventureSettingsPacket = new AdventureSettingsPacket();
|
||||||
adventureSettingsPacket.setPlayerPermission(PlayerPermission.MEMBER);
|
adventureSettingsPacket.setPlayerPermission(PlayerPermission.MEMBER);
|
||||||
|
// Required or the packet simply is not sent
|
||||||
|
adventureSettingsPacket.setCommandPermission(CommandPermission.NORMAL);
|
||||||
adventureSettingsPacket.setUniqueEntityId(entity.getGeyserId());
|
adventureSettingsPacket.setUniqueEntityId(entity.getGeyserId());
|
||||||
adventureSettingsPacket.getFlags().addAll(playerFlags);
|
adventureSettingsPacket.getFlags().addAll(playerFlags);
|
||||||
session.getUpstream().sendPacket(adventureSettingsPacket);
|
session.getUpstream().sendPacket(adventureSettingsPacket);
|
||||||
|
|
Loading…
Reference in a new issue