mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-27 11:37:42 +01:00
Fix teleport bugging
Teleporting forcibly rounds locations because @fullwall edited the roundLocation function to return the original, now modified location, rather than clone it as is necessary to avoid trouble. This restores the original roundLocation which will avoid that error.
This commit is contained in:
parent
7ff6cfb364
commit
674bb60287
@ -408,10 +408,8 @@ public class EventListen implements Listener {
|
||||
}
|
||||
|
||||
private Location roundLocation(Location input) {
|
||||
input.setX(input.getBlockX());
|
||||
input.setY(input.getBlockY());
|
||||
input.setZ(input.getBlockZ());
|
||||
return input;
|
||||
return new Location(input.getWorld(), Math.floor(input.getX()),
|
||||
Math.floor(input.getY()), Math.floor(input.getZ()));
|
||||
}
|
||||
|
||||
private boolean spawn(NPC npc) {
|
||||
|
Loading…
Reference in New Issue
Block a user