mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-27 21:26:17 +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 processMethod;
|
||||
|
||||
protected Player player;
|
||||
protected volatile Player player;
|
||||
protected boolean hasInitialized;
|
||||
|
||||
// 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
|
||||
boolean updateOnLogin;
|
||||
Player updatedPlayer;
|
||||
volatile Player updatedPlayer;
|
||||
|
||||
public PlayerInjector(ClassLoader classLoader, ErrorReporter reporter, Player player, ListenerInvoker invoker) throws IllegalAccessException {
|
||||
this.classLoader = classLoader;
|
||||
|
Loading…
Reference in New Issue
Block a user