mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-31 22:22:49 +00:00
Location implements Cloneable
This commit is contained in:
parent
b9801a50da
commit
36b1e38d4c
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue