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:
parent
f510ab2a0b
commit
d0d1562155
@ -48,11 +48,6 @@ public class ListenerInfo
|
|||||||
* transferred depending on the host they connect to.
|
* transferred depending on the host they connect to.
|
||||||
*/
|
*/
|
||||||
private final Map<String, String> forcedHosts;
|
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.
|
* Class used to build tab lists for this player.
|
||||||
*/
|
*/
|
||||||
|
@ -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;
|
|
||||||
}
|
|
@ -2,7 +2,6 @@ package net.md_5.bungee.api.connection;
|
|||||||
|
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.config.ServerInfo;
|
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.api.tab.TabListHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -72,13 +71,6 @@ public interface ProxiedPlayer extends Connection, CommandSender
|
|||||||
*/
|
*/
|
||||||
void chat(String message);
|
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
|
* Sets the new tab list for the user. At this stage it is not advisable to
|
||||||
* change after the user has logged in!
|
* change after the user has logged in!
|
||||||
|
@ -181,7 +181,7 @@ public class PluginManager
|
|||||||
for ( String dependName : plugin.getDepends() )
|
for ( String dependName : plugin.getDepends() )
|
||||||
{
|
{
|
||||||
PluginDescription depend = toLoad.get( dependName );
|
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 )
|
if ( dependStatus == null )
|
||||||
{
|
{
|
||||||
@ -207,7 +207,7 @@ public class PluginManager
|
|||||||
{
|
{
|
||||||
ProxyServer.getInstance().getLogger().log( Level.WARNING, "{0} (required by {1}) is unavailable", new Object[]
|
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;
|
status = false;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ import lombok.Setter;
|
|||||||
import net.md_5.bungee.api.ChatColor;
|
import net.md_5.bungee.api.ChatColor;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import net.md_5.bungee.api.config.ServerInfo;
|
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.connection.ProxiedPlayer;
|
||||||
import net.md_5.bungee.api.event.PermissionCheckEvent;
|
import net.md_5.bungee.api.event.PermissionCheckEvent;
|
||||||
import net.md_5.bungee.api.event.ServerConnectEvent;
|
import net.md_5.bungee.api.event.ServerConnectEvent;
|
||||||
@ -347,12 +346,6 @@ public final class UserConnection implements ProxiedPlayer
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setTexturePack(TexturePackInfo pack)
|
|
||||||
{
|
|
||||||
unsafe().sendPacket( new PacketFAPluginMessage( "MC|TPack", ( pack.getUrl() + "\00" + pack.getSize() ).getBytes() ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Unsafe unsafe()
|
public Unsafe unsafe()
|
||||||
{
|
{
|
||||||
|
@ -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.ConfigurationAdapter;
|
||||||
import net.md_5.bungee.api.config.ListenerInfo;
|
import net.md_5.bungee.api.config.ListenerInfo;
|
||||||
import net.md_5.bungee.api.config.ServerInfo;
|
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.api.tab.TabListHandler;
|
||||||
import net.md_5.bungee.tab.Global;
|
import net.md_5.bungee.tab.Global;
|
||||||
import net.md_5.bungee.tab.GlobalPing;
|
import net.md_5.bungee.tab.GlobalPing;
|
||||||
@ -207,9 +206,6 @@ public class YamlConfig implements ConfigurationAdapter
|
|||||||
int tabListSize = get( "tab_size", 60, val );
|
int tabListSize = get( "tab_size", 60, val );
|
||||||
InetSocketAddress address = Util.getAddr( host );
|
InetSocketAddress address = Util.getAddr( host );
|
||||||
Map<String, String> forced = new CaseInsensitiveMap<>( get( "forced_hosts", forcedDef, val ) );
|
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 );
|
String tabListName = get( "tab_list", "GLOBAL_PING", val );
|
||||||
DefaultTabList value = DefaultTabList.valueOf( tabListName.toUpperCase() );
|
DefaultTabList value = DefaultTabList.valueOf( tabListName.toUpperCase() );
|
||||||
if ( value == null )
|
if ( value == null )
|
||||||
@ -217,7 +213,7 @@ public class YamlConfig implements ConfigurationAdapter
|
|||||||
value = DefaultTabList.GLOBAL_PING;
|
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 );
|
ret.add( info );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,11 +195,6 @@ public class DownstreamBridge extends PacketHandler
|
|||||||
throw new CancelSendSignal();
|
throw new CancelSendSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( pluginMessage.getTag().equals( "MC|TPack" ) && con.getPendingConnection().getListener().getTexturePack() != null )
|
|
||||||
{
|
|
||||||
throw new CancelSendSignal();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( pluginMessage.getTag().equals( "BungeeCord" ) )
|
if ( pluginMessage.getTag().equals( "BungeeCord" ) )
|
||||||
{
|
{
|
||||||
ByteArrayDataOutput out = ByteStreams.newDataOutput();
|
ByteArrayDataOutput out = ByteStreams.newDataOutput();
|
||||||
|
@ -5,7 +5,6 @@ import net.md_5.bungee.EntityMap;
|
|||||||
import net.md_5.bungee.UserConnection;
|
import net.md_5.bungee.UserConnection;
|
||||||
import net.md_5.bungee.Util;
|
import net.md_5.bungee.Util;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
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.ChatEvent;
|
||||||
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
|
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
|
||||||
import net.md_5.bungee.api.event.PluginMessageEvent;
|
import net.md_5.bungee.api.event.PluginMessageEvent;
|
||||||
@ -30,12 +29,6 @@ public class UpstreamBridge extends PacketHandler
|
|||||||
BungeeCord.getInstance().addConnection( con );
|
BungeeCord.getInstance().addConnection( con );
|
||||||
con.getTabList().onConnect();
|
con.getTabList().onConnect();
|
||||||
con.unsafe().sendPacket( BungeeCord.getInstance().registerChannels() );
|
con.unsafe().sendPacket( BungeeCord.getInstance().registerChannels() );
|
||||||
|
|
||||||
TexturePackInfo texture = con.getPendingConnection().getListener().getTexturePack();
|
|
||||||
if ( texture != null )
|
|
||||||
{
|
|
||||||
con.setTexturePack( texture );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user