Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-03 14:50:19 +01:00
Prevents animations from being sent to the server before the player has spawned
Dieser Commit ist enthalten in:
Ursprung
e67ed6dc8d
Commit
f7c5fea87e
@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
package org.geysermc.connector.network.translators.bedrock;
|
package org.geysermc.connector.network.translators.bedrock;
|
||||||
|
|
||||||
|
import org.geysermc.connector.GeyserConnector;
|
||||||
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;
|
||||||
import org.geysermc.connector.network.translators.Translator;
|
import org.geysermc.connector.network.translators.Translator;
|
||||||
@ -40,6 +41,9 @@ public class BedrockAnimateTranslator extends PacketTranslator<AnimatePacket> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(AnimatePacket packet, GeyserSession session) {
|
public void translate(AnimatePacket packet, GeyserSession session) {
|
||||||
|
// Stop the player sending animations before they have fully spawned into the server
|
||||||
|
if (!session.isSpawned()) { return; }
|
||||||
|
|
||||||
switch (packet.getAction()) {
|
switch (packet.getAction()) {
|
||||||
case SWING_ARM:
|
case SWING_ARM:
|
||||||
// Delay so entity damage can be processed first
|
// Delay so entity damage can be processed first
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren