Advanced-Portals/core/src/main/java/com/sekwah/advancedportals/core/data/PlayerLocation.java

68 lines
1.3 KiB
Java
Raw Normal View History

2020-06-29 01:39:27 +02:00
package com.sekwah.advancedportals.core.data;
2018-01-24 11:05:46 +01:00
2018-02-03 21:31:50 +01:00
import com.google.gson.annotations.SerializedName;
2018-01-24 11:05:46 +01:00
public class PlayerLocation {
2018-02-03 21:31:50 +01:00
@SerializedName("x")
private final double posX;
2020-06-29 01:39:27 +02:00
2018-02-03 21:31:50 +01:00
@SerializedName("y")
private final double posY;
2020-06-29 01:39:27 +02:00
2018-02-03 21:31:50 +01:00
@SerializedName("z")
private final double posZ;
2020-06-29 01:39:27 +02:00
2018-02-03 21:31:50 +01:00
@SerializedName("w")
private final String worldName;
2020-06-29 01:39:27 +02:00
2018-02-03 21:31:50 +01:00
@SerializedName("yaw")
private final float yaw;
2020-06-29 01:39:27 +02:00
2018-02-03 21:31:50 +01:00
@SerializedName("p")
private final float pitch;
2018-01-24 11:05:46 +01:00
2018-02-02 10:31:44 +01:00
public PlayerLocation(String worldName, double posX, double posY, double posZ) {
this.worldName = worldName;
2018-01-24 11:05:46 +01:00
this.posX = posX;
this.posY = posY;
this.posZ = posZ;
2018-02-03 21:31:50 +01:00
this.yaw = 0;
this.pitch = 0;
}
public PlayerLocation(String worldName, double posX, double posY, double posZ, float yaw, float pitch) {
this.worldName = worldName;
this.posX = posX;
this.posY = posY;
this.posZ = posZ;
this.yaw = yaw;
this.pitch = pitch;
2018-01-24 11:05:46 +01:00
}
public double getPosX() {
return posX;
}
public double getPosY() {
return posY;
}
public double getPosZ() {
return posZ;
}
public String getWorldName() {
return worldName;
}
public float getYaw() {
return yaw;
}
public float getPitch() {
return pitch;
}
2018-01-24 11:05:46 +01:00
}