Clear entity trackers on server switch

Fixes #5930
This commit is contained in:
KennyTV 2021-06-21 14:33:00 +02:00
parent f9af6947f7
commit 44d836e2e7
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
2 changed files with 3 additions and 2 deletions

View File

@ -90,8 +90,8 @@ public interface UserConnection {
void addEntityTracker(Class<? extends Protocol> protocolClass, EntityTracker tracker);
/**
* Clear all the stored objects.
* Used for bungee when switching servers.
* Clear stored objects and entity trackers.
* Used for Bungee when switching servers.
*/
void clearStoredObjects();

View File

@ -114,6 +114,7 @@ public class UserConnectionImpl implements UserConnection {
@Override
public void clearStoredObjects() {
storedObjects.clear();
entityTrackers.clear();
}
@Override