mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2025-01-03 23:18:05 +01:00
Update TinyProtocol to 1.12
This commit is contained in:
parent
7c9bbc3f6c
commit
cd2f56d7c7
@ -14,8 +14,8 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.comphenix.protocol</groupId>
|
<groupId>com.comphenix.protocol</groupId>
|
||||||
<artifactId>ProtocolLib-Parent</artifactId>
|
<artifactId>ProtocolLib-Parent</artifactId>
|
||||||
<version>v3-SNAPSHOT</version>
|
<version>v4-SNAPSHOT</version>
|
||||||
<relativePath>../</relativePath>
|
<relativePath>../../</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
@ -42,8 +42,8 @@
|
|||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.0</version>
|
<version>3.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.7</source>
|
<source>1.8</source>
|
||||||
<target>1.7</target>
|
<target>1.8</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
@ -77,20 +77,6 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.spigotmc</groupId>
|
|
||||||
<artifactId>spigot-api</artifactId>
|
|
||||||
<version>1.8.8-R0.1-SNAPSHOT</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.spigotmc</groupId>
|
|
||||||
<artifactId>spigot</artifactId>
|
|
||||||
<version>1.8.8-R0.1-SNAPSHOT</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
<profile>
|
<profile>
|
||||||
<id>release-sign-artifacts</id>
|
<id>release-sign-artifacts</id>
|
||||||
|
@ -178,7 +178,7 @@ public final class Reflection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search for the first publically and privately defined method of the given name and parameter count.
|
* Search for the first publicly and privately defined method of the given name and parameter count.
|
||||||
*
|
*
|
||||||
* @param className - lookup name of the class, see {@link #getClass(String)}.
|
* @param className - lookup name of the class, see {@link #getClass(String)}.
|
||||||
* @param methodName - the method name, or NULL to skip.
|
* @param methodName - the method name, or NULL to skip.
|
||||||
@ -191,7 +191,7 @@ public final class Reflection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search for the first publically and privately defined method of the given name and parameter count.
|
* Search for the first publicly and privately defined method of the given name and parameter count.
|
||||||
*
|
*
|
||||||
* @param clazz - a class to start with.
|
* @param clazz - a class to start with.
|
||||||
* @param methodName - the method name, or NULL to skip.
|
* @param methodName - the method name, or NULL to skip.
|
||||||
@ -204,7 +204,7 @@ public final class Reflection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search for the first publically and privately defined method of the given name and parameter count.
|
* Search for the first publicly and privately defined method of the given name and parameter count.
|
||||||
*
|
*
|
||||||
* @param clazz - a class to start with.
|
* @param clazz - a class to start with.
|
||||||
* @param methodName - the method name, or NULL to skip.
|
* @param methodName - the method name, or NULL to skip.
|
||||||
|
@ -106,7 +106,6 @@ public abstract class TinyProtocol {
|
|||||||
// Damn you, late bind
|
// Damn you, late bind
|
||||||
plugin.getLogger().info("[TinyProtocol] Delaying server channel injection due to late bind.");
|
plugin.getLogger().info("[TinyProtocol] Delaying server channel injection due to late bind.");
|
||||||
|
|
||||||
// Damn you, late bind
|
|
||||||
new BukkitRunnable() {
|
new BukkitRunnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -129,7 +128,7 @@ public abstract class TinyProtocol {
|
|||||||
synchronized (networkManagers) {
|
synchronized (networkManagers) {
|
||||||
// Stop injecting channels
|
// Stop injecting channels
|
||||||
if (!closed) {
|
if (!closed) {
|
||||||
injectChannelInternal(channel);
|
channel.eventLoop().submit(() -> injectChannelInternal(channel));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@ -256,13 +255,12 @@ public abstract class TinyProtocol {
|
|||||||
* <p>
|
* <p>
|
||||||
* Note that this is not executed on the main thread.
|
* Note that this is not executed on the main thread.
|
||||||
*
|
*
|
||||||
* @param reciever - the receiving player, NULL for early login/status packets.
|
* @param receiver - the receiving player, NULL for early login/status packets.
|
||||||
* @param channel - the channel that received the packet. Never NULL.
|
* @param channel - the channel that received the packet. Never NULL.
|
||||||
* @param remoteAddress - remote address of the sending client. Never NULL.
|
|
||||||
* @param packet - the packet being sent.
|
* @param packet - the packet being sent.
|
||||||
* @return The packet to send instead, or NULL to cancel the transmission.
|
* @return The packet to send instead, or NULL to cancel the transmission.
|
||||||
*/
|
*/
|
||||||
public Object onPacketOutAsync(Player reciever, Channel channel, Object packet) {
|
public Object onPacketOutAsync(Player receiver, Channel channel, Object packet) {
|
||||||
return packet;
|
return packet;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -283,7 +281,7 @@ public abstract class TinyProtocol {
|
|||||||
/**
|
/**
|
||||||
* Send a packet to a particular player.
|
* Send a packet to a particular player.
|
||||||
* <p>
|
* <p>
|
||||||
* Note that {@link #onPacketOutAsync(Player, Object)} will be invoked with this packet.
|
* Note that {@link #onPacketOutAsync(Player, Channel, Object)} will be invoked with this packet.
|
||||||
*
|
*
|
||||||
* @param player - the destination player.
|
* @param player - the destination player.
|
||||||
* @param packet - the packet to send.
|
* @param packet - the packet to send.
|
||||||
@ -295,7 +293,7 @@ public abstract class TinyProtocol {
|
|||||||
/**
|
/**
|
||||||
* Send a packet to a particular client.
|
* Send a packet to a particular client.
|
||||||
* <p>
|
* <p>
|
||||||
* Note that {@link #onPacketOutAsync(Player, Object)} will be invoked with this packet.
|
* Note that {@link #onPacketOutAsync(Player, Channel, Object)} will be invoked with this packet.
|
||||||
*
|
*
|
||||||
* @param channel - client identified by a channel.
|
* @param channel - client identified by a channel.
|
||||||
* @param packet - the packet to send.
|
* @param packet - the packet to send.
|
||||||
@ -307,7 +305,7 @@ public abstract class TinyProtocol {
|
|||||||
/**
|
/**
|
||||||
* Pretend that a given packet has been received from a player.
|
* Pretend that a given packet has been received from a player.
|
||||||
* <p>
|
* <p>
|
||||||
* Note that {@link #onPacketInAsync(Player, Object)} will be invoked with this packet.
|
* Note that {@link #onPacketInAsync(Player, Channel, Object)} will be invoked with this packet.
|
||||||
*
|
*
|
||||||
* @param player - the player that sent the packet.
|
* @param player - the player that sent the packet.
|
||||||
* @param packet - the packet that will be received by the server.
|
* @param packet - the packet that will be received by the server.
|
||||||
@ -319,7 +317,7 @@ public abstract class TinyProtocol {
|
|||||||
/**
|
/**
|
||||||
* Pretend that a given packet has been received from a given client.
|
* Pretend that a given packet has been received from a given client.
|
||||||
* <p>
|
* <p>
|
||||||
* Note that {@link #onPacketInAsync(Player, Object)} will be invoked with this packet.
|
* Note that {@link #onPacketInAsync(Player, Channel, Object)} will be invoked with this packet.
|
||||||
*
|
*
|
||||||
* @param channel - client identified by a channel.
|
* @param channel - client identified by a channel.
|
||||||
* @param packet - the packet that will be received by the server.
|
* @param packet - the packet that will be received by the server.
|
||||||
@ -353,7 +351,7 @@ public abstract class TinyProtocol {
|
|||||||
/**
|
/**
|
||||||
* Add a custom channel handler to the given channel.
|
* Add a custom channel handler to the given channel.
|
||||||
*
|
*
|
||||||
* @param player - the channel to inject.
|
* @param channel - the channel to inject.
|
||||||
* @return The intercepted channel, or NULL if it has already been injected.
|
* @return The intercepted channel, or NULL if it has already been injected.
|
||||||
*/
|
*/
|
||||||
public void injectChannel(Channel channel) {
|
public void injectChannel(Channel channel) {
|
||||||
@ -363,7 +361,7 @@ public abstract class TinyProtocol {
|
|||||||
/**
|
/**
|
||||||
* Add a custom channel handler to the given channel.
|
* Add a custom channel handler to the given channel.
|
||||||
*
|
*
|
||||||
* @param player - the channel to inject.
|
* @param channel - the channel to inject.
|
||||||
* @return The packet interceptor.
|
* @return The packet interceptor.
|
||||||
*/
|
*/
|
||||||
private PacketInterceptor injectChannelInternal(Channel channel) {
|
private PacketInterceptor injectChannelInternal(Channel channel) {
|
||||||
|
Loading…
Reference in New Issue
Block a user