Archiviert
13
0

Fixed a few trivial spelling errors

Dieser Commit ist enthalten in:
Devil Boy 2013-12-05 12:24:31 -08:00
Ursprung d42b4de6e9
Commit 7d8d8ead08
18 geänderte Dateien mit 77 neuen und 77 gelöschten Zeilen

Datei anzeigen

@ -39,8 +39,8 @@ public interface AsynchronousManager {
* Use {@link AsyncMarker#incrementProcessingDelay()} to delay a packet until its ready to be transmitted.
* <p>
* To start listening asynchronously, pass the getListenerLoop() runnable to a different thread.
* @param listener - the packet listener that will recieve these asynchronous events.
* @return An asynchrouns handler.
* @param listener - the packet listener that will receive these asynchronous events.
* @return An asynchronous handler.
*/
public abstract AsyncListenerHandler registerAsyncHandler(PacketListener listener);
@ -84,7 +84,7 @@ public interface AsynchronousManager {
public abstract Set<Integer> getReceivingFilters();
/**
* Retrieves a immutable set containing the types of the recieved client packets that will be
* Retrieves a immutable set containing the types of the received client packets that will be
* observed by the asynchronous listeners.
* @return Every filtered client packet.
*/

Datei anzeigen

@ -33,32 +33,32 @@ import com.comphenix.protocol.events.PacketContainer;
public interface PacketStream {
/**
* Send a packet to the given player.
* @param reciever - the reciever.
* @param receiver - the reciever.
* @param packet - packet to send.
* @throws InvocationTargetException - if an error occured when sending the packet.
*/
public void sendServerPacket(Player reciever, PacketContainer packet)
public void sendServerPacket(Player receiver, PacketContainer packet)
throws InvocationTargetException;
/**
* Send a packet to the given player.
* @param reciever - the reciever.
* @param receiver - the reciever.
* @param packet - packet to send.
* @param filters - whether or not to invoke any packet filters below {@link ListenerPriority#MONITOR}.
* @throws InvocationTargetException - if an error occured when sending the packet.
*/
public void sendServerPacket(Player reciever, PacketContainer packet, boolean filters)
public void sendServerPacket(Player receiver, PacketContainer packet, boolean filters)
throws InvocationTargetException;
/**
* Send a packet to the given player.
* @param reciever - the reciever.
* @param receiver - the receiver.
* @param packet - packet to send.
* @param marker - the network marker to use.
* @param filters - whether or not to invoke any packet filters below {@link ListenerPriority#MONITOR}.
* @throws InvocationTargetException - if an error occured when sending the packet.
*/
public void sendServerPacket(Player reciever, PacketContainer packet, NetworkMarker marker, boolean filters)
public void sendServerPacket(Player receiver, PacketContainer packet, NetworkMarker marker, boolean filters)
throws InvocationTargetException;

Datei anzeigen

@ -85,7 +85,7 @@ public class PacketType implements Serializable {
}
/**
* Packets sent and recieved when logged into the game.
* Packets sent and received when logged into the game.
* @author Kristian
*/
public static class Play {
@ -228,7 +228,7 @@ public class PacketType implements Serializable {
}
/**
* Packets sent and recieved when querying the server in the multiplayer menu.
* Packets sent and received when querying the server in the multiplayer menu.
* @author Kristian
*/
public static class Status {
@ -280,7 +280,7 @@ public class PacketType implements Serializable {
}
/**
* Packets sent and recieved when logging in to the server.
* Packets sent and received when logging in to the server.
* @author Kristian
*/
public static class Login {
@ -363,7 +363,7 @@ public class PacketType implements Serializable {
}
/**
* Represens the sender of this packet type.
* Represents the sender of this packet type.
* @author Kristian
*
*/
@ -488,7 +488,7 @@ public class PacketType implements Serializable {
* Note that the registration will be performed on the main thread.
* @param type - the type to register.
* @param name - the name of the packet.
* @return A future telling us if our instance was registrered.
* @return A future telling us if our instance was registered.
*/
public static Future<Boolean> scheduleRegister(final PacketType type, final String name) {
Callable<Boolean> callable = new Callable<Boolean>() {

Datei anzeigen

@ -45,22 +45,22 @@ public interface ProtocolManager extends PacketStream {
/**
* Send a packet to the given player.
* <p>
* Re-sending a previously cancelled packet is discuraged. Use {@link AsyncMarker#incrementProcessingDelay()}
* Re-sending a previously cancelled packet is discouraged. Use {@link AsyncMarker#incrementProcessingDelay()}
* to delay a packet until a certain condition has been met.
*
* @param reciever - the reciever.
* @param receiver - the receiver.
* @param packet - packet to send.
* @param filters - whether or not to invoke any packet filters below {@link ListenerPriority#MONITOR}.
* @throws InvocationTargetException - if an error occured when sending the packet.
* @throws InvocationTargetException - if an error occurred when sending the packet.
*/
@Override
public void sendServerPacket(Player reciever, PacketContainer packet, boolean filters)
public void sendServerPacket(Player receiver, PacketContainer packet, boolean filters)
throws InvocationTargetException;
/**
* Simulate recieving a certain packet from a given player.
* Simulate receiving a certain packet from a given player.
* <p>
* Receiving a previously cancelled packet is discuraged. Use {@link AsyncMarker#incrementProcessingDelay()}
* Receiving a previously cancelled packet is discouraged. Use {@link AsyncMarker#incrementProcessingDelay()}
* to delay a packet until a certain condition has been met.
*
* @param sender - the sender.
@ -81,7 +81,7 @@ public interface ProtocolManager extends PacketStream {
public void broadcastServerPacket(PacketContainer packet);
/**
* Broadcast a packet to every player that is recieving information about a given entity.
* Broadcast a packet to every player that is receiving information about a given entity.
* <p>
* This is usually every player in the same world within an observable distance. If the entity is a
* player, it will only be included if <i>includeTracker</i> is TRUE.
@ -240,7 +240,7 @@ public interface ProtocolManager extends PacketStream {
public Set<PacketType> getSendingFilterTypes();
/**
* Retrieves a immutable set containing the ID of the recieved client packets that will be observed by listeners.
* Retrieves a immutable set containing the ID of the received client packets that will be observed by listeners.
* <p>
* Deprecated: Use {@link #getReceivingFilterTypes()} instead.
* @return Every filtered client packet.
@ -249,7 +249,7 @@ public interface ProtocolManager extends PacketStream {
public Set<Integer> getReceivingFilters();
/**
* Retrieves a immutable set containing the type of the recieved client packets that will be observed by listeners.
* Retrieves a immutable set containing the type of the received client packets that will be observed by listeners.
* @return Every filtered client packet.
*/
public Set<PacketType> getReceivingFilterTypes();
@ -261,14 +261,14 @@ public interface ProtocolManager extends PacketStream {
public MinecraftVersion getMinecraftVersion();
/**
* Determines whether or not this protocol mananger has been disabled.
* Determines whether or not this protocol manager has been disabled.
* @return TRUE if it has, FALSE otherwise.
*/
public boolean isClosed();
/**
* Retrieve the current asyncronous packet manager.
* @return Asyncronous packet manager.
* Retrieve the current asynchronous packet manager.
* @return Asynchronous packet manager.
*/
public AsynchronousManager getAsynchronousManager();
}

Datei anzeigen

@ -152,9 +152,9 @@ public class AsyncFilterManager implements AsynchronousManager {
* Asynchronous events will only be executed if a synchronous listener with the same packets is registered.
* If you already have a synchronous event, call this method with autoInject set to FALSE.
*
* @param listener - the packet listener that will recieve these asynchronous events.
* @param listener - the packet listener that will receive these asynchronous events.
* @param autoInject - whether or not to automatically create the corresponding synchronous listener,
* @return An asynchrouns handler.
* @return An asynchronous handler.
*/
public AsyncListenerHandler registerAsyncHandler(PacketListener listener, boolean autoInject) {
AsyncListenerHandler handler = new AsyncListenerHandler(mainThread, this, listener);

Datei anzeigen

@ -43,8 +43,8 @@ public abstract class AbstractConcurrentListenerMultimap<TListener> {
}
/**
* Adds a listener to its requested list of packet recievers.
* @param listener - listener with a list of packets to recieve notifcations for.
* Adds a listener to its requested list of packet receivers.
* @param listener - listener with a list of packets to receive notifications for.
* @param whitelist - the packet whitelist to use.
*/
public void addListener(TListener listener, ListeningWhitelist whitelist) {

Datei anzeigen

@ -32,7 +32,7 @@ import com.comphenix.protocol.injector.packet.PacketRegistry;
import com.comphenix.protocol.reflect.FieldAccessException;
/**
* Represents a listener that is notified of every sent and recieved packet.
* Represents a listener that is notified of every sent and received packet.
*
* @author Kristian
*/

Datei anzeigen

@ -20,7 +20,7 @@ package com.comphenix.protocol.events;
import org.bukkit.plugin.Plugin;
/**
* Represents a listener that recieves notifications when packets are sent or recieved.
* Represents a listener that receives notifications when packets are sent or received.
* <p>
* Use {@link PacketAdapter} for a simple wrapper around this interface.
* @author Kristian
@ -39,13 +39,13 @@ public interface PacketListener {
public void onPacketSending(PacketEvent event);
/**
* Invoked right before a recieved packet from a client is being processed.
* Invoked right before a received packet from a client is being processed.
* <p>
* <b>WARNING</b>: </br>
* This method will be called <i>asynchronously</i>! You should synchronize with the main
* thread using {@link org.bukkit.scheduler.BukkitScheduler#scheduleSyncDelayedTask(Plugin, Runnable, long) scheduleSyncDelayedTask}
* if you need to call the Bukkit API.
* @param event - the packet that has been recieved.
* @param event - the packet that has been received.
*/
public void onPacketReceiving(PacketEvent event);

Datei anzeigen

@ -176,21 +176,21 @@ public class DelayedPacketManager implements ProtocolManager, InternalManager {
}
@Override
public void sendServerPacket(Player reciever, PacketContainer packet) throws InvocationTargetException {
sendServerPacket(reciever, packet, null, true);
public void sendServerPacket(Player receiver, PacketContainer packet) throws InvocationTargetException {
sendServerPacket(receiver, packet, null, true);
}
@Override
public void sendServerPacket(Player reciever, PacketContainer packet, boolean filters) throws InvocationTargetException {
sendServerPacket(reciever, packet, null, filters);
public void sendServerPacket(Player receiver, PacketContainer packet, boolean filters) throws InvocationTargetException {
sendServerPacket(receiver, packet, null, filters);
}
@Override
public void sendServerPacket(Player reciever, PacketContainer packet, NetworkMarker marker, boolean filters) throws InvocationTargetException {
public void sendServerPacket(Player receiver, PacketContainer packet, NetworkMarker marker, boolean filters) throws InvocationTargetException {
if (delegate != null) {
delegate.sendServerPacket(reciever, packet, marker, filters);
delegate.sendServerPacket(receiver, packet, marker, filters);
} else {
queuedActions.add(queuedAddPacket(ConnectionSide.SERVER_SIDE, reciever, packet, marker, filters));
queuedActions.add(queuedAddPacket(ConnectionSide.SERVER_SIDE, receiver, packet, marker, filters));
}
}

Datei anzeigen

@ -738,9 +738,9 @@ public final class PacketFilterManager implements ProtocolManager, ListenerInvok
}
@Override
public void sendServerPacket(Player reciever, PacketContainer packet, NetworkMarker marker, boolean filters) throws InvocationTargetException {
if (reciever == null)
throw new IllegalArgumentException("reciever cannot be NULL.");
public void sendServerPacket(Player receiver, PacketContainer packet, NetworkMarker marker, boolean filters) throws InvocationTargetException {
if (receiver == null)
throw new IllegalArgumentException("receiver cannot be NULL.");
if (packet == null)
throw new IllegalArgumentException("packet cannot be NULL.");
// We may have to enable player injection indefinitely after this
@ -749,13 +749,13 @@ public final class PacketFilterManager implements ProtocolManager, ListenerInvok
// Inform the MONITOR packets
if (!filters) {
PacketEvent event = PacketEvent.fromServer(this, packet, marker, reciever);
PacketEvent event = PacketEvent.fromServer(this, packet, marker, receiver);
sendingListeners.invokePacketSending(
reporter, event, ListenerPriority.MONITOR);
marker = NetworkMarker.getNetworkMarker(event);
}
playerInjection.sendServerPacket(reciever, packet, marker, filters);
playerInjection.sendServerPacket(receiver, packet, marker, filters);
}
@Override

Datei anzeigen

@ -428,7 +428,7 @@ class ChannelInjector extends ByteToMessageDecoder {
try {
MinecraftMethods.getNetworkManagerReadPacketMethod().invoke(networkManager, null, packet);
} catch (Exception e) {
throw new IllegalArgumentException("Unable to recieve client packet " + packet, e);
throw new IllegalArgumentException("Unable to receive client packet " + packet, e);
}
}

Datei anzeigen

@ -224,11 +224,11 @@ public class NettyProtocolInjector implements ChannelListener {
/**
* Called to inform the event listeners of a queued packet.
* @param packet - the packet that is to be sent.
* @param reciever - the reciever of this packet.
* @param receiver - the receiver of this packet.
* @return The packet event that was used.
*/
private PacketEvent packetQueued(PacketContainer packet, Player reciever) {
PacketEvent event = PacketEvent.fromServer(this, packet, reciever);
private PacketEvent packetQueued(PacketContainer packet, Player receiver) {
PacketEvent event = PacketEvent.fromServer(this, packet, receiver);
invoker.invokePacketSending(event);
return event;
@ -270,8 +270,8 @@ public class NettyProtocolInjector implements ChannelListener {
}
@Override
public void sendServerPacket(Player reciever, PacketContainer packet, NetworkMarker marker, boolean filters) throws InvocationTargetException {
ChannelInjector.fromPlayer(reciever, listener).
public void sendServerPacket(Player receiver, PacketContainer packet, NetworkMarker marker, boolean filters) throws InvocationTargetException {
ChannelInjector.fromPlayer(receiver, listener).
sendServerPacket(packet.getHandle(), marker, filters);
}

Datei anzeigen

@ -55,7 +55,7 @@ class CaptureInputStream extends FilterInputStream {
}
/**
* Retrieve the output stream that recieves all the read information.
* Retrieve the output stream that receives all the read information.
* @return The output stream everything is copied to.
*/
public OutputStream getOutputStream() {

Datei anzeigen

@ -51,7 +51,7 @@ import com.comphenix.protocol.utility.MinecraftReflection;
import com.comphenix.protocol.wrappers.WrappedIntHashMap;
/**
* This class is responsible for adding or removing proxy objects that intercepts recieved packets.
* This class is responsible for adding or removing proxy objects that intercepts received packets.
*
* @author Kristian
*/

Datei anzeigen

@ -114,14 +114,14 @@ public interface PlayerInjectionHandler {
public abstract boolean uninjectPlayer(InetSocketAddress address);
/**
* Send the given packet to the given reciever.
* @param reciever - the player receiver.
* Send the given packet to the given receiver.
* @param receiver - the player receiver.
* @param packet - the packet to send.
* @param marker
* @param filters - whether or not to invoke the packet filters.
* @throws InvocationTargetException If an error occured during sending.
* @throws InvocationTargetException If an error occurred during sending.
*/
public abstract void sendServerPacket(Player reciever, PacketContainer packet, NetworkMarker marker, boolean filters)
public abstract void sendServerPacket(Player receiver, PacketContainer packet, NetworkMarker marker, boolean filters)
throws InvocationTargetException;
/**
@ -161,14 +161,14 @@ public interface PlayerInjectionHandler {
public abstract Set<PacketType> getSendingFilters();
/**
* Whether or not this player injection handler can also recieve packets.
* Whether or not this player injection handler can also receive packets.
* @return TRUE if it can, FALSE otherwise.
*/
public abstract boolean canRecievePackets();
/**
* Invoked if this player injection handler can process recieved packets.
* @param packet - the recieved packet.
* Invoked if this player injection handler can process received packets.
* @param packet - the received packet.
* @param input - the input stream.
* @param buffered - the buffered packet.
* @return The packet event.

Datei anzeigen

@ -523,15 +523,15 @@ class ProxyPlayerInjectionHandler implements PlayerInjectionHandler {
}
/**
* Send the given packet to the given reciever.
* @param reciever - the player receiver.
* Send the given packet to the given receiver.
* @param receiver - the player receiver.
* @param packet - the packet to send.
* @param filters - whether or not to invoke the packet filters.
* @throws InvocationTargetException If an error occured during sending.
*/
@Override
public void sendServerPacket(Player reciever, PacketContainer packet, NetworkMarker marker, boolean filters) throws InvocationTargetException {
SocketInjector injector = getInjector(reciever);
public void sendServerPacket(Player receiver, PacketContainer packet, NetworkMarker marker, boolean filters) throws InvocationTargetException {
SocketInjector injector = getInjector(receiver);
// Send the packet, or drop it completely
if (injector != null) {
@ -539,7 +539,7 @@ class ProxyPlayerInjectionHandler implements PlayerInjectionHandler {
} else {
throw new PlayerLoggedOutException(String.format(
"Unable to send packet %s (%s): Player %s has logged out.",
packet.getType(), packet, reciever
packet.getType(), packet, receiver
));
}
}
@ -652,7 +652,7 @@ class ProxyPlayerInjectionHandler implements PlayerInjectionHandler {
@Override
public PacketEvent handlePacketRecieved(PacketContainer packet, InputStream input, byte[] buffered) {
throw new UnsupportedOperationException("Proxy injection cannot handle recieved packets.");
throw new UnsupportedOperationException("Proxy injection cannot handle received packets.");
}
/**

Datei anzeigen

@ -35,8 +35,8 @@ class DummyPlayerHandler extends AbstractPlayerHandler {
}
@Override
public void sendServerPacket(Player reciever, PacketContainer packet, NetworkMarker marker, boolean filters) throws InvocationTargetException {
injector.sendServerPacket(reciever, packet, marker, filters);
public void sendServerPacket(Player receiver, PacketContainer packet, NetworkMarker marker, boolean filters) throws InvocationTargetException {
injector.sendServerPacket(receiver, packet, marker, filters);
}
@Override

Datei anzeigen

@ -449,9 +449,9 @@ public class SpigotPacketInjector implements SpigotPacketListener {
return packet;
}
Player reciever = getInjector(networkManager, connection).getUpdatedPlayer();
Player receiver = getInjector(networkManager, connection).getUpdatedPlayer();
PacketContainer container = new PacketContainer(id, packet);
PacketEvent event = packetQueued(container, reciever);
PacketEvent event = packetQueued(container, receiver);
if (!event.isCancelled())
return event.getPacket().getHandle();
@ -465,11 +465,11 @@ public class SpigotPacketInjector implements SpigotPacketListener {
/**
* Called to inform the event listeners of a queued packet.
* @param packet - the packet that is to be sent.
* @param reciever - the reciever of this packet.
* @param receiver - the receiver of this packet.
* @return The packet event that was used.
*/
PacketEvent packetQueued(PacketContainer packet, Player reciever) {
PacketEvent event = PacketEvent.fromServer(this, packet, reciever);
PacketEvent packetQueued(PacketContainer packet, Player receiver) {
PacketEvent event = PacketEvent.fromServer(this, packet, receiver);
invoker.invokePacketSending(event);
return event;
@ -537,14 +537,14 @@ public class SpigotPacketInjector implements SpigotPacketListener {
}
/**
* Invoked when a plugin wants to sent a packet.
* @param reciever - the packet receiver.
* @param receiver - the packet receiver.
* @param packet - the packet to transmit.
* @param marker - the network marker object.
* @param filters - whether or not to invoke the packet listeners.
* @throws InvocationTargetException If anything went wrong.
*/
void sendServerPacket(Player reciever, PacketContainer packet, NetworkMarker marker, boolean filters) throws InvocationTargetException {
NetworkObjectInjector networkObject = getInjector(reciever, true);
void sendServerPacket(Player receiver, PacketContainer packet, NetworkMarker marker, boolean filters) throws InvocationTargetException {
NetworkObjectInjector networkObject = getInjector(receiver, true);
// If TRUE, process this packet like any other
if (filters)