Archived
0

fix: join player

This commit is contained in:
2019-01-29 23:23:09 +03:00
parent 7c20c5b343
commit b39c2dd56e

View File

@@ -15,10 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.ArrayList; import java.util.*;
import java.util.Collections;
import java.util.List;
import java.util.UUID;
@Slf4j @Slf4j
@Component @Component
@@ -26,7 +23,7 @@ public class H2PlayerManager implements PlayerManager {
@Setter @Setter
@Autowired @Autowired
private H2PlayerService h2PlayerService; private H2PlayerService h2PlayerService;
private List<H2Player> playerList = Collections.synchronizedList(new ArrayList<>()); private Set<H2Player> playerList = Collections.synchronizedSet(new HashSet<>());
@Override @Override
public Player createPlayer(String name, EntityLocation location, World world) { public Player createPlayer(String name, EntityLocation location, World world) {