Codota Logo
LoginRequest
Code IndexAdd Codota to your IDE (free)

How to use
LoginRequest
in
net.md_5.bungee.protocol.packet

Best Java code snippets using net.md_5.bungee.protocol.packet.LoginRequest (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: SpigotMC/BungeeCord

@Override
public String getName()
{
  return ( name != null ) ? name : ( loginRequest == null ) ? null : loginRequest.getData();
}
origin: SpigotMC/BungeeCord

@Override
public void read(ByteBuf buf)
{
  data = readString( buf );
}
origin: SpigotMC/BungeeCord

@Override
public void write(ByteBuf buf)
{
  writeString( data, buf );
}
origin: SpigotMC/BungeeCord

@Override
public void connected(ChannelWrapper channel) throws Exception
{
  this.ch = channel;
  this.handshakeHandler = new ForgeServerHandler( user, ch, target );
  Handshake originalHandshake = user.getPendingConnection().getHandshake();
  Handshake copiedHandshake = new Handshake( originalHandshake.getProtocolVersion(), originalHandshake.getHost(), originalHandshake.getPort(), 2 );
  if ( BungeeCord.getInstance().config.isIpForward() )
  {
    String newHost = copiedHandshake.getHost() + "\00" + user.getAddress().getHostString() + "\00" + user.getUUID();
    LoginResult profile = user.getPendingConnection().getLoginProfile();
    if ( profile != null && profile.getProperties() != null && profile.getProperties().length > 0 )
    {
      newHost += "\00" + BungeeCord.getInstance().gson.toJson( profile.getProperties() );
    }
    copiedHandshake.setHost( newHost );
  } else if ( !user.getExtraDataInHandshake().isEmpty() )
  {
    // Only restore the extra data if IP forwarding is off.
    // TODO: Add support for this data with IP forwarding.
    copiedHandshake.setHost( copiedHandshake.getHost() + user.getExtraDataInHandshake() );
  }
  channel.write( copiedHandshake );
  channel.setProtocol( Protocol.LOGIN );
  channel.write( new LoginRequest( user.getName() ) );
}
origin: WaterfallMC/Waterfall-Old

@Override
public String getName()
{
  return ( loginRequest == null ) ? null : loginRequest.getData();
}
origin: WaterfallMC/Waterfall-Old

@Override
public void read(ByteBuf buf)
{
  data = readString( buf );
}
origin: WaterfallMC/Waterfall-Old

@Override
public void write(ByteBuf buf)
{
  writeString( data, buf );
}
net.md_5.bungee.protocol.packetLoginRequest

Most used methods

  • getData
  • readString
  • writeString
  • <init>

Popular in Java

  • Making http post requests using okhttp
  • setScale (BigDecimal)
  • getSharedPreferences (Context)
  • addToBackStack (FragmentTransaction)
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now