Archived
0

Sonar: [squid:S2975] Remove this "clone" implementation; use a copy constructor or copy factory instead

This commit is contained in:
2019-02-11 14:33:33 +03:00
parent 667ea373b8
commit d4a3a49b47
8 changed files with 14 additions and 27 deletions

View File

@@ -12,7 +12,6 @@ import mc.core.player.PlayerManager;
import mc.core.player.PlayerSettings;
import mc.core.world.World;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
import java.util.*;
@@ -30,7 +29,7 @@ public class H2PlayerManager implements PlayerManager {
H2Player h2Player = new H2Player();
h2Player.setName(name);
h2Player.setUuid(UUID.randomUUID());
h2Player.setLocation(location.clone());
h2Player.setLocation(location.copy());
h2Player.setLoadedChunks(new ArrayList<>());
h2Player.setWorld(world);
h2Player.setSettings(new PlayerSettings());