Examples of KickMessage


Examples of net.glowstone.net.message.KickMessage

        }

        // perform the kick, sending a kick message if possible
        if (isActive() && (getProtocol() instanceof LoginProtocol || getProtocol() instanceof PlayProtocol)) {
            // channel is both currently connected and in a protocol state allowing kicks
            sendWithFuture(new KickMessage(reason)).addListener(ChannelFutureListener.CLOSE);
        } else {
            getChannel().close();
        }
    }
View Full Code Here

Examples of net.glowstone.net.message.KickMessage

public final class KickCodec implements Codec<KickMessage> {
    @Override
    public KickMessage decode(ByteBuf buf) throws IOException {
        TextMessage value = GlowBufUtils.readChat(buf);
        return new KickMessage(value);
    }
View Full Code Here

Examples of net.lightstone.msg.KickMessage

    super(KickMessage.class, 0xFF);
  }

  @Override
  public KickMessage decode(ChannelBuffer buffer) {
    return new KickMessage(ChannelBufferUtils.readString(buffer));
  }
View Full Code Here

Examples of net.lightstone.msg.KickMessage

    String name = args[0];

    for (Player p : world.getPlayers()) {
      if (p.getName().equalsIgnoreCase(name)) {
        player.sendMessage("§eKicking " + p.getName());
        p.getSession().send(new KickMessage("Kicked by " + player.getName()));
        return;
      }
    }

    player.sendMessage("§eCan't find user " + name + ". No kick.");
View Full Code Here

Examples of net.lightstone.msg.KickMessage

   * {@link KickMessage} to be sent. When it has been delivered, the channel
   * is closed.
   * @param reason The reason for disconnection.
   */
  public void disconnect(String reason) {
    channel.write(new KickMessage(reason)).addListener(ChannelFutureListener.CLOSE);
  }
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.