mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
parent
77de991bcf
commit
d1c571d710
3 changed files with 85 additions and 6 deletions
|
@ -32,7 +32,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.CloudburstMC.Protocol</groupId>
|
<groupId>com.github.CloudburstMC.Protocol</groupId>
|
||||||
<artifactId>bedrock-v422</artifactId>
|
<artifactId>bedrock-v422</artifactId>
|
||||||
<version>87d862d69d</version>
|
<version>d41b84e86c</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
|
|
|
@ -132,11 +132,6 @@ public class LoggingPacketHandler implements BedrockPacketHandler {
|
||||||
return defaultHandler(packet);
|
return defaultHandler(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean handle(EntityFallPacket packet) {
|
|
||||||
return defaultHandler(packet);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(EntityPickRequestPacket packet) {
|
public boolean handle(EntityPickRequestPacket packet) {
|
||||||
return defaultHandler(packet);
|
return defaultHandler(packet);
|
||||||
|
@ -826,4 +821,43 @@ public class LoggingPacketHandler implements BedrockPacketHandler {
|
||||||
public boolean handle(PositionTrackingDBServerBroadcastPacket packet) {
|
public boolean handle(PositionTrackingDBServerBroadcastPacket packet) {
|
||||||
return defaultHandler(packet);
|
return defaultHandler(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 1.16.100 new packets
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean handle(MotionPredictionHintsPacket packet) {
|
||||||
|
return defaultHandler(packet);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean handle(AnimateEntityPacket packet) {
|
||||||
|
return defaultHandler(packet);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean handle(CameraShakePacket packet) {
|
||||||
|
return defaultHandler(packet);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean handle(PlayerFogPacket packet) {
|
||||||
|
return defaultHandler(packet);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean handle(CorrectPlayerMovePredictionPacket packet) {
|
||||||
|
return defaultHandler(packet);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean handle(ItemComponentPacket packet) {
|
||||||
|
return defaultHandler(packet);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 1.16.200 new packet
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean handle(FilterTextPacket packet) {
|
||||||
|
return defaultHandler(packet);
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,45 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* @author GeyserMC
|
||||||
|
* @link https://github.com/GeyserMC/Geyser
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.geysermc.connector.network.translators.bedrock;
|
||||||
|
|
||||||
|
import com.nukkitx.protocol.bedrock.packet.FilterTextPacket;
|
||||||
|
import org.geysermc.connector.network.session.GeyserSession;
|
||||||
|
import org.geysermc.connector.network.translators.PacketTranslator;
|
||||||
|
import org.geysermc.connector.network.translators.Translator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to send strings to the server and filter out unwanted words.
|
||||||
|
* Java doesn't care, so we don't care, and we approve all strings.
|
||||||
|
*/
|
||||||
|
@Translator(packet = FilterTextPacket.class)
|
||||||
|
public class BedrockFilterTextTranslator extends PacketTranslator<FilterTextPacket> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void translate(FilterTextPacket packet, GeyserSession session) {
|
||||||
|
packet.setFromServer(true);
|
||||||
|
session.sendUpstreamPacket(packet);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue