Archiviert
13
0

Essentially, it's a lookup for a player's input stream.

Or: InputStream -> PlayerInjector -> Player.
Dieser Commit ist enthalten in:
Kristian S. Stangeland 2013-02-25 20:32:27 +01:00
Ursprung 8c2f6bddd8
Commit 9195e677ab
4 geänderte Dateien mit 11 neuen und 11 gelöschten Zeilen

Datei anzeigen

@ -27,7 +27,7 @@ import net.sf.cglib.proxy.Factory;
import org.bukkit.Server;
import com.comphenix.protocol.error.ErrorReporter;
import com.comphenix.protocol.injector.server.InjectedServerSocket;
import com.comphenix.protocol.injector.server.InputStreamPlayerLookup;
import com.comphenix.protocol.reflect.FieldUtils;
import com.comphenix.protocol.reflect.FuzzyReflection;
import com.comphenix.protocol.reflect.ObjectWriter;
@ -55,7 +55,7 @@ class InjectedServerConnection {
private NetLoginInjector netLoginInjector;
// Inject server connections
private InjectedServerSocket socketInjector;
private InputStreamPlayerLookup socketInjector;
private Server server;
private ErrorReporter reporter;
@ -64,7 +64,7 @@ class InjectedServerConnection {
private Object minecraftServer = null;
public InjectedServerConnection(ErrorReporter reporter, InjectedServerSocket socketInjector, Server server, NetLoginInjector netLoginInjector) {
public InjectedServerConnection(ErrorReporter reporter, InputStreamPlayerLookup socketInjector, Server server, NetLoginInjector netLoginInjector) {
this.listFields = new ArrayList<VolatileField>();
this.replacedLists = new ArrayList<ReplacedArrayList<Object>>();
this.reporter = reporter;

Datei anzeigen

@ -25,7 +25,7 @@ import org.bukkit.entity.Player;
import com.comphenix.protocol.error.ErrorReporter;
import com.comphenix.protocol.injector.GamePhase;
import com.comphenix.protocol.injector.server.InjectedServerSocket;
import com.comphenix.protocol.injector.server.InputStreamPlayerLookup;
import com.comphenix.protocol.injector.server.SocketInjector;
import com.comphenix.protocol.reflect.FuzzyReflection;
import com.comphenix.protocol.utility.MinecraftReflection;
@ -45,12 +45,12 @@ class NetLoginInjector {
private ProxyPlayerInjectionHandler injectionHandler;
// Associate input streams and injectors
private InjectedServerSocket serverSocket;
private InputStreamPlayerLookup serverSocket;
// The current error rerporter
private ErrorReporter reporter;
public NetLoginInjector(ErrorReporter reporter, ProxyPlayerInjectionHandler injectionHandler, InjectedServerSocket serverSocket) {
public NetLoginInjector(ErrorReporter reporter, ProxyPlayerInjectionHandler injectionHandler, InputStreamPlayerLookup serverSocket) {
this.reporter = reporter;
this.injectionHandler = injectionHandler;
this.serverSocket = serverSocket;

Datei anzeigen

@ -36,7 +36,7 @@ import com.comphenix.protocol.injector.GamePhase;
import com.comphenix.protocol.injector.ListenerInvoker;
import com.comphenix.protocol.injector.PlayerLoggedOutException;
import com.comphenix.protocol.injector.PacketFilterManager.PlayerInjectHooks;
import com.comphenix.protocol.injector.server.InjectedServerSocket;
import com.comphenix.protocol.injector.server.InputStreamPlayerLookup;
import com.comphenix.protocol.injector.server.SocketInjector;
import com.comphenix.protocol.injector.server.TemporaryPlayerFactory;
import com.google.common.base.Predicate;
@ -52,7 +52,7 @@ class ProxyPlayerInjectionHandler implements PlayerInjectionHandler {
private InjectedServerConnection serverInjection;
// Server socket injection
private InjectedServerSocket serverSocket;
private InputStreamPlayerLookup serverSocket;
// NetLogin injector
private NetLoginInjector netLoginInjector;
@ -96,7 +96,7 @@ class ProxyPlayerInjectionHandler implements PlayerInjectionHandler {
this.invoker = invoker;
this.injectionFilter = injectionFilter;
this.packetListeners = packetListeners;
this.serverSocket = new InjectedServerSocket(reporter, server);
this.serverSocket = new InputStreamPlayerLookup(reporter, server);
this.netLoginInjector = new NetLoginInjector(reporter, this, serverSocket);
this.serverInjection = new InjectedServerConnection(reporter, serverSocket, server, netLoginInjector);
serverInjection.injectList();

Datei anzeigen

@ -34,7 +34,7 @@ import com.google.common.collect.MapMaker;
*
* @author Kristian
*/
public class InjectedServerSocket {
public class InputStreamPlayerLookup {
/**
* The read and connect timeout for our built-in MOTD reader.
*/
@ -162,7 +162,7 @@ public class InjectedServerSocket {
// Used to create fake players
private TemporaryPlayerFactory tempPlayerFactory = new TemporaryPlayerFactory();
public InjectedServerSocket(ErrorReporter reporter, Server server) {
public InputStreamPlayerLookup(ErrorReporter reporter, Server server) {
this.reporter = reporter;
this.server = server;
}