1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-02-17 02:34:30 +01:00

Location implements Cloneable

By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
Bukkit/Spigot 2010-12-29 03:19:12 +00:00
parent 7c433de12d
commit 7459a15477

View file

@ -4,7 +4,7 @@ package org.bukkit;
/**
* Represents a 3-dimensional position in a world
*/
public class Location {
public class Location implements Cloneable {
private World world;
private double x;
private double y;
@ -179,4 +179,9 @@ public class Location {
public String toString() {
return "Location{" + "world=" + world + "x=" + x + "y=" + y + "z=" + z + "pitch=" + pitch + "yaw=" + yaw + '}';
}
@Override
protected Location clone() {
return new Location(world, x, y, z, yaw, pitch);
}
}