mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2025-02-26 01:12:29 +01:00
These fields will be updated and read from different threads.
Mark them as volatile just in case.
This commit is contained in:
parent
75f6cff5a5
commit
b53908ef0f
@ -98,7 +98,7 @@ public abstract class PlayerInjector implements SocketInjector {
|
|||||||
protected static Method queueMethod;
|
protected static Method queueMethod;
|
||||||
protected static Method processMethod;
|
protected static Method processMethod;
|
||||||
|
|
||||||
protected Player player;
|
protected volatile Player player;
|
||||||
protected boolean hasInitialized;
|
protected boolean hasInitialized;
|
||||||
|
|
||||||
// Reference to the player's network manager
|
// Reference to the player's network manager
|
||||||
@ -136,7 +136,7 @@ public abstract class PlayerInjector implements SocketInjector {
|
|||||||
|
|
||||||
// Whether or not to update the current player on the first Packet1Login
|
// Whether or not to update the current player on the first Packet1Login
|
||||||
boolean updateOnLogin;
|
boolean updateOnLogin;
|
||||||
Player updatedPlayer;
|
volatile Player updatedPlayer;
|
||||||
|
|
||||||
public PlayerInjector(ClassLoader classLoader, ErrorReporter reporter, Player player, ListenerInvoker invoker) throws IllegalAccessException {
|
public PlayerInjector(ClassLoader classLoader, ErrorReporter reporter, Player player, ListenerInvoker invoker) throws IllegalAccessException {
|
||||||
this.classLoader = classLoader;
|
this.classLoader = classLoader;
|
||||||
|
Loading…
Reference in New Issue
Block a user