Skip to content

Commit a59ee85

Browse files
committed
Version 1.2
1 parent ae18e4b commit a59ee85

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/com/connorlinfoot/titleapi/TitleAPI.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import net.minecraft.server.v1_7_R4.ChatSerializer;
44
import net.minecraft.server.v1_7_R4.IChatBaseComponent;
5+
import net.minecraft.server.v1_7_R4.PlayerConnection;
56
import org.bukkit.Bukkit;
67
import org.bukkit.ChatColor;
78
import org.bukkit.Server;
@@ -41,6 +42,13 @@ public static void sendTitle(Player player, Integer fadeIn, Integer stay, Intege
4142
craftPlayer.getHandle().playerConnection.sendPacket(new ProtocolInjector.PacketTitle(ProtocolInjector.PacketTitle.Action.SUBTITLE, subtitle2));
4243
}
4344

45+
public static void sendTabTitle(Player player, String header, String footer) {
46+
PlayerConnection connection = ((CraftPlayer) player).getHandle().playerConnection;
47+
IChatBaseComponent header2 = ChatSerializer.a("{'color': 'white', 'text': '" + header + "'}");
48+
IChatBaseComponent footer2 = ChatSerializer.a("{'color': 'white', 'text': '" + footer + "'}");
49+
connection.sendPacket(new ProtocolInjector.PacketTabHeader(header2, footer2));
50+
}
51+
4452
@Override
4553
public boolean onCommand(CommandSender sender, Command command, String string, String[] args) {
4654
if (args.length < 6) {

src/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: TitleAPI
22
description: TitleAPI
33
main: com.connorlinfoot.titleapi.TitleAPI
4-
version: 1.1
4+
version: 1.2
55
commands:
66
title:
77
description: Minecraft 1.8 Title Feature

0 commit comments

Comments
 (0)