mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-09 04:09:43 +01:00
Don't try to find the isAsyncPacket method over and over again.
This commit is contained in:
parent
6063f437fd
commit
e666d17dc2
@ -256,7 +256,7 @@ public class AsyncMarker implements Serializable, Comparable<AsyncMarker> {
|
|||||||
*/
|
*/
|
||||||
public boolean isMinecraftAsync(PacketEvent event) throws FieldAccessException {
|
public boolean isMinecraftAsync(PacketEvent event) throws FieldAccessException {
|
||||||
|
|
||||||
if (isMinecraftAsync == null) {
|
if (isMinecraftAsync == null && !alwaysSync) {
|
||||||
try {
|
try {
|
||||||
isMinecraftAsync = FuzzyReflection.fromClass(Packet.class).getMethodByName("a_.*");
|
isMinecraftAsync = FuzzyReflection.fromClass(Packet.class).getMethodByName("a_.*");
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user