Fix custom tab API to allow using as soon as constructed
This commit is contained in:
@@ -516,8 +516,8 @@ public class BungeeCord extends ProxyServer
|
||||
}
|
||||
|
||||
@Override
|
||||
public CustomTabList customTabList()
|
||||
public CustomTabList customTabList(ProxiedPlayer player)
|
||||
{
|
||||
return new Custom();
|
||||
return new Custom( player );
|
||||
}
|
||||
}
|
||||
|
@@ -4,6 +4,7 @@ import com.google.common.base.Preconditions;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
import net.md_5.bungee.api.tab.CustomTabList;
|
||||
import net.md_5.bungee.api.tab.TabListAdapter;
|
||||
import net.md_5.bungee.protocol.packet.PacketC9PlayerListItem;
|
||||
@@ -26,6 +27,11 @@ public class Custom extends TabListAdapter implements CustomTabList
|
||||
private int rowLim;
|
||||
private int colLim;
|
||||
|
||||
public Custom(ProxiedPlayer player)
|
||||
{
|
||||
this.init( player );
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized String setSlot(int row, int column, String text)
|
||||
{
|
||||
|
Reference in New Issue
Block a user