Use correct API for setting home locations.

This commit is contained in:
tastybento 2021-10-01 19:13:53 -07:00
parent 6fe37b4111
commit 3607c4bd60

View File

@ -49,10 +49,7 @@ public class EnderPearlListener implements Listener {
// Check flag
if (i.isAllowed(u, Boxed.MOVE_BOX) && addon.getIslands().isSafeLocation(l)) {
// Reset home locations
i.getMemberSet().forEach(uuid -> {
addon.getPlayers().getPlayer(uuid).clearHomeLocations(l.getWorld());
addon.getPlayers().getPlayer(uuid).setHomeLocation(l);
});
i.getMemberSet().forEach(uuid -> addon.getIslands().setHomeLocation(uuid, l));
try {
i.setProtectionCenter(l);
i.setSpawnPoint(l.getWorld().getEnvironment(), l);