Hi, I'm Mojang and I make hundreds of millions of dollars a year. I still like to think I am an Indy company, so I randomly remove existing game features and don't provide replacements.

Removes Texture Pack setting
This commit is contained in:
md_5 2013-07-18 20:10:45 +10:00
parent f510ab2a0b
commit d0d1562155
8 changed files with 3 additions and 56 deletions

View File

@ -48,11 +48,6 @@ public class ListenerInfo
* transferred depending on the host they connect to.
*/
private final Map<String, String> forcedHosts;
/**
* Get the texture pack used for servers connected to this proxy. May be
* null.
*/
private final TexturePackInfo texturePack;
/**
* Class used to build tab lists for this player.
*/

View File

@ -1,17 +0,0 @@
package net.md_5.bungee.api.config;
import lombok.Data;
@Data
public class TexturePackInfo
{
/**
* The URL of the texture pack.
*/
private final String url;
/**
* The square dimension of this texture pack.
*/
private final int size;
}

View File

@ -2,7 +2,6 @@ package net.md_5.bungee.api.connection;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.config.TexturePackInfo;
import net.md_5.bungee.api.tab.TabListHandler;
/**
@ -72,13 +71,6 @@ public interface ProxiedPlayer extends Connection, CommandSender
*/
void chat(String message);
/**
* Send a request to change the players texture pack.
*
* @param pack the pack to request
*/
void setTexturePack(TexturePackInfo pack);
/**
* Sets the new tab list for the user. At this stage it is not advisable to
* change after the user has logged in!

View File

@ -181,7 +181,7 @@ public class PluginManager
for ( String dependName : plugin.getDepends() )
{
PluginDescription depend = toLoad.get( dependName );
Boolean dependStatus = depend != null ? pluginStatuses.get( depend ) : Boolean.FALSE;
Boolean dependStatus = ( depend != null ) ? pluginStatuses.get( depend ) : Boolean.FALSE;
if ( dependStatus == null )
{
@ -207,7 +207,7 @@ public class PluginManager
{
ProxyServer.getInstance().getLogger().log( Level.WARNING, "{0} (required by {1}) is unavailable", new Object[]
{
depend.getName(), plugin.getName()
String.valueOf( depend.getName() ), plugin.getName()
} );
status = false;
}

View File

@ -22,7 +22,6 @@ 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;
@ -347,12 +346,6 @@ public final class UserConnection implements ProxiedPlayer
return name;
}
@Override
public void setTexturePack(TexturePackInfo pack)
{
unsafe().sendPacket( new PacketFAPluginMessage( "MC|TPack", ( pack.getUrl() + "\00" + pack.getSize() ).getBytes() ) );
}
@Override
public Unsafe unsafe()
{

View File

@ -21,7 +21,6 @@ import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.config.ConfigurationAdapter;
import net.md_5.bungee.api.config.ListenerInfo;
import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.config.TexturePackInfo;
import net.md_5.bungee.api.tab.TabListHandler;
import net.md_5.bungee.tab.Global;
import net.md_5.bungee.tab.GlobalPing;
@ -207,9 +206,6 @@ public class YamlConfig implements ConfigurationAdapter
int tabListSize = get( "tab_size", 60, val );
InetSocketAddress address = Util.getAddr( host );
Map<String, String> forced = new CaseInsensitiveMap<>( get( "forced_hosts", forcedDef, val ) );
String textureURL = get( "texture_url", null, val );
int textureSize = get( "texture_size", 16, val );
TexturePackInfo texture = ( textureURL == null ) ? null : new TexturePackInfo( textureURL, textureSize );
String tabListName = get( "tab_list", "GLOBAL_PING", val );
DefaultTabList value = DefaultTabList.valueOf( tabListName.toUpperCase() );
if ( value == null )
@ -217,7 +213,7 @@ public class YamlConfig implements ConfigurationAdapter
value = DefaultTabList.GLOBAL_PING;
}
ListenerInfo info = new ListenerInfo( address, motd, maxPlayers, tabListSize, defaultServer, fallbackServer, forceDefault, forced, texture, value.clazz );
ListenerInfo info = new ListenerInfo( address, motd, maxPlayers, tabListSize, defaultServer, fallbackServer, forceDefault, forced, value.clazz );
ret.add( info );
}

View File

@ -195,11 +195,6 @@ public class DownstreamBridge extends PacketHandler
throw new CancelSendSignal();
}
if ( pluginMessage.getTag().equals( "MC|TPack" ) && con.getPendingConnection().getListener().getTexturePack() != null )
{
throw new CancelSendSignal();
}
if ( pluginMessage.getTag().equals( "BungeeCord" ) )
{
ByteArrayDataOutput out = ByteStreams.newDataOutput();

View File

@ -5,7 +5,6 @@ import net.md_5.bungee.EntityMap;
import net.md_5.bungee.UserConnection;
import net.md_5.bungee.Util;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.config.TexturePackInfo;
import net.md_5.bungee.api.event.ChatEvent;
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
import net.md_5.bungee.api.event.PluginMessageEvent;
@ -30,12 +29,6 @@ public class UpstreamBridge extends PacketHandler
BungeeCord.getInstance().addConnection( con );
con.getTabList().onConnect();
con.unsafe().sendPacket( BungeeCord.getInstance().registerChannels() );
TexturePackInfo texture = con.getPendingConnection().getListener().getTexturePack();
if ( texture != null )
{
con.setTexturePack( texture );
}
}
@Override