Fixes bug where island location was shifting due to home calculation

https://github.com/BentoBoxWorld/BentoBox/issues/549

Using the add method on the location was actually changing the
fundamental island location and shifting all subsequent islands off by
0.5 every time.
This commit is contained in:
tastybento 2019-02-20 11:18:42 -08:00
parent 212c690117
commit f515bb6205

View File

@ -149,7 +149,7 @@ public class NewIsland {
plugin.getPlayers().clearHomeLocations(world, user.getUniqueId());
// Set home location
plugin.getPlayers().setHomeLocation(user, next.add(0.5D, 0, 0.5D), 1);
plugin.getPlayers().setHomeLocation(user, new Location(next.getWorld(), next.getX() + 0.5D, next.getY(), next.getZ() + 0.5D), 1);
// Save the player so that if the server crashes weird things won't happen
plugin.getPlayers().save(user.getUniqueId());