Class FabricServerContext

java.lang.Object
net.tearpelato.craftcorelib.network.FabricServerContext
All Implemented Interfaces:
NetworkContext

public class FabricServerContext extends Object implements NetworkContext
  • Constructor Details

    • FabricServerContext

      public FabricServerContext(net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking.Context ctx)
  • Method Details

    • enqueue

      public void enqueue(Runnable task)
      Specified by:
      enqueue in interface NetworkContext
    • isServer

      public boolean isServer()
      Specified by:
      isServer in interface NetworkContext
    • serverPlayer

      @Nullable public @Nullable net.minecraft.server.level.ServerPlayer serverPlayer()
      Specified by:
      serverPlayer in interface NetworkContext
    • reply

      public void reply(net.minecraft.network.protocol.common.custom.CustomPacketPayload payload)
      Specified by:
      reply in interface NetworkContext