Level/src/main/java/world/bentobox/level/objects/TopTenData.java

59 lines
1.3 KiB
Java
Raw Normal View History

package world.bentobox.level.objects;
2018-04-03 03:20:26 +02:00
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
import java.util.UUID;
import org.bukkit.World;
2018-03-11 20:06:31 +01:00
import com.google.gson.annotations.Expose;
2018-08-01 18:49:43 +02:00
import world.bentobox.bentobox.database.objects.DataObject;
import world.bentobox.bentobox.database.objects.Table;
/**
* This class stores the top ten.
* @author tastybento
*
*/
@Table(name = "TopTenData")
2018-01-07 20:25:24 +01:00
public class TopTenData implements DataObject {
2018-08-26 06:15:45 +02:00
2018-05-26 04:59:44 +02:00
// UniqueId is the world name
2018-03-11 20:06:31 +01:00
@Expose
2018-05-26 04:59:44 +02:00
private String uniqueId = "";
2018-03-11 20:06:31 +01:00
@Expose
2018-04-03 03:20:26 +02:00
private Map<UUID, Long> topTen = new LinkedHashMap<>();
public TopTenData(World k) {
uniqueId = k.getName().toLowerCase(Locale.ENGLISH);
}
@Override
public String getUniqueId() {
// This is the world name
return uniqueId;
}
@Override
public void setUniqueId(String uniqueId) {
// This is the world name - make it always lowercase
this.uniqueId = uniqueId.toLowerCase(Locale.ENGLISH);
}
/**
* @return the topTen
*/
public Map<UUID, Long> getTopTen() {
return topTen;
}
/**
* @param topTen the topTen to set
*/
public void setTopTen(Map<UUID, Long> topTen) {
this.topTen = topTen;
}
2018-08-26 06:15:45 +02:00
}