Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-19 22:40:18 +01:00
Rename to ServerCustomPayloadEvent
Dieser Commit ist enthalten in:
Ursprung
bdb1aed40c
Commit
7edda9f3da
@ -35,12 +35,12 @@ import org.geysermc.geyser.api.event.connection.ConnectionEvent;
|
|||||||
* This event is not called when a built-in supported custom payload
|
* This event is not called when a built-in supported custom payload
|
||||||
* such as floodgate is received.
|
* such as floodgate is received.
|
||||||
*/
|
*/
|
||||||
public class GeyserCustomPayloadEvent extends ConnectionEvent {
|
public class ServerCustomPayloadEvent extends ConnectionEvent {
|
||||||
|
|
||||||
private final String channel;
|
private final String channel;
|
||||||
private final byte[] data;
|
private final byte[] data;
|
||||||
|
|
||||||
public GeyserCustomPayloadEvent(@NonNull GeyserConnection connection, @NonNull String channel, byte[] data) {
|
public ServerCustomPayloadEvent(@NonNull GeyserConnection connection, @NonNull String channel, byte[] data) {
|
||||||
super(connection);
|
super(connection);
|
||||||
this.channel = channel;
|
this.channel = channel;
|
||||||
this.data = data;
|
this.data = data;
|
@ -42,7 +42,7 @@ import org.geysermc.erosion.packet.geyserbound.GeyserboundPacket;
|
|||||||
import org.geysermc.floodgate.pluginmessage.PluginMessageChannels;
|
import org.geysermc.floodgate.pluginmessage.PluginMessageChannels;
|
||||||
import org.geysermc.geyser.GeyserImpl;
|
import org.geysermc.geyser.GeyserImpl;
|
||||||
import org.geysermc.geyser.GeyserLogger;
|
import org.geysermc.geyser.GeyserLogger;
|
||||||
import org.geysermc.geyser.api.event.java.GeyserCustomPayloadEvent;
|
import org.geysermc.geyser.api.event.java.ServerCustomPayloadEvent;
|
||||||
import org.geysermc.geyser.session.GeyserSession;
|
import org.geysermc.geyser.session.GeyserSession;
|
||||||
import org.geysermc.geyser.translator.protocol.PacketTranslator;
|
import org.geysermc.geyser.translator.protocol.PacketTranslator;
|
||||||
import org.geysermc.geyser.translator.protocol.Translator;
|
import org.geysermc.geyser.translator.protocol.Translator;
|
||||||
@ -142,7 +142,7 @@ public class JavaCustomPayloadTranslator extends PacketTranslator<ClientboundCus
|
|||||||
} else {
|
} else {
|
||||||
var eventBus = session.getGeyser().eventBus();
|
var eventBus = session.getGeyser().eventBus();
|
||||||
|
|
||||||
var event = new GeyserCustomPayloadEvent(session, channel, packet.getData());
|
var event = new ServerCustomPayloadEvent(session, channel, packet.getData());
|
||||||
eventBus.fire(event);
|
eventBus.fire(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren