Examples of CustomPacket


Examples of org.getspout.spout.packet.CustomPacket

        if (!compressible.isCompressed()) {
          PacketCompressionThread.add(compressible, this);
          return;
        }
      }
      getPlayerConnection().sendPacket(new CustomPacket(packet));
    }
  }
View Full Code Here

Examples of org.getspout.spout.packet.CustomPacket

  public void sendImmediatePacket(SpoutPacket packet) {
    if (!(packet instanceof SpoutPacket)) {
      throw new IllegalArgumentException("Packet not of type SpoutPacket");
    }   
    if (getHandle().playerConnection instanceof SpoutPlayerConnection) {
      getPlayerConnection().sendPacket(new CustomPacket(packet));
    } else {
      sendPacket(packet);
    }
  }
View Full Code Here

Examples of xk.xact.util.CustomPacket

  public static void sendItemToServer(NetClientHandler sendQueue, byte slotID, ItemStack item) {
    if( sendQueue == null )
      return;

    try {
      Packet250CustomPayload packet = new CustomPacket( (byte) 0x03 ).add( slotID, item ).toPacket();
      sendQueue.addToSendQueue( packet );
    } catch ( IOException ioe ) {
      Utils.logException( "ICG-Custom Packet: Sending item to server. (0x03)", ioe, false );
    }
  }
View Full Code Here

Examples of xk.xact.util.CustomPacket

      sendItemToServer( sendQueue, (byte) -1, null );
      return;
    }

    try {
      CustomPacket customPacket = new CustomPacket( (byte) 0x02 ).add( (byte) items.length, (byte) offset );
      for( ItemStack item : items ) {
        customPacket.add( item );
      }
      sendQueue.addToSendQueue( customPacket.toPacket() );
    } catch ( IOException ioe ) {
      Utils.logException( "ICG-Custom Packet: Sending items to server. (0x02)", ioe, false );
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.