mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-06 20:43:11 +00:00
New storage system for settings (WIP)
This commit is contained in:
parent
d732821e06
commit
d3aaf3c14a
11 changed files with 450 additions and 3 deletions
|
@ -0,0 +1,28 @@
|
|||
package com.earth2me.essentials.settings;
|
||||
|
||||
import com.earth2me.essentials.storage.StorageObject;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.bukkit.Server;
|
||||
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class Location extends StorageObject
|
||||
{
|
||||
private String worldName = "Test";
|
||||
private double x;
|
||||
private double y;
|
||||
private double z;
|
||||
private Float yaw;
|
||||
private Float pitch;
|
||||
|
||||
public org.bukkit.Location getBukkit(Server server)
|
||||
{
|
||||
if (yaw == null || pitch == null)
|
||||
{
|
||||
return new org.bukkit.Location(server.getWorld(worldName), x, y, z);
|
||||
}
|
||||
return new org.bukkit.Location(server.getWorld(worldName), x, y, z, yaw, pitch);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue