Tabnine Logo
Title.writeVarInt
Code IndexAdd Tabnine to your IDE (free)

How to use
writeVarInt
method
in
net.md_5.bungee.protocol.packet.Title

Best Java code snippets using net.md_5.bungee.protocol.packet.Title.writeVarInt (Showing top 2 results out of 315)

origin: SpigotMC/BungeeCord

@Override
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
{
  int index = action.ordinal();
  // If we're working on 1.10 or lower, increment the value of the index so we pull out the correct value.
  if ( protocolVersion <= ProtocolConstants.MINECRAFT_1_10 && index >= 2 )
  {
    index--;
  }
  writeVarInt( index, buf );
  switch ( action )
  {
    case TITLE:
    case SUBTITLE:
    case ACTIONBAR:
      writeString( text, buf );
      break;
    case TIMES:
      buf.writeInt( fadeIn );
      buf.writeInt( stay );
      buf.writeInt( fadeOut );
      break;
  }
}
origin: WaterfallMC/Waterfall-Old

@Override
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
{
  writeVarInt( action.ordinal(), buf );
  switch ( action )
  {
    case TITLE:
    case SUBTITLE:
      writeString( text, buf );
      break;
    case TIMES:
      buf.writeInt( fadeIn );
      buf.writeInt( stay );
      buf.writeInt( fadeOut );
      break;
  }
}
net.md_5.bungee.protocol.packetTitlewriteVarInt

Popular methods of Title

  • <init>
  • readString
  • readVarInt
  • setAction
  • setFadeIn
  • setFadeOut
  • setStay
  • setText
  • writeString

Popular in Java

  • Parsing JSON documents to java classes using gson
  • addToBackStack (FragmentTransaction)
  • requestLocationUpdates (LocationManager)
  • setContentView (Activity)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now