2020-10-27 18:14:34 +00:00
|
|
|
package me.totalfreedom.plex.player;
|
|
|
|
|
|
|
|
import dev.morphia.annotations.Entity;
|
|
|
|
import dev.morphia.annotations.Id;
|
|
|
|
import dev.morphia.annotations.IndexOptions;
|
|
|
|
import dev.morphia.annotations.Indexed;
|
2020-10-27 20:12:38 +00:00
|
|
|
import lombok.AccessLevel;
|
2020-10-27 18:14:34 +00:00
|
|
|
import lombok.Getter;
|
|
|
|
import lombok.Setter;
|
2020-10-27 20:12:38 +00:00
|
|
|
import me.totalfreedom.plex.rank.Rank;
|
2020-10-27 18:14:34 +00:00
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
@Getter
|
|
|
|
@Setter
|
|
|
|
|
|
|
|
@Entity(value = "players", noClassnameStored = true)
|
|
|
|
public class PlexPlayer
|
|
|
|
{
|
2020-10-27 20:12:38 +00:00
|
|
|
@Setter(AccessLevel.NONE)
|
2020-10-27 18:14:34 +00:00
|
|
|
@Id
|
|
|
|
private String id;
|
|
|
|
|
2020-10-27 20:12:38 +00:00
|
|
|
@Setter(AccessLevel.NONE)
|
2020-10-27 18:14:34 +00:00
|
|
|
@Indexed(options = @IndexOptions(unique = true))
|
|
|
|
private String uuid;
|
|
|
|
|
|
|
|
@Indexed
|
|
|
|
private String name;
|
|
|
|
|
2020-10-27 20:12:38 +00:00
|
|
|
private String loginMSG;
|
|
|
|
private String prefix;
|
2020-10-27 18:14:34 +00:00
|
|
|
|
2020-10-27 21:30:57 +00:00
|
|
|
private long coins;
|
|
|
|
|
2020-10-27 20:12:38 +00:00
|
|
|
private Rank rank;
|
2020-10-27 18:14:34 +00:00
|
|
|
|
2020-10-27 20:12:38 +00:00
|
|
|
private List<String> ips;
|
2020-10-27 18:14:34 +00:00
|
|
|
|
|
|
|
public PlexPlayer(){}
|
|
|
|
|
|
|
|
public PlexPlayer(UUID playerUUID)
|
|
|
|
{
|
|
|
|
this.uuid = playerUUID.toString();
|
|
|
|
|
|
|
|
this.id = uuid.substring(0, 8);
|
|
|
|
|
|
|
|
this.name = "";
|
|
|
|
|
2020-10-27 20:12:38 +00:00
|
|
|
this.loginMSG = "";
|
|
|
|
this.prefix = "";
|
|
|
|
|
2020-10-27 21:30:57 +00:00
|
|
|
this.coins = 0;
|
|
|
|
|
2020-10-27 18:14:34 +00:00
|
|
|
this.ips = new ArrayList<>();
|
|
|
|
|
2020-10-27 20:12:38 +00:00
|
|
|
this.rank = null;
|
2020-10-27 18:14:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|