From b53908ef0ff88d03b593f2de312107f1cc0aa197 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Mon, 30 Sep 2013 19:27:22 +0200 Subject: [PATCH] These fields will be updated and read from different threads. Mark them as volatile just in case. --- .../comphenix/protocol/injector/player/PlayerInjector.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjector.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjector.java index 155e3545..113ac512 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjector.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjector.java @@ -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;