mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
42 lines
933 B
Java
42 lines
933 B
Java
package net.william278.huskhomes.position;
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
import java.time.Instant;
|
|
|
|
/**
|
|
* Represents metadata about a {@link Position}, used in {@link SavedPosition} implementations
|
|
*/
|
|
public class PositionMeta {
|
|
|
|
/**
|
|
* The name of a position
|
|
*/
|
|
@NotNull
|
|
public String name;
|
|
|
|
/**
|
|
* A description of a position
|
|
*/
|
|
@NotNull
|
|
public String description;
|
|
|
|
/**
|
|
* The epoch timestamp of a position's creation
|
|
*/
|
|
public long timestamp;
|
|
|
|
public PositionMeta(@NotNull String name, @NotNull String description, long timestamp) {
|
|
this.name = name;
|
|
this.description = description;
|
|
this.timestamp = timestamp;
|
|
}
|
|
|
|
public PositionMeta(@NotNull String name, @NotNull String description) {
|
|
this.name = name;
|
|
this.description = description;
|
|
this.timestamp = Instant.now().getEpochSecond();
|
|
}
|
|
|
|
}
|