Add texture pack API
This commit is contained in:
@@ -21,6 +21,7 @@ import lombok.Setter;
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
import net.md_5.bungee.api.ProxyServer;
|
||||
import net.md_5.bungee.api.config.ServerInfo;
|
||||
import net.md_5.bungee.api.config.TexturePackInfo;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
import net.md_5.bungee.api.event.PermissionCheckEvent;
|
||||
import net.md_5.bungee.api.event.ServerConnectEvent;
|
||||
@@ -314,4 +315,10 @@ public final class UserConnection implements ProxiedPlayer
|
||||
Preconditions.checkState( this.clientEntityId == 0, "Client entityId already set!" );
|
||||
this.clientEntityId = clientEntityId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTexturePack(TexturePackInfo pack)
|
||||
{
|
||||
sendPacket( new PacketFAPluginMessage( "MC|TPack", ( pack.getUrl() + "\00" + pack.getSize() ).getBytes() ) );
|
||||
}
|
||||
}
|
||||
|
@@ -35,7 +35,7 @@ public class UpstreamBridge extends PacketHandler
|
||||
TexturePackInfo texture = con.getPendingConnection().getListener().getTexturePack();
|
||||
if ( texture != null )
|
||||
{
|
||||
con.sendPacket( new PacketFAPluginMessage( "MC|TPack", ( texture.getUrl() + "\00" + texture.getSize() ).getBytes() ) );
|
||||
con.setTexturePack( texture );
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user