Package net.minecraft.network

Examples of net.minecraft.network.NetHandlerPlayServer


        }
        @Override
        public InetSocketAddress getAddress()
        {
            if((player != null) && (player instanceof EntityPlayerMP)) {
              NetHandlerPlayServer nsh = ((EntityPlayerMP)player).playerNetServerHandler;
              if((nsh != null) && (getNetworkManager(nsh) != null)) {
                SocketAddress sa = getNetworkManager(nsh).getSocketAddress();
                if(sa instanceof InetSocketAddress) {
                  return (InetSocketAddress)sa;
                }
View Full Code Here


  }

  @SubscribeEvent
  public void serverPacket(ServerCustomPacketEvent ev)
  {
    NetHandlerPlayServer srv = (NetHandlerPlayServer) ev.packet.handler();
    if ( serveHandler != null )
      serveHandler.onPacketData( null, ev.packet, srv.playerEntity );
  }
View Full Code Here

        // Send mod salutation to the client
        // This will be ignored by vanilla clients
        this.state = ConnectionState.AWAITING_HANDSHAKE;
        this.manager.channel().pipeline().addFirst("fml:vanilla_detector", new VanillaTimeoutWaiter());
        // Need to start the handler here, so we can send custompayload packets
        serverHandler = new NetHandlerPlayServer(scm.getServerInstance(), manager, player);
        this.netHandler = serverHandler;
        // NULL the play server here - we restore it further on. If not, there are packets sent before the login
        player.playerNetServerHandler = null;
        // manually for the manager into the PLAY state, so we can send packets later
        this.manager.setConnectionState(EnumConnectionState.PLAY);
View Full Code Here

        initializeFakePlayer(world, player.getGameProfile().getId().toString(), player.getCommandSenderName());
    }

    private void initializeFakePlayer(World world, String uuid, String name){
        fakePlayer = new DroneFakePlayer((WorldServer)world, new GameProfile(uuid != null ? UUID.fromString(uuid) : null, name), new FakePlayerItemInWorldManager(world, fakePlayer, this));
        fakePlayer.playerNetServerHandler = new NetHandlerPlayServer(MinecraftServer.getServer(), new NetworkManager(false), fakePlayer);
        fakePlayer.inventory = new InventoryFakePlayer(fakePlayer);
        playerName = name;
    }
View Full Code Here

TOP

Related Classes of net.minecraft.network.NetHandlerPlayServer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.