Пример #1
0
 public static void clear(final Player p) {
   if (((CraftPlayer) p).getHandle().playerConnection.networkManager.getVersion()
       < Title.VERSION) {
     return;
   }
   ((CraftPlayer) p)
       .getHandle()
       .playerConnection
       .sendPacket(
           (Packet) new ProtocolInjector.PacketTitle(ProtocolInjector.PacketTitle.Action.CLEAR));
 }
Пример #2
0
 public static void sendSubTitle(final Player p, final String subtitle) {
   if (((CraftPlayer) p).getHandle().playerConnection.networkManager.getVersion()
       < Title.VERSION) {
     return;
   }
   ((CraftPlayer) p)
       .getHandle()
       .playerConnection
       .sendPacket(
           (Packet)
               new ProtocolInjector.PacketTitle(
                   ProtocolInjector.PacketTitle.Action.SUBTITLE,
                   ChatSerializer.a("{\"text\": \"\"}").a(subtitle)));
 }