-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4968426
commit d248786
Showing
2 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
package eu.the5zig.mod.event; | ||
|
||
/** | ||
* Fired, when the server teleports the client to a new Location | ||
*/ | ||
public class PlayerTeleportEvent extends Event { | ||
|
||
/** | ||
* The absolute x-coordinate of the player. | ||
*/ | ||
private double x; | ||
/** | ||
* The absolute y-coordinate of the player. | ||
*/ | ||
private double y; | ||
/** | ||
* The absolute z-coordinate of the player. | ||
*/ | ||
private double z; | ||
/** | ||
* The yaw-rotation of the player. | ||
*/ | ||
private float yaw; | ||
/** | ||
* The pitch-rotation of the player. | ||
*/ | ||
private float pitch; | ||
|
||
public PlayerTeleportEvent(double x, double y, double z, float yaw, float pitch) { | ||
this.x = x; | ||
this.y = y; | ||
this.z = z; | ||
this.yaw = yaw; | ||
this.pitch = pitch; | ||
} | ||
|
||
/** | ||
* @return the absolute x-coordinate of the player. | ||
*/ | ||
public double getX() { | ||
return x; | ||
} | ||
|
||
/** | ||
* @return the absolute y-coordinate of the player. | ||
*/ | ||
public double getY() { | ||
return y; | ||
} | ||
|
||
/** | ||
* @return the absolute z-coordinate of the player. | ||
*/ | ||
public double getZ() { | ||
return z; | ||
} | ||
|
||
/** | ||
* @return the yaw-rotation of the player. | ||
*/ | ||
public float getYaw() { | ||
return yaw; | ||
} | ||
|
||
/** | ||
* @return the pitch-rotation of the player. | ||
*/ | ||
public float getPitch() { | ||
return pitch; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters