diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/AsynchronousManager.java b/ProtocolLib/src/main/java/com/comphenix/protocol/AsynchronousManager.java index 66bec542..c722da39 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/AsynchronousManager.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/AsynchronousManager.java @@ -39,8 +39,8 @@ public interface AsynchronousManager { * Use {@link AsyncMarker#incrementProcessingDelay()} to delay a packet until its ready to be transmitted. *
* 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
- * 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.
*
- * 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.
*
* 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 includeTracker is TRUE.
@@ -240,7 +240,7 @@ public interface ProtocolManager extends PacketStream {
public Set
* Deprecated: Use {@link #getReceivingFilterTypes()} instead.
* @return Every filtered client packet.
@@ -249,7 +249,7 @@ public interface ProtocolManager extends PacketStream {
public Set
* This is often simpler and better than passing them directly to each constructor.
- *
* Deprecated: Use {@link #params(Plugin, PacketType...)} instead.
* @param plugin - the plugin that spawned this listener.
* @param packets - the packet IDs the listener is looking for.
* @return Helper object.
*/
@Deprecated
- public static AdapterParameteters params(Plugin plugin, Integer... packets) {
- return new AdapterParameteters().plugin(plugin).packets(packets);
+ public static AdapterParameters params(Plugin plugin, Integer... packets) {
+ return new AdapterParameters().plugin(plugin).packets(packets);
}
-
+
/**
* Construct a helper object for passing parameters to the packet adapter.
*
@@ -371,8 +370,8 @@ public abstract class PacketAdapter implements PacketListener {
* @param packets - the packet types the listener is looking for.
* @return Helper object.
*/
- public static AdapterParameteters params(Plugin plugin, PacketType... packets) {
- return new AdapterParameteters().plugin(plugin).types(packets);
+ public static AdapterParameters params(Plugin plugin, PacketType... packets) {
+ return new AdapterParameters().plugin(plugin).types(packets);
}
/**
@@ -381,7 +380,7 @@ public abstract class PacketAdapter implements PacketListener {
* Note: Never make spelling mistakes in a public API!
* @author Kristian
*/
- public static class AdapterParameteters {
+ public static class AdapterParameters {
private Plugin plugin;
private ConnectionSide connectionSide;
private PacketType[] packets;
@@ -396,7 +395,7 @@ public abstract class PacketAdapter implements PacketListener {
* @param plugin - the plugin.
* @return This builder, for chaining.
*/
- public AdapterParameteters plugin(@Nonnull Plugin plugin) {
+ public AdapterParameters plugin(@Nonnull Plugin plugin) {
this.plugin = Preconditions.checkNotNull(plugin, "plugin cannot be NULL.");
return this;
}
@@ -406,7 +405,7 @@ public abstract class PacketAdapter implements PacketListener {
* @param connectionSide - the new packet type.
* @return This builder, for chaining.
*/
- public AdapterParameteters connectionSide(@Nonnull ConnectionSide connectionSide) {
+ public AdapterParameters connectionSide(@Nonnull ConnectionSide connectionSide) {
this.connectionSide = Preconditions.checkNotNull(connectionSide, "connectionside cannot be NULL.");
return this;
}
@@ -415,15 +414,15 @@ public abstract class PacketAdapter implements PacketListener {
* Set this adapter to also look for client-side packets.
* @return This builder, for chaining.
*/
- public AdapterParameteters clientSide() {
+ public AdapterParameters clientSide() {
return connectionSide(ConnectionSide.add(connectionSide, ConnectionSide.CLIENT_SIDE));
}
/**
- * Set this adapter to also look for client-side packets.
+ * Set this adapter to also look for server-side packets.
* @return This builder, for chaining.
*/
- public AdapterParameteters serverSide() {
+ public AdapterParameters serverSide() {
return connectionSide(ConnectionSide.add(connectionSide, ConnectionSide.SERVER_SIDE));
}
@@ -434,7 +433,7 @@ public abstract class PacketAdapter implements PacketListener {
* @param listenerPriority - the new event priority.
* @return This builder, for chaining.
*/
- public AdapterParameteters listenerPriority(@Nonnull ListenerPriority listenerPriority) {
+ public AdapterParameters listenerPriority(@Nonnull ListenerPriority listenerPriority) {
this.listenerPriority = Preconditions.checkNotNull(listenerPriority, "listener priority cannot be NULL.");
return this;
}
@@ -446,7 +445,7 @@ public abstract class PacketAdapter implements PacketListener {
* @param gamePhase - the new game phase.
* @return This builder, for chaining.
*/
- public AdapterParameteters gamePhase(@Nonnull GamePhase gamePhase) {
+ public AdapterParameters gamePhase(@Nonnull GamePhase gamePhase) {
this.gamePhase = Preconditions.checkNotNull(gamePhase, "gamePhase cannot be NULL.");
return this;
}
@@ -455,7 +454,7 @@ public abstract class PacketAdapter implements PacketListener {
* Set the game phase to {@link GamePhase#LOGIN}, allowing ProtocolLib to intercept login packets.
* @return This builder, for chaining.
*/
- public AdapterParameteters loginPhase() {
+ public AdapterParameters loginPhase() {
return gamePhase(GamePhase.LOGIN);
}
@@ -466,7 +465,7 @@ public abstract class PacketAdapter implements PacketListener {
* @param options - every option to use.
* @return This builder, for chaining.
*/
- public AdapterParameteters options(@Nonnull ListenerOptions... options) {
+ public AdapterParameters options(@Nonnull ListenerOptions... options) {
this.options = Preconditions.checkNotNull(options, "options cannot be NULL.");
return this;
}
@@ -475,7 +474,7 @@ public abstract class PacketAdapter implements PacketListener {
* Set the listener option to {@link ListenerOptions#INTERCEPT_INPUT_BUFFER}, causing ProtocolLib to read the raw packet data from the network stream.
* @return This builder, for chaining.
*/
- public AdapterParameteters optionIntercept() {
+ public AdapterParameters optionIntercept() {
return options(ListenerOptions.INTERCEPT_INPUT_BUFFER);
}
@@ -489,7 +488,7 @@ public abstract class PacketAdapter implements PacketListener {
* @return This builder, for chaining.
*/
@Deprecated
- public AdapterParameteters packets(@Nonnull Integer... packets) {
+ public AdapterParameters packets(@Nonnull Integer... packets) {
Preconditions.checkNotNull(packets, "packets cannot be NULL");
PacketType[] types = new PacketType[packets.length];
@@ -508,7 +507,7 @@ public abstract class PacketAdapter implements PacketListener {
* @return This builder, for chaining.
*/
@Deprecated
- public AdapterParameteters packets(@Nonnull Set
* This parameter is required.
- * @param packets
+ * @param packets - the packet types to look for.
* @return This builder, for chaining.
*/
- public AdapterParameteters types(@Nonnull PacketType... packets) {
+ public AdapterParameters types(@Nonnull PacketType... packets) {
// Set the connection side as well
if (connectionSide == null) {
for (PacketType type : packets) {
this.connectionSide = ConnectionSide.add(this.connectionSide, type.getSender().toSide());
}
}
+
this.packets = Preconditions.checkNotNull(packets, "packets cannot be NULL");
return this;
}
@@ -534,10 +534,10 @@ public abstract class PacketAdapter implements PacketListener {
* Set the packet types the listener is looking for.
*
* This parameter is required.
- * @param packets
+ * @param packets - a set of packet types to look for.
* @return This builder, for chaining.
*/
- public AdapterParameteters types(@Nonnull Set
* 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.
*
* WARNING:
* This method will be called asynchronously! 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);
diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/DelayedPacketManager.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/DelayedPacketManager.java
index cf862e20..5ffd0121 100644
--- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/DelayedPacketManager.java
+++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/DelayedPacketManager.java
@@ -177,21 +177,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));
}
}
diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/PacketFilterManager.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/PacketFilterManager.java
index e1d65c3e..87c95c74 100644
--- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/PacketFilterManager.java
+++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/PacketFilterManager.java
@@ -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
diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/netty/ChannelInjector.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/netty/ChannelInjector.java
index 9d6c7260..70b0049b 100644
--- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/netty/ChannelInjector.java
+++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/netty/ChannelInjector.java
@@ -468,7 +468,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);
}
}
diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/netty/NettyProtocolInjector.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/netty/NettyProtocolInjector.java
index d8274e21..584ecd71 100644
--- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/netty/NettyProtocolInjector.java
+++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/netty/NettyProtocolInjector.java
@@ -228,11 +228,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;
@@ -274,8 +274,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);
}
diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/packet/CaptureInputStream.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/packet/CaptureInputStream.java
index c42e0034..372b79ae 100644
--- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/packet/CaptureInputStream.java
+++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/packet/CaptureInputStream.java
@@ -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() {
diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/packet/ProxyPacketInjector.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/packet/ProxyPacketInjector.java
index ff1be25d..e74000f0 100644
--- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/packet/ProxyPacketInjector.java
+++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/packet/ProxyPacketInjector.java
@@ -52,7 +52,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
*/
diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjectionHandler.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjectionHandler.java
index b80cde31..e4fd780d 100644
--- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjectionHandler.java
+++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjectionHandler.java
@@ -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